pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kim <kim@myemma.com>
To: pgsql-performance@postgresql.org
Subject: unusual performance for vac following 8.2 upgrade
Date: Thu, 11 Jan 2007 11:20:13 -0600
Message-ID: <45A671CD.1050706@myemma.com> (raw)

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



view thread (21+ messages)  latest in thread

Message-ID: <45A671CD.1050706@myemma.com>
Permalink:  ../45A671CD.1050706@myemma.com/
Also on:    postgresql.org/message-id/45A671CD.1050706@myemma.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: kim@myemma.com
  Subject: Re: unusual performance for vac following 8.2 upgrade
  In-Reply-To: <45A671CD.1050706@myemma.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