Re: patch for new feature: Buffer Cache Hibernation

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: patch for new feature: Buffer Cache Hibernation
Дата
Msg-id BANLkTikVqbuBdLe+_7u1inV=n9RkrzeqQQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: patch for new feature: Buffer Cache Hibernation  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: patch for new feature: Buffer Cache Hibernation  (Robert Haas <robertmhaas@gmail.com>)
Re: patch for new feature: Buffer Cache Hibernation  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
On Sun, May 15, 2011 at 11:19 AM, Robert Haas <robertmhaas@gmail.com> wrote:

> I don't think there's any need for this to get data into
> shared_buffers at all.  Getting it into the OS cache oughta be plenty
> sufficient, no?
>
> ISTM that a very simple approach here would be to save the contents of
> each shared buffer on clean shutdown, and to POSIX_FADV_WILLNEED those
> buffers on startup.

Do you mean to save the contents of the buffer pages themselves into a
hibernation file, or to save just the identities (relation/fork/block
number) of the buffers?

In the first case, getting them into the OS cache would not help
because the kernel would not recognize that data as being equivalent
to the block it is a copy of.

In the latter case, wouldn't we just trigger the same inefficient
scattered read of the data that normal database operation would
trigger, taking about the same amount of time to reach cache-warmth?
Or is POSIX_FADV_WILLNEED going to be clever about reordering and
coalescing reads?

Cheers,

Jeff


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

Предыдущее
От: Pavel Golub
Дата:
Сообщение: PQdeleteTuple function in libpq
Следующее
От: Florian Pflug
Дата:
Сообщение: Re: Another issue with invalid XML values