pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert M. Meyer <rmeyer@installs.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Postgres performance slowly gets worse over a month
Date: Thu, 08 Aug 2002 16:01:06 -0400
Message-ID: <22615.1028836866@sss.pgh.pa.us> (raw)
In-Reply-To: <1028830018.13363.42.camel@skymaster>
References: <1028830018.13363.42.camel@skymaster>

"Robert M. Meyer" <rmeyer@installs.com> writes:
> Back on July 23, I posted on our performance problem.  At that time, I
> got several suggestions about what to do to try to fix it.  Well, it's
> happening again...

Given that you've increased the FSM size *and* are doing a full vacuum
every night (I hope with analyze option as well!), it seems unlikely
that your tables are physically growing --- I suspect there may be an
index growth problem instead.  But you should try to check that.
Try doing

	select relkind,sum(relpages) from pg_class group by relkind;

every so often (preferably just after a vacuum run) to see how the space
totals change over time.

> 1. shut down postgres
> 2. run 'postgres -O -P' to start a single user instantiation of the
> engine
> 3. type 'reindex' to get it to do it
> 4. exit postgres and restart the DB with pg_ctl

IIRC, that only rebuilds indexes on the system tables.  You mentioned
that you'd rebuilt user indexes too --- how did you go about that
exactly?

> We also notice that while the load keeps increasing,
> the actual CPU time is very small.  We'll see loads above 3 with each
> CPU (we have two) sitting with 80%+ idle time.

The load must be all disk I/O then.  Do you have adequate RAM in this
thing?  What have you set shared_buffers to?

More generally, what's your typical query mix?  Have you checked for
inefficient plans on the most common queries?

			regards, tom lane



view thread (31+ messages)  latest in thread

Message-ID: <22615.1028836866@sss.pgh.pa.us>
Permalink:  ../22615.1028836866@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22615.1028836866@sss.pgh.pa.us

 · 

reply

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-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, rmeyer@installs.com
  Subject: Re: Postgres performance slowly gets worse over a month
  In-Reply-To: <22615.1028836866@sss.pgh.pa.us>
  References: <1028830018.13363.42.camel@skymaster> <22615.1028836866@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