BGWriter latch, power saving - Mailing list pgsql-hackers

From Peter Geoghegan
Subject BGWriter latch, power saving
Date
Msg-id CAEYLb_WpVyi+RJDM_7dK-5h5gxhOZ9PMa7h51BUqYb_xamTs9g@mail.gmail.com
Whole thread Raw
Responses Re: BGWriter latch, power saving  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
As part of the ongoing effort to reduce wake-ups when idle/power
consumption, the attached patch modifies the background writer to
hibernate in ten second bursts once the bgwriter laps the clock sweep.
It's fairly well commented, so a description of how it works here
would probably be redundant. The most controversial aspect of this
patch is the fact that it adds a SetLatch() call to MarkBufferDirty(),
though I went to some lengths to ensure that that call will very
probably find the latch already set when it actually matters, so it
only checks a single flag.

Thoughts? I can produce benchmarks, if that helps, but I think it's
fairly unlikely that the patch introduces a measurable performance
regression.

--
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services

Attachment

pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: PL/Perl Does not Like vstrings
Next
From: "Kevin Grittner"
Date:
Subject: Re: 16-bit page checksums for 9.2