Re: monitoring usage count distribution
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Nathan Bossart <nathandbossart@gmail.com>, pgsql-hackers@postgresql.org, schneider@ardentperf.com
Date: 2023-04-05T13:44:58Z
Lists: pgsql-hackers
On Tue, Apr 4, 2023 at 7:29 PM Andres Freund <andres@anarazel.de> wrote: > > I'm skeptical that pg_buffercache_summary() is a good idea at all > > Why? It's about two orders of magnitude faster than querying the equivalent > data by aggregating in SQL. And knowing how many free and dirty buffers are > over time is something quite useful to monitor / correlate with performance > issues. Well, OK, fair point. > > but having it display the average usage count seems like a particularly poor > > idea. That information is almost meaningless. > > I agree there are more meaningful ways to represent the data, but I don't > agree that it's almost meaningless. It can give you a rough estimate of > whether data in s_b is referenced or not. I might have overstated my case. > > Replacing that with a six-element integer array would be a clear improvement > > and, IMHO, better than adding yet another function to the extension. > > I'd have no issue with that. Cool. -- Robert Haas EDB: http://www.enterprisedb.com
Commits
-
Add pg_buffercache_usage_counts() to contrib/pg_buffercache.
- f3fa31327ecb 16.0 landed