Re: limiting hint bit I/O

Cédric Villemain <cedric.villemain.debian@gmail.com>

From: Cédric Villemain <cedric.villemain.debian@gmail.com>
To: Bruce Momjian <bruce@momjian.us>
Cc: Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Merlin Moncure <mmoncure@gmail.com>, Jim Nasby <jim@nasby.net>, Kevin Grittner <Kevin.Grittner@wicourts.gov>, Josh Berkus <josh@agliodbs.com>, pgsql-hackers Hackers <pgsql-hackers@postgresql.org>
Date: 2011-02-05T22:04:48Z
Lists: pgsql-hackers
2011/2/5 Bruce Momjian <bruce@momjian.us>:
> Robert Haas wrote:
>> On Sat, Feb 5, 2011 at 10:37 AM, C?dric Villemain
>> <cedric.villemain.debian@gmail.com> wrote:
>> > Please update the commitfest with the accurate patch, there is only
>> > the old immature v1 of the patch in it.
>> > I was about reviewing it...
>> >
>> > https://commitfest.postgresql.org/action/patch_view?id=500
>>
>> Woops, sorry about that.  Here's an updated version, which I will also
>> add to the CommitFest application.
>>
>> The need for this patch has been somewhat ameliorated by the fsync
>> queue compaction patch.  I tested with:
>
> Uh, in this C comment:
>
> +        * or not we want to take the time to write it.  We allow up to 5% of
> +        * otherwise-not-dirty pages to be written due to hint bit changes,
>
> 5% of what?  5% of all buffers?  5% of all hint-bit-dirty ones?  Can you
> clarify this in the patch?
>

The patch currently allow 100 buffers to be written consecutively each
2000 BufferAlloc.
mmmhhh

Robert, I am unsure with the hint_bit_write_allowance counter. It
looks a bit fragile because
nothing prevent  hint_bit_write_allowance counter to increase a lot,
so that is not 100 but X*100 next hint bit will be written. Isn't it ?

Also, won't buffer_allocation_count hit INT limit ?

-- 
Cédric Villemain               2ndQuadrant
http://2ndQuadrant.fr/     PostgreSQL : Expertise, Formation et Support