pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedcache whole data in RAM
5+ messages / 5 participants
[nested] [flat]
* cache whole data in RAM
@ 2004-02-03 12:54 David Teran <david.teran@cluster9.com>
2004-02-03 13:26 ` Re: cache whole data in RAM Shridhar Daithankar <shridhar@frodo.hserus.net>
2004-02-03 13:27 ` Re: cache whole data in RAM Bruno Wolff III <bruno@wolff.to>
2004-02-03 13:32 ` Re: cache whole data in RAM Chris Trawick <ctrawick@cultured.net>
2004-02-04 22:44 ` Re: cache whole data in RAM William Yu <wyu@talisys.com>
0 siblings, 4 replies; 5+ messages in thread
From: David Teran @ 2004-02-03 12:54 UTC (permalink / raw)
To: pgsql-performance
Hi,
we are trying to speed up a database which has about 3 GB of data. The
server has 8 GB RAM and we wonder how we can ensure that the whole DB
is read into RAM. We hope that this will speed up some queries.
regards David
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: cache whole data in RAM
2004-02-03 12:54 cache whole data in RAM David Teran <david.teran@cluster9.com>
@ 2004-02-03 13:26 ` Shridhar Daithankar <shridhar@frodo.hserus.net>
3 siblings, 0 replies; 5+ messages in thread
From: Shridhar Daithankar @ 2004-02-03 13:26 UTC (permalink / raw)
To: David Teran <david.teran@cluster9.com>; +Cc: pgsql-performance
David Teran wrote:
> we are trying to speed up a database which has about 3 GB of data. The
> server has 8 GB RAM and we wonder how we can ensure that the whole DB is
> read into RAM. We hope that this will speed up some queries.
Neither the DBa or postgresql has to do anything about it. Usually OS caches the
data in it's buffer cache. That is certainly true for linux and freeBSD does
that. Most of the unices certainly do. To my knowledge linux is most aggresive
one at that..(Rather over aggressive..)
Make sure that you size effective cache size correctly. It helps postgresql
planner at times..
HTH
Shridhar
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: cache whole data in RAM
2004-02-03 12:54 cache whole data in RAM David Teran <david.teran@cluster9.com>
@ 2004-02-03 13:27 ` Bruno Wolff III <bruno@wolff.to>
3 siblings, 0 replies; 5+ messages in thread
From: Bruno Wolff III @ 2004-02-03 13:27 UTC (permalink / raw)
To: David Teran <david.teran@cluster9.com>; +Cc: pgsql-performance
On Tue, Feb 03, 2004 at 13:54:17 +0100,
David Teran <david.teran@cluster9.com> wrote:
> Hi,
>
> we are trying to speed up a database which has about 3 GB of data. The
> server has 8 GB RAM and we wonder how we can ensure that the whole DB
> is read into RAM. We hope that this will speed up some queries.
The OS should do this on its own. What you don't want to do is set
shared_buffers (in postgresql.conf) too high. From what I remember
from past discussions it should be something between about 1000 and 10000.
sort_mem is trickier since that memory is per sort and a single query
can potentially generate multiple parallel sorts. You will have to
make some guesses for this based on what you think the number of concurrent
sorts will be when the system is stressed and not use too much memory.
You might also find that after a point you don't get a lot of benefit
from increasing sort_mem.
You should set effective_cache_size pretty large. Probably you want to
subtract the space used by shared_buffers and sort_mem (* times estimated
parallel sorts) and what you think is reasonable overhead for other
processes from the 8GB of memory.
Since your DB's disk blocks will almost certainly all be in buffer cache,
you are going to want to set random_page_cost to be pretty close to 1.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: cache whole data in RAM
2004-02-03 12:54 cache whole data in RAM David Teran <david.teran@cluster9.com>
@ 2004-02-03 13:32 ` Chris Trawick <ctrawick@cultured.net>
3 siblings, 0 replies; 5+ messages in thread
From: Chris Trawick @ 2004-02-03 13:32 UTC (permalink / raw)
To: David Teran <david.teran@cluster9.com>; +Cc: pgsql-performance
Put it on a RAM disk.
chris
On Tue, 2004-02-03 at 07:54, David Teran wrote:
> Hi,
>
> we are trying to speed up a database which has about 3 GB of data. The
> server has 8 GB RAM and we wonder how we can ensure that the whole DB
> is read into RAM. We hope that this will speed up some queries.
>
> regards David
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: cache whole data in RAM
2004-02-03 12:54 cache whole data in RAM David Teran <david.teran@cluster9.com>
@ 2004-02-04 22:44 ` William Yu <wyu@talisys.com>
3 siblings, 0 replies; 5+ messages in thread
From: William Yu @ 2004-02-04 22:44 UTC (permalink / raw)
To: pgsql-performance
David Teran wrote:
> Hi,
>
> we are trying to speed up a database which has about 3 GB of data. The
> server has 8 GB RAM and we wonder how we can ensure that the whole DB is
> read into RAM. We hope that this will speed up some queries.
>
> regards David
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>
Upon bootup, automatically run "SELECT * FROM xyz" on every table in
your database.
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2004-02-04 22:44 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-02-03 12:54 cache whole data in RAM David Teran <david.teran@cluster9.com>
2004-02-03 13:26 ` Shridhar Daithankar <shridhar@frodo.hserus.net>
2004-02-03 13:27 ` Bruno Wolff III <bruno@wolff.to>
2004-02-03 13:32 ` Chris Trawick <ctrawick@cultured.net>
2004-02-04 22:44 ` William Yu <wyu@talisys.com>
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