From: Scott Marlowe <smarlowe@g2switchworks.com>
To: Matt Davies | Postgresql List <matt-postgresql@mattdavies.net>
Cc: Charles A. Landemaine <landemaine@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Loading the entire DB into RAM
Date: Fri, 07 Apr 2006 10:49:14 -0500
Message-ID: <1144424954.32266.129.camel@state.g2switchworks.com> (raw)
In-Reply-To: <44367D22.9060007@mattdavies.net>
References: <e6575a30604070737n20b2d7a4l33ba51dcbf4527a@mail.gmail.com>
<44367D22.9060007@mattdavies.net>
On Fri, 2006-04-07 at 09:54, Matt Davies | Postgresql List wrote:
> If memory serves me correctly I have seen several posts about this in
> the past.
>
> I'll try to recall highlights.
>
> 1. Create a md in linux sufficiently large enough to handle the data set
> you are wanting to store.
> 2. Create a HD based copy somewhere as your permanent storage mechanism.
> 3. Start up your PostgreSQL instance with the MD as the data store
> 4. Load your data to the MD instance.
> 5. Figure out how you will change indexes _and_ ensure that your disk
> storage is consistent with your MD instance.
SNIP
> Either way you do it, I can't think of an out of the box method to doing
> it. Somehow one has to transfer data from permanent storage to the md
> instance, and, likewise, back to permanent storage.
dd could do that. Just have a third partition that holds the drive
image. Start up the mirror set, dd the file system into place on the md
device. When you're ready to shut the machine down or back it up, shut
down the postmaster, sync the md drive, dd the filesystem back off to
the image backup drive.
But I'd really just recommend getting a LOT of RAM and letting the
kernel do all the caching. If you've got a 2 gig database and 4 gigs of
ram, you should be gold.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: smarlowe@g2switchworks.com, matt-postgresql@mattdavies.net, landemaine@gmail.com
Subject: Re: Loading the entire DB into RAM
In-Reply-To: <1144424954.32266.129.camel@state.g2switchworks.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox