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
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
* Greg Smith [EMAIL PROTECTED] http://www.gregsmith.com Baltimore, MD
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend