From: Richard Huxton <dev@archonet.com>
To: Jeremy Haile <jhaile@fastmail.fm>
Cc: pgsql-performance@postgresql.org
Subject: Re: Config parameters
Date: Tue, 02 Jan 2007 18:49:54 +0000
Message-ID: <459AA952.80008@archonet.com> (raw)
In-Reply-To: <1167757584.31784.282774689@webmail.messagingengine.com>
References: <1167754933.1316.282766279@webmail.messagingengine.com>
<459A898B.9020509@archonet.com>
<1167757584.31784.282774689@webmail.messagingengine.com>
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
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: dev@archonet.com, jhaile@fastmail.fm
Subject: Re: Config parameters
In-Reply-To: <459AA952.80008@archonet.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