Skip site navigation (1) Skip section navigation (2)

running postgres in a ramdisk

From: Keith Keller <kkeller-sfpug(at)wombat(dot)san-francisco(dot)ca(dot)us>
To: SF Postgres <sfpug(at)postgresql(dot)org>
Subject: running postgres in a ramdisk
Date: 2003-10-14 20:55:41
Message-ID: 20031014205541.GA20165@wombat.san-francisco.ca.us (view raw or flat)
Thread:
Lists: sfpug
Hi sfpuggers,

My lab is looking into speeding up our databases beyond the tuning
that can already be done through configuration.  Has anyone had
hands-on experience running postgres with PGDATA entirely in memory?

One possible configuration I can imagine is that we construct the
database on disk, then on boot create an appropriate ramdisk and
copy the whole postgres tree to the ramdisk.  Then we start the
postgres daemons pointing PGDATA to the ramdisk.  The database
in memory won't change (or, if it does, we don't care about saving
the changes), so there's no concern about losing changes if there's
a crash.

Is this even a starter, or is postgres smart enough to use as much
memory as it's told?  We'd be getting a huge chunk of RAM (over 10GB!),
so it would be possible to hold our entire database in RAM if needed.

Any pointers would be great--a first perusal of Google didn't turn
up much (just stuff on loading a database from CD-ROM into a ramdisk).

Oh, and Josh, I'd try to make an sfpug in November if I'm able, but
my wife is due to give birth, so may need to skip out unannounced.  :)

Thanks,

--keith

-- 
kkeller(at)speakeasy(dot)net
alt.os.linux.slackware FAQ:  http://wombat.san-francisco.ca.us/cgi-bin/fom


Responses

sfpug by date

Next:From: William YuDate: 2003-10-14 23:12:22
Subject: Re: running postgres in a ramdisk
Previous:From: Patrick HatcherDate: 2003-10-13 15:43:45
Subject: Re: Meeting, LUG in November?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group