Skip site navigation (1) Skip section navigation (2)

Re: stats collector suddenly causing lots of IO

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chris <lists(at)deksai(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: stats collector suddenly causing lots of IO
Date: 2010-04-16 15:29:47
Message-ID: 9857.1271431787@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Chris <lists(at)deksai(dot)com> writes:
> After the file was made larger and I stopped the vacuum process, I started
> seeing the problem.  All other postgress processes were quiet, but the stats
> collector was constantly causing anywhere from 20-60 of the IO on the server.
> Since all the other postgres processes weren't really doing anything, and it is
> a busy web server which is predominately MySQL, I'm fairly curious as to what
> it is doing.

Yeah, the stats collector rewrites the stats file every half second, if
there have been any changes since last time --- so the bigger the file,
the more overhead.  (8.4 is smarter about this, but that doesn't help
you on 8.3.)

> I straced the stats collector process.  I wasn't sure what else to trace as
> there wasn't a single other postgres process doing anything.

That strace doesn't really prove much; it's what I'd expect.  Here's
what to do: start a PG session, and strace that session's backend *and*
the stats collector while you manually do VACUUM some-small-table.
The VACUUM command should try to send some messages to the stats collector
process.  I'm wondering if those get dropped somehow.

			regards, tom lane

In response to

Responses

pgsql-performance by date

Next:From: Josh KupershmidtDate: 2010-04-16 15:30:27
Subject: Re: stats collector suddenly causing lots of IO
Previous:From: Tom LaneDate: 2010-04-16 15:23:52
Subject: Re: stats collector suddenly causing lots of IO

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group