From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
Cc: | Amit Kapila <amit(dot)kapila(at)huawei(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Readme of Buffer Management seems to have wrong sentence |
Date: | 2012-05-23 18:40:08 |
Message-ID: | 8913.1337798408@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Jeff Janes <jeff(dot)janes(at)gmail(dot)com> writes:
> One thing I wanted to play with is having newly read buffers get a
> usage count of 0 rather than 1. The problem is that there is no way
> to test it in enough different situations to convince people it would
> be a general improvement.
Hmm ... ISTM that that was discussed back when we instituted buffer
usage counts, and rejected on the grounds that a newly-read buffer could
then have negligible life expectancy. The clock sweep might be just
about to pass over it. By starting at 1, it's guaranteed to have at
least 1 sweep cycle time in which it might accumulate more hits.
In other words, we have a choice of whether a buffer's initial lifetime
is between 0 and 1 sweep times, or between 1 and 2 sweep times; and the
discrimination against an unlucky buffer position is infinite in the
first case versus at most 2X in the second case.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2012-05-23 18:47:59 | Re: Readme of Buffer Management seems to have wrong sentence |
Previous Message | Amit Kapila | 2012-05-23 18:30:54 | Re: Readme of Buffer Management seems to have wrong sentence |