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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse sfpug by date

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