From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mauro N. Infantino <mauroi@digbang.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Very specific server situation
Date: Fri, 27 Apr 2007 18:51:36 -0400
Message-ID: <6665.1177714296@sss.pgh.pa.us> (raw)
In-Reply-To: <01bc01c788f2$ef6475b0$ec01010a@intranet.db>
References: <01bc01c788f2$ef6475b0$ec01010a@intranet.db>
"Mauro N. Infantino" <mauroi@digbang.com> writes:
> What we basically have is a site where each user has a box with links to
> other randomly selected users. Whenever a box from a user is shown, a SPs is
> executed: a credit is added to that user and a credit is substracted from
> the accounts of the shown links. Accounts with no credits do not have to be
> listed. So, we've lots (LOTS) of users querying and updating the same table.
Have you checked to make sure the query plans are reasonable? Have you
checked that autovacuum is running often enough? (You might want to try
contrib/pgstattuple to see how much dead space there is in your
heavily-updated tables.) Also, on a high-update workload it is
absolutely critical to boost checkpoint_segments far enough that you are
not doing checkpoints oftener than maybe once every five minutes.
If the performance problems seem "bursty" then you may also need to look
at adjusting bgwriter and/or vacuum cost delay parameters to smooth out
the I/O load.
regards, tom lane
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: tgl@sss.pgh.pa.us, mauroi@digbang.com
Subject: Re: Very specific server situation
In-Reply-To: <6665.1177714296@sss.pgh.pa.us>
* 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