From: Nick Fankhauser <nickf@ontko.com>
To: Pgsql-Performance@Postgresql. Org <pgsql-performance@postgresql.org>
Subject: Sanity check requested
Date: Mon, 14 Jul 2003 12:51:44 -0500
Message-ID: <NEBBLAAHGLEEPCGOBHDGIEAIHMAA.nickf@ontko.com> (raw)
Hi folks-
For some time, we've been running Postgres with the default configuration &
getting adequate performance, but the time has come to tune a bit, so I've
been lurking on this list & gathering notes. Now I'm about ready to make a
change & would appreciate it if a few more experienced folks could comment
on whether I appear to be heading in the right direction-
Here's what I'm planning:
Increase SHMMAX and SHMALL in my kernel to 134217728 (128MB)
Increase shared_buffers to 8192 (64MB)
Increase sort_mem to 16384 (16MB)
Increase effective_cache_size to 65536 (1/2 GB)
Here's the environment:
The Hardware is a dual-processor Athlon 1.2 Ghz box with 1 GB of RAM and the
DB on SCSI RAID drives.
The server runs only PostgreSQL
The database size is about 8GB, with the largest table 2.5 GB, and the two
most commonly queried tables at 1 GB each.
The two most commonly queried tables are usually queried based on a
non-unique indexed varchar field typically 20 chars long. The query is a
"like" on people's names with trailing %, so this often gets pushed to seq
scan or returns several thousand records. (As when someone searches on
'Jones%'.
Records from the largest table are always accessed via unique index in
groups of 20 or less.
The OS is Debian Linux kernel 2.4.x (recompiled custom kernel for dual
processor support)
The PostgreSQL version is 7.3.2
We typically have about 30 interactive users on the DB, but they're using a
shared connection pool of 16. Our main problem appears to be when one of the
users fires up a large query and creates a log-jam with resources.
My reasoning is that I'll increase shared_buffers based on anecdotal
recommendations I've seen on this list to 64MB. I'll boost the OS SHMMAX to
twice that value to allow adequate room for other shared memory needs, thus
reserving 128MB. Of the remaining memory, 256MB goes to 16 connections *
16MB sort space, if I leave about 128 MB for headroom, then 1/2 GB should be
left available for the effective cache size.
Any thoughts? Is this a sane plan? Are there other parameters I should
consider changing first?
Thanks!
-Nick
---------------------------------------------------------------------
Nick Fankhauser
nickf@doxpop.com Phone 1.765.965.7363 Fax 1.765.962.9788
doxpop - Court records at your fingertips - http://www.doxpop.com/
---------------------------------------------------------------------
Nick Fankhauser
nickf@doxpop.com Phone 1.765.965.7363 Fax 1.765.962.9788
doxpop - Court records at your fingertips - http://www.doxpop.com/
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: nickf@ontko.com
Subject: Re: Sanity check requested
In-Reply-To: <NEBBLAAHGLEEPCGOBHDGIEAIHMAA.nickf@ontko.com>
References: <NEBBLAAHGLEEPCGOBHDGIEAIHMAA.nickf@ontko.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