postgresql/src/backend/storage
Tom Lane 5461564a9d Reduce idle power consumption of walwriter and checkpointer processes.
This patch modifies the walwriter process so that, when it has not found
anything useful to do for many consecutive wakeup cycles, it extends its
sleep time to reduce the server's idle power consumption.  It reverts to
normal as soon as it's done any successful flushes.  It's still true that
during any async commit, backends check for completed, unflushed pages of
WAL and signal the walwriter if there are any; so that in practice the
walwriter can get awakened and returned to normal operation sooner than the
sleep time might suggest.

Also, improve the checkpointer so that it uses a latch and a computed delay
time to not wake up at all except when it has something to do, replacing a
previous hardcoded 0.5 sec wakeup cycle.  This also is primarily useful for
reducing the server's power consumption when idle.

In passing, get rid of the dedicated latch for signaling the walwriter in
favor of using its procLatch, since that comports better with possible
generic signal handlers using that latch.  Also, fix a pre-existing bug
with failure to save/restore errno in walwriter's signal handlers.

Peter Geoghegan, somewhat simplified by Tom
2012-05-08 20:03:26 -04:00
..
buffer Rename I/O timing statistics columns to blk_read_time and blk_write_time. 2012-04-29 18:13:33 -04:00
file Lots of doc corrections. 2012-04-23 22:43:09 -04:00
freespace Further corrections from the department of redundancy department. 2012-05-02 11:11:25 -04:00
ipc Further corrections from the department of redundancy department. 2012-05-02 11:11:25 -04:00
large_object Extend object access hook framework to support arguments, and DROP. 2012-03-09 14:34:56 -05:00
lmgr Reduce idle power consumption of walwriter and checkpointer processes. 2012-05-08 20:03:26 -04:00
page Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
smgr Publish checkpoint timing information to pg_stat_bgwriter. 2012-04-05 14:04:37 -04:00
Makefile Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00