From: Chris Kratz <chris.kratz@vistashare.com>
To: Greg Stark <gsstark@mit.edu>
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance Tuning
Date: Wed, 9 Feb 2005 17:17:59 -0500
Message-ID: <200502091718.00014.chris.kratz@vistashare.com> (raw)
In-Reply-To: <87wtthcuux.fsf@stark.xeocode.com>
References: <200502091501.31447.chris.kratz@vistashare.com>
<87wtthcuux.fsf@stark.xeocode.com>
On Wednesday 09 February 2005 03:59 pm, Greg Stark wrote:
> Chris Kratz <chris.kratz@vistashare.com> writes:
> > We continue to tune our individual queries where we can, but it seems we
> > still are waiting on the db a lot in our app. When we run most queries,
> > top shows the postmaster running at 90%+ constantly during the duration
> > of the request. The disks get touched occasionally, but not often. Our
> > database on disk is around 2.6G and most of the working set remains
> > cached in memory, hence the few disk accesses. All this seems to point
> > to the need for faster processors.
>
> I would suggest looking at the top few queries that are taking the most
> cumulative time on the processor. It sounds like the queries are doing a
> ton of logical i/o on data that's cached in RAM. A few indexes might cut
> down on the memory bandwidth needed to churn through all that data.
Hmmm, yes we continue to use indexes judiciously. I actually think we've
overdone it in some cases since inserts are starting to slow in some critical
areas.
> > Items changed in the postgresql.conf:
> > ...
> > random_page_cost = 1 # units are one sequential page fetch cost
>
> This makes it nigh impossible for the server from ever making a sequential
> scan when an index would suffice. What query made you do this? What plan
> did it fix?
Yes, it got set back to 2. I was testing various settings suggested by a
posting in the archives and that one didn't get reset.
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: chris.kratz@vistashare.com, gsstark@mit.edu
Subject: Re: Performance Tuning
In-Reply-To: <200502091718.00014.chris.kratz@vistashare.com>
References: <200502091501.31447.chris.kratz@vistashare.com> <87wtthcuux.fsf@stark.xeocode.com> <200502091718.00014.chris.kratz@vistashare.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