From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | Jeremy Haile <jhaile(at)fastmail(dot)fm> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Config parameters |
Date: | 2007-01-02 18:49:54 |
Message-ID: | 459AA952.80008@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Jeremy Haile wrote:
> What is a decent default setting for work_mem and maintenance_work_mem,
> considering I am regularly querying tables that are tens of millions of
> rows and have 2-4 GB of RAM?
Well, work_mem will depend on your query-load. Queries that do a lot of
sorting should benefit from increased work_mem. You only have limited
RAM though, so it's a balancing act between memory used to cache disk
and per-process sort memory. Note that work_mem is per sort, so you can
use multiples of that amount in a single query. You can issue a "set" to
change the value for a session.
How you set maintenance_work_mem will depend on whether you vacuum
continually (e.g. autovacuum) or at set times.
> Also - what is the best way to determine decent settings for
> temp_buffers and random_page_cost?
With all of these, testing I'm afraid. The only sure thing you can say
is that random_page_cost should be 1 if all your database fits in RAM.
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Jeremy Haile | 2007-01-02 19:19:58 | Re: Config parameters |
Previous Message | Jeff Davis | 2007-01-02 18:36:47 | Re: High update activity, PostgreSQL vs BigDBMS |