Regular disk activity of an idle DBMS

From: Andrej Podzimek <andrej(at)podzimek(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Regular disk activity of an idle DBMS
Date: 2011-05-28 15:02:24
Message-ID: 4DE10E80.7090004@podzimek.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

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. This does not affect performance in any way, but I would like to know whether this is normal. Perhaps I misconfigured something. With the 8.4.x version I used before, there were no such regular disk writes.

I used the following approach to detect who is writing to disk: http://www.xaprb.com/blog/2009/08/23/how-to-find-per-process-io-statistics-on-linux/ This is what I obtained after about 3 minutes of observation:

TASK PID TOTAL READ WRITE DIRTY DEVICES
postgres 10437 10736 0 10736 0 dm-2
md127_raid5 630 648 0 648 0 sdc, sda, sdb, sdd
flush-253:3 29302 553 0 553 0 dm-3
jbd2/dm-2-8 3411 62 0 62 0 dm-2
flush-253:2 3835 35 0 35 0 dm-2
jbd2/dm-3-8 3413 20 0 20 0 dm-3
jbd2/dm-1-8 3409 12 0 12 0 dm-1
flush-253:1 465 11 0 11 0 dm-1
postgres 10434 9 0 9 0 dm-2
jbd2/dm-5-8 789 6 0 6 0 dm-5
postgres 850 4 0 4 0 dm-2
bash 400 4 0 4 0 dm-5
flush-253:5 398 4 0 4 0 dm-5

These are my (non-default) PostgreSQL settings:

# grep -Pv '^[ \t]*#|^[ \t]*$' /var/lib/postgres/data/postgresql.conf
listen_addresses = '::1,2002:53f0:5de8::1,2002:53f0:5de8:1::1,2002:53f0:5de8:2::1,2002:53f0:5de8:3::1,127.0.0.1,83.240.93.232,10.0.1.1,10.0.2.1,10.0.3.1'
max_connections = 128 # (change requires restart)
ssl = on # (change requires restart)
shared_buffers = 512MB # min 128kB
temp_buffers = 64MB # min 800kB
max_prepared_transactions = 128 # zero disables the feature
work_mem = 16MB # min 64kB
maintenance_work_mem = 128MB # min 1MB
max_stack_depth = 16MB # min 100kB
effective_io_concurrency = 3 # 1-1000. 0 disables prefetching
checkpoint_segments = 16 # in logfile segments, min 1, 16MB each
log_destination = 'syslog' # Valid values are combinations of
autovacuum_max_workers = 8 # max number of autovacuum subprocesses
datestyle = 'iso, dmy'
lc_messages = 'cs_CZ.UTF-8' # locale for system error message
lc_monetary = 'cs_CZ.UTF-8' # locale for monetary formatting
lc_numeric = 'cs_CZ.UTF-8' # locale for number formatting
lc_time = 'cs_CZ.UTF-8' # locale for time formatting
default_text_search_config = 'pg_catalog.cs'

The machine runs ArchLinux. It is a standard piece of x86_64 commodity hardware. There are four SATA drives configured as a RAID5 array. The file system is ext4.

Is there an easy way to detect what exactly causes PostgreSQL to write these small amounts of data on an idle machine on a regular basis? Stopping all daemons that connect to PostgreSQL (OpenFire, Apache, Courier-MTA) does not change anything. Any hints would be very helpful. There is actually no performance or usability issue. I just want to *understand* what is going on.

Andrej

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stefan Keller 2011-05-28 19:13:12 How to check a table content efficiently? With LIMIT and OFFSET?
Previous Message Craig Ringer 2011-05-28 11:49:06 Re: Postgres questions