From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Grant Masan <grant.massan@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: Problem with database performance, Debian 4gb ram ?
Date: Tue, 03 Nov 2009 09:13:43 -0600
Message-ID: <4AEFF447020000250002C19D@gw.wicourts.gov> (raw)
In-Reply-To: <c09b5d640911020616t7177a7b9sb4b5f285d99e7c05@mail.gmail.com>
References: <c09b5d640911020616t7177a7b9sb4b5f285d99e7c05@mail.gmail.com>
Grant Masan <grant.massan@gmail.com> wrote:
> max_connections = 80
> shared_buffers = 512MB
> temp_buffers = 8MB
> work_mem = 20MB
> maintenance_work_mem = 384MB
> wal_buffers = 8MB
> checkpoint_segments = 128MB
> effective_cache_size = 2304MB
> checkpoint_timeout = 1h
Pending further information, these seem sane to me.
> cpu_tuple_cost = 0.0030
> cpu_index_tuple_cost = 0.0010
> cpu_operator_cost = 0.0005
Why did you make these adjustments? I usually have to change the
ratio between page and cpu costs toward the other direction. Unless
you have carefully measured performance with and without these changes
and found a clear win with these, I would recommend going back to the
defaults for these three and tuning from there.
> fsync = off
Only use this if you can afford to lose all data in the database.
(There are some situations where this is actually OK, but they are
unusual.)
As others have stated, though, we'd need more information to really
give much useful advice. An EXPLAIN ANALYZE of a query which isn't
performing to expectations would be helpful, especially if you include
the table definitions (with indexes) of all tables involved in the
query. Output from vmstat or iostat with a fairly small interval (I
usually use 1) while the query is running would be useful, too.
Knowing the exact version of PostgreSQL (like from SELECT version();)
would be useful, as well as knowing more about you disk array and
controller(s).
-Kevin
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: Kevin.Grittner@wicourts.gov, grant.massan@gmail.com
Subject: Re: Problem with database performance, Debian 4gb ram ?
In-Reply-To: <4AEFF447020000250002C19D@gw.wicourts.gov>
References: <c09b5d640911020616t7177a7b9sb4b5f285d99e7c05@mail.gmail.com> <4AEFF447020000250002C19D@gw.wicourts.gov>
* 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