unusual performance for vac following 8.2 upgrade

From: Kim <kim(at)myemma(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: unusual performance for vac following 8.2 upgrade
Date: 2007-01-11 17:20:13
Message-ID: 45A671CD.1050706@myemma.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

Hello all!
Running a vac on an 8.2 client connecting to an 8.2 database (following
example was for a 14 row static table) - vacuums will sit (for lack of a
better word) for anywhere from ten to twenty minutes before taking a
lock out on the table and doing work there. Once the vacuum does
complete, I noticed that no timestamp is registered in
pg_stat_all_tables for that relation for the last-vacuum'd timestamp
(however analyze does seem to set it's timestamp). I asked it to run a
vacuum on an index (knowing it would fail out), and again, the vacuum
sat for several minutes before finally erroring out saying that it
couldn't vacuum an index. Out of curiosity I tried the vacuum on an 8.1
client connected to the 8.2 db, same delay.

In running a truss on the process while it is running, there is over
five minutes where the process seems to be scanning pg_class (at least
thats the only table listed in pg_locks for this process). Following
this it drops into a cycle of doing the same send() command with several
seconds lag between each one, and every so often it catches the same
interrupt (SIGUSR1) and then goes back into the same cycle of send()
calls. Also, whatever it is doing during this stage, it isn't checking
for process-cancelled interrupts, as the process won't recognize it's
been requested to cancel until it breaks out of this cycle of send()s
and SIGUSR1s (which can go for another several minutes). I'm happy to
send along the gore of the truss call if you think it would be helpful...

Any ideas what the vac is prepping for that it could become bogged down
in before finally taking the lock on the table?

Is the lack of a timestamp set for last_vacuum in pg_stat_all_tables an
indication that there may be something incomplete about our install?

Since the upgrade, we've also seen unusual lag time in simple inserts
into tables (atomic inserts have been seen running for several seconds),
and also extreme delays in running \d on tables (I got tired of counting
past 2 minutes, connecting with an 8.1 client gives immediate response
on this command). We plan to upgrade to 8.2.1 as soon as possible, and
also to drop into single user mode and run a reindex system, but any
suggestions in the meantime as to a potential cause or a way to further
debug the vacs would be greatly appreciated.

OS: Solaris 10
write transactions/hr: 1.5 million
size of pg_class: 535,226
number of relations: 108,694

Thanks to all,

Kim

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Patrick Earl 2007-01-11 17:21:02 Checkpoint request failed on version 8.2.1.
Previous Message Simon Riggs 2007-01-11 17:08:22 Re: [HACKERS] [PATCHES] Patch to log usage of temporary files

Browse pgsql-performance by date

  From Date Subject
Next Message Russell Smith 2007-01-11 18:07:23 Re: unusual performance for vac following 8.2 upgrade
Previous Message Bernd Helmle 2007-01-11 14:32:56 Re: Partitioning