weird performances problem

From: Guillaume Smet <guillaume(dot)smet(at)openwide(dot)fr>
To: pgsql-performance(at)postgresql(dot)org
Subject: weird performances problem
Date: 2005-11-17 17:47:09
Message-ID: 437CC21D.8070402@openwide.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi all,

We are operating a 1.5GB postgresql database for a year and we have
problems for nearly a month. Usually everything is OK with the database,
queries are executed fast even if they are complicated but sometimes and
for half an hour, we have a general slow down.

The server is a dedicated quad xeon with 4GB and a RAID1 array for the
system and a RAID10 one for postgresql data. We have very few
updates/inserts/deletes during the day.

Postgresql version is 7.4.8.

- the database is vacuumed, analyzed regularly (but we are not using
autovacuum) and usually performs pretty well ;
- IOs are OK, the database is entirely in RAM (see top.txt and
iostat.txt attached) ;
- CPUs are usually 25% idle, load is never really growing and its
maximum is below 5 ;
- I attached two plans for a simple query, the one is what we have when
the server is fast, the other when we have a slow down: it's exactly the
same plan but, as you can see it, the time to fetch the first row from
indexes is quite high for the slow query ;
- during this slow down, queries that usually take 500ms can take up to
60 seconds (and sometimes even more) ;
- we have up to 130 permanent connections from our apache servers during
this slow down as we have a lot of apache children waiting for a response.

I attached a vmstat output. Context switches are quite high but I'm not
sure it can be called a context switch storm and that this is the cause
of our problem.

Thanks for any advice or idea to help us understanding this problem and
hopefully solve it.

Regards,

--
Guillaume

Attachment Content-Type Size
iostat.txt text/plain 2.1 KB
plan1.txt text/plain 1.0 KB
plan2.txt text/plain 1.1 KB
top.txt text/plain 791 bytes
vmstat.txt text/plain 665 bytes

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2005-11-17 18:06:55 Re: Strange query plan invloving a view
Previous Message Steinar H. Gunderson 2005-11-17 17:25:11 Re: Help speeding up delete