Re: Figuring out shared buffer pressure

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: Figuring out shared buffer pressure
Дата
Msg-id CAMkU=1y5RKO4R-GF07KZBViSR02x096VtucFLw69ffe_-_FMtg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Figuring out shared buffer pressure  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: Figuring out shared buffer pressure  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
On Wed, May 30, 2012 at 11:23 AM, Bruce Momjian <bruce@momjian.us> wrote:
> On Wed, May 30, 2012 at 11:06:45AM -0700, Jeff Janes wrote:
>> On Wed, May 30, 2012 at 10:57 AM, Bruce Momjian <bruce@momjian.us> wrote:
>> > On Wed, May 30, 2012 at 10:38:10AM -0700, Jeff Janes wrote:
>> >>
>> >> Isn't that what the buffers_alloc from pg_stat_bgwriter is ?
>> >
>> > The issue is that once a buffer is removed from the free list, it is
>> > never returned to the free list.
>>
>> A buffer doesn't need to be removed from the linked list in order for
>> buffers_alloc to get incremented.
>
> Seems buffers_alloc is the number of calls to StrategyGetBuffer(), which
> tells how many time we have requested a buffer.  Not sure how that helps
> measure buffer pressure.

Once the linked list is empty, every request for a buffer to read a
new page into must result in the eviction of the previous occupant
from this conceptual freelist buffer (except perhaps for some race
conditions).  Isn't that what you wanted?  Except that the
buffers_alloc does not get incremented when the StrategyGetBuffer is
satisfied by a ring strategy rather than the default strategy.

>
>> Conceptually, the freelist consists not only of the linked list, but
>> also of all unpinned buffers with a usagecount of zero.
>
> True.  I guess my problem is can't find out how many of those
> zero-uage-count buffers are being reclaimed as needed.

Do you need to figure this out specifically in the context of bulk
strategies, or did you just pick a sequential scan because you thought
it would be an easy test case?  When I need to generate pressure on
the buffer cache, I use pgbench -S.

Cheers,

Jeff


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Sergey Koposov
Дата:
Сообщение: Re: 9.2beta1, parallel queries, ReleasePredicateLocks, CheckForSerializableConflictIn in the oprofile
Следующее
От: Robert Haas
Дата:
Сообщение: Re: FailedAssertion("!(PrivateRefCount[i] == 0)", File: "bufmgr.c", Line: 1741