Re: Clock sweep not caching enough B-Tree leaf pages?

Stephen Frost <sfrost@snowman.net>

From: Stephen Frost <sfrost@snowman.net>
To: Merlin Moncure <mmoncure@gmail.com>
Cc: Andres Freund <andres@2ndquadrant.com>, Heikki Linnakangas <hlinnakangas@vmware.com>, Greg Stark <stark@mit.edu>, Robert Haas <robertmhaas@gmail.com>, Peter Geoghegan <pg@heroku.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2014-04-17T19:00:07Z
Lists: pgsql-hackers
* Merlin Moncure (mmoncure@gmail.com) wrote:
> I doubt that's necessary though -- if the postgres caching algorithm
> improves such that there is a better tendency for hot pages to stay in
> s_b,  Eventually the O/S will deschedule the page for something else
> that needs it.   In other words, otherwise preventable double
> buffering is really a measurement of bad eviction policy because it
> manifests in volatility of frequency accessed pages.

I wonder if it would help to actually tell the OS to read in buffers
that we're *evicting*...  On the general notion that if the OS already
has them buffered then it's almost a no-op, and if it doesn't and it's
actually a 'hot' buffer that we're gonna need again shortly, the OS will
have it.

In other words, try to make the OS more like a secondary cache to ours
by encouraging it to cache things we're evicting.

	Thanks,
		
		Stephen

Commits

  1. Replace the BufMgrLock with separate locks on the lookup hashtable and