Re: trace_checkpoint parameter patch - Mailing list pgsql-patches

From Greg Smith
Subject Re: trace_checkpoint parameter patch
Date
Msg-id Pine.GSO.4.64.0706121309370.16104@westnet.com
Whole thread Raw
In response to trace_checkpoint parameter patch  (Satoshi Nagayasu <snaga@snaga.org>)
List pgsql-patches
On Tue, 12 Jun 2007, Satoshi Nagayasu wrote:

> Here is a brand new patch to log a checkpointing load information
> to tune the bgwriter parameter.

There is a work in progress patch that logs this and additional checkpoint
information being reviewed in hopes of making it into the 8.3 build.  See
http://archives.postgresql.org/pgsql-patches/2007-05/msg00455.php for the
latest version.

The idea of using pg_rusage_init is a new one though; I hadn't thought the
CPU usage info was interesting enough to figure out how to collect it.
The way the patch mentioned above works it would be hard to squeeze it in
the line usefully for formatting reasons.

> I attempted to print block in / out using getrusage(), but I couldn't
> get them because they were always zero (on my linux).

I don't know what's wrong, but the I/O here is pretty simple:  the
checkpoint wrote some amount of data that you can compute the size of
easily within the code knowing the block size.  That's already done in the
patch under review.

If you're interested in this area, you should check out the
pg_stat_bgwriter feature already in the 8.3 CVS, look through the
pgsql-hackers archives for the discussion this week on the topic
"Controlling Load Distributed Checkpoints", and check out the "Automatic
adjustment of bgwriter_lru_maxpages" patch whose latest version is at
http://archives.postgresql.org/pgsql-patches/2007-05/msg00142.php

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Two aesthetic bugs in the 1-byte packed varlena code
Next
From: Gregory Stark
Date:
Subject: Re: Two aesthetic bugs in the 1-byte packed varlena code