Re: Regular disk activity of an idle DBMS

From: Greg Smith <greg(at)2ndQuadrant(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Regular disk activity of an idle DBMS
Date: 2011-05-29 03:02:59
Message-ID: 4DE1B763.7010102@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 05/28/2011 11:02 AM, Andrej Podzimek wrote:
> after configuring a new home server with PostgreSQL 9.0.4, I observe
> some regular disk activity, even though the server is completely idle
> (disconnected from the network, no users but one logged in). There are
> very short write bursts once in about 3 seconds.

There are a couple of things that can cause unexpected disk activity:

-autovacuum running in the background. Setting
log_autovacuum_min_duration may help you determine when this is happening.
-checkpoint activity. Turning on log_checkpoints, as well as looking
for changes in the pg_stat_bgwriter view, may help explain if this is
the case.
-Hint bit updates. Even if you are only reading from a table, in some
situations write activity can be generated. See
http://wiki.postgresql.org/wiki/Hint_Bits for more information.
-Statistics collector updates. If the one logged in user is doing
anything at all, they might be generating something here.

Figuring out if the writes are happening from a regular PostgreSQL
process, or if they are happening via the background writer, might also
be useful here. Saving the output from "top -b -c" can be useful for
this. The iotop command is very helpful for tracking down this sort of
problem too. The background writer process, which also handles
checkpoints, will have the same process ID once it's started. So will
the statistics collector. If you track I/O to one of those two, it
should narrow possible causes quite a bit.

--
Greg Smith 2ndQuadrant US greg(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Atkins 2011-05-29 03:35:39 Re: timeouts on transactions etc?
Previous Message Darren Duncan 2011-05-29 02:55:54 timeouts on transactions etc?