Re: patch: improve SLRU replacement algorithm
Greg Stark <stark@mit.edu>
From: Greg Stark <stark@mit.edu>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>, pgsql-hackers@postgresql.org
Date: 2012-04-04T22:22:46Z
Lists: pgsql-hackers
On Wed, Apr 4, 2012 at 9:34 PM, Simon Riggs <simon@2ndquadrant.com> wrote: > Why is this pgbench run accessing so much unhinted data that is > 1 > million transactions old? Do you believe those numbers? Looks weird. I think this is in the nature of the workload pgbench does. Because the updates are uniformly distributed, not concentrated 90% in 10% of the buffers like most real-world systems, (and I believe pgbench only does index lookups) the second time a tuple is looked at is going to average N/2 transactions later where N is the number of tuples. Given a scale factor of 300 that's 15 million transactions. More aggressively hinting other tuples on the page that we have no other business looking at might help, though that would require extra finess to avoid causing extra clog reads. Presumably you would only want to hint other tuples whose xids were in clog pages that were actually in memory currently. -- greg