Re: Clock sweep not caching enough B-Tree leaf pages?
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Jim Nasby <jim@nasby.net>
Cc: Atri Sharma <atri.jiit@gmail.com>, Bruce Momjian <bruce@momjian.us>,
Peter Geoghegan <pg@heroku.com>, Greg Stark <stark@mit.edu>,
Ants Aasma <ants@cybertec.at>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2014-04-28T13:04:51Z
Lists: pgsql-hackers
On Mon, Apr 21, 2014 at 6:38 PM, Jim Nasby <jim@nasby.net> wrote: >> I feel that if there is no memory pressure, frankly it doesnt matter much >> about what gets out and what not. The case I am specifically targeting is >> when the clocksweep gets to move about a lot i.e. high memory pressure >> workloads. Of course, I may be totally wrong here. > > Well, there's either memory pressure or there isn't. If there isn't then > it's all moot *because we're not evicting anything*. I don't think that's really true. A workload can fit within shared_buffers at some times and spill beyond it at others. Every time it fits within shared_buffers for even a short period of time, the reference count of any buffer that's not ice-cold goes to 5 and we essentially lose all knowledge of which buffers are relatively hotter. Then, when we spill out again, evictions are random. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Replace the BufMgrLock with separate locks on the lookup hashtable and
- 5d5087363d7c 8.1.0 cited