Re: From pgsql-general: Huge number of disk writes after migration to 8.1 - Mailing list pgsql-bugs

From Tom Lane
Subject Re: From pgsql-general: Huge number of disk writes after migration to 8.1
Date
Msg-id 20510.1137525987@sss.pgh.pa.us
Whole thread Raw
In response to From pgsql-general: Huge number of disk writes after migration to 8.1  (Marcin <migor@op.pl>)
List pgsql-bugs
Marcin <migor@op.pl> writes:
> After migration from 8.0.3 to 8.1.2 I noticed huge increase in number of
> bytes written to disk. I think it's caused by stats collector process,
> but I may be wrong.

The strace output shows that the collector is writing about 8.5MB to the
stats display file on each cycle.  That seems like rather a lot :-(.
A quick comparison of the 8.0 and HEAD versions of pgstats says that the
8.1 file format should be slightly bulkier than 8.0, but not a lot so.

The first theory that comes to mind is that 8.1 is somehow failing to
discard dead table entries and continues to write them when no longer
needed.

Could you send me the following data (off-list since we know it will be
several meg):

* A copy of $PGDATA/global/pgstat.stat (note this file is rewritten
every half second, so copy it before you start packing it into a
message)

* The output of "ps auxww | grep postgres", taken at the same time you
copy pgstat.stat (or as close as you can easily get, anyway).

This does not need to be done under particularly heavy load, in fact
light load would be better since it'd be more obvious if there are
too many backend entries.

Thanks!

            regards, tom lane

pgsql-bugs by date:

Previous
From: Marcin
Date:
Subject: From pgsql-general: Huge number of disk writes after migration to 8.1
Next
From: Tom Lane
Date:
Subject: Re: Huge number of disk writes after migration to 8.1