From: | Alan McKay <alan(dot)mckay(at)gmail(dot)com> |
---|---|
To: | Postgres General Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Does anyone use in ram postgres database? |
Date: | 2010-03-26 14:06:43 |
Message-ID: | 844129e81003260706q3d1ce1fat811921732f720d97@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Mar 25, 2010 at 4:15 PM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> wrote:
> These questions always get the first question back, what are you
> trying to accomplish? Different objectives will have different
> answers.
We have a real-time application that processes data as it comes in.
Doing some simple math tells us that a disk-based DB cannot possible
perform fast enough to allow us to process the data.
> Now, if your pg_xlog directory is a problem, then you either need
> bigger faster hard drives, or your data is more transient in nature
> and you can recreate it and you put the whole db into RAM.
When we only saw a 3x improvement in speed with the RAM based DB, we
were still seeing a fair bit of disk activity but were not sure what
was going on. Then we thought about pg_xlog and moved it to RAM as
well, but as I recall still not a great improvement.
We are trying a test right now where "initdb" was run against
/ramdisk/data so that absolutely everything should be in there. Will
report back with results.
We are also about to try another test with a regular disk-based DB and
fsync turned OFF
> Note that the query planner wasn't designed with RAM as the storage
> space for pg, so it might make some bad decisions until you adjust
> postgresql.conf to stop that. and then it still might make some bad
> decisions.
What thinks might need adjusting?
thanks,
-Alan
--
“Don't eat anything you've ever seen advertised on TV”
- Michael Pollan, author of "In Defense of Food"
From | Date | Subject | |
---|---|---|---|
Next Message | Timo Klecker | 2010-03-26 14:12:02 | Re: Need help on updating an entire column with a list of values, I have. |
Previous Message | Alan McKay | 2010-03-26 14:02:20 | Re: Does anyone use in ram postgres database? |