Re: Bgwriter behavior - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Bgwriter behavior
Date
Msg-id 1104451488.3978.249.camel@localhost.localdomain
Whole thread Raw
In response to Re: Bgwriter behavior  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Bgwriter behavior  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
On Mon, 2004-12-27 at 22:21, Bruce Momjian wrote:
> Should we consider at least adjusting the meaning of bgwriter_percent?

Yes. As things stand, this is the only change that seems safe.

Here's a very short patch that implements this change within BufferSync
in bufmgr.c

- No algorithm changes
- No error message changes
- Only change is the call to StrategyDirtyBufferList is made using the
maximum number of buffers that will be cleaned, rather than uselessly
trawling through all of shared_buffers

This changes the meaning of bgwriter_percent from "percent of dirty
buffers" to "percent of shared_buffers". The default settings of 1% of
1000 buffers gives up to 10 dirty block writes every 250ms

Benefit: allows performance tuning by increases options for setting
bgwriter_delay which would otherwise have an ineffectually high minimum
setting

Risk: low

1-line doc patch to follow, if this is approved.

--
Best Regards, Simon Riggs

Attachment

pgsql-hackers by date:

Previous
From: Manfred Koizar
Date:
Subject: Re: Shared row locking
Next
From: Bruce Momjian
Date:
Subject: Re: Bgwriter behavior