Re: patch for new feature: Buffer Cache Hibernation

From: Greg Stark <stark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Cédric Villemain <cedric(dot)villemain(dot)debian(at)gmail(dot)com>, Mitsuru IWASAKI <iwasaki(at)jp(dot)freebsd(dot)org>, greg <greg(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: patch for new feature: Buffer Cache Hibernation
Date: 2011-10-16 17:57:59
Message-ID: CAM-w4HN6A1QvP=-OX0_nzCNKDzDoRfOPPk6rEiTnu-eaLGBMpQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Oct 14, 2011 at 4:29 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Right.  I think this one falls into my class #2, ie, we have no idea how
> to implement it usefully.  Doesn't (necessarily) mean that the core
> concept is without merit.

Hm. given that we have an implementation I wouldn't say we have *no*
clue. But there are certainly some parts we don't have consensus yet
on. But then working code sometimes trumps a lack of absolute
consensus.

But just for the sake of argument I'm not sure that the implementation
of dumping the current contents of the buffer cache is actually
optimal. It doesn't handle resizing the buffer cache after a restart
for example which I think would be a significant case. There could be
other buffer cache algorithm parameters users might change -- though I
don't think we really have any currently.

If we had --to take it to an extreme-- a record of every buffer
request prior to the shutdown then we could replay that log virtually
with the new buffer cache size and know what buffers the new buffer
cache size would have had in it.

I'm not sure if there's any way to gather that data efficiently, and
if we could if there's any way to bound the amount of data we would
have to retain to anything less than nigh-infinite volumes, and if we
could if there's any way to limit that has to be replayed on restart.
But my point is that there may be other more general options than
snapshotting the actual buffer cache of the system shutting down.

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2011-10-16 18:04:08 Re: Underspecified window queries in regression tests
Previous Message Jeff Davis 2011-10-16 17:51:09 (patch) regression diffs on collate.linux.utf8 test