SHOW_POOL_CACHE(1)
β¨ SHOW_POOL_CACHE β¨
okay bestie, this is a pgpool-II 4.7.2 manual page and it's literally all about peeking at your query cache's stats π lowkey iconic.
π NAME π
SHOW_POOL_CACHE β it shows you the cache storage statistics, no cap π
π¦ SYNOPSIS π¦
SHOW POOL_CACHE
πΈ DESCRIPTION πΈ
So here's the vibe: SHOW POOL_CACHE displays in memory query cache statistics β but only if in memory query cache is enabled. That's the whole point fr fr.
Here's an example session, so you can see exactly what it's giving. And btw, See Table 28, βItems displayed in show pool_cacheβ for a description of each item π
test=# \x
\x
Expanded display is on.
test=# show pool_cache;
show pool_cache;
-[ RECORD 1 ]---------------+---------
num_cache_hits | 891703
num_selects | 99995
cache_hit_ratio | 0.90
num_hash_entries | 131072
used_hash_entries | 99992
num_cache_entries | 99992
used_cache_entries_size | 12482600
free_cache_entries_size | 54626264
fragment_cache_entries_size | 0
Note π«Ά If the cache storage is memcached, values for all columns exceptnum_cache_hits,num_selectsandcache_hit_ratioshow0. That's just how it is, diva.
π Table 28. Items displayed in show pool_cache π
Every single item, bestie, with zero skips:
num_cache_hitsβ The number of hits against the query cache. πnum_selectsβ The number ofSELECTthat did not hit against the query cache.cache_hit_ratioβ The cache hit ratio. Calculated asnum_cache_hits/(num_cache_hits+num_selects).num_hash_entriesβ The number of entries in the hash table used to manage the cache. In order to manage large number of cache Pgpool-II uses the hash table. The number of hash entries is automatically adjusted to the nearest power of two greater thanmemqcache_max_num_cache. For example,100,000, which is the default formemqcache_max_num_cacheis adjusted to131,072(2 to the 17th power). math ate, honestly β¨used_hash_entriesβ The number of used hash entries. If the value approachesnum_hash_entries, it is recommended to increasenum_hash_entries. Even if all the hash table entries are used, no error is raised. However, performance suffers because hash table entries and caches are reused to register new cache entries. πnum_cache_entriesβ The number of cache entries already used. In the current implementation the number should be identical toused_hash_entries.free_cache_entries_sizeβ The size in bytes of the unused cache. As this value approaches0, it removes the registered cache and registers a new cache, which does not cause an error, but reduces performance. Consider to increasememqcache_total_size. not the performance dip bestie π¬fragment_cache_entries_sizeβ The size in bytes of the fragmented cache. When a registered cache is evicted, the space becomes fragmented until the next time that block is reused. Pgpool-II writes cache in fixed-size blocks specified bymemqcache_cache_block_size. When a registered cache is evicted, the space becomes fragmented until the next time that block is reused.fragment_cache_entries_sizedisplays the total size of such fragmented regions. (yes, the original said it twice and we are NOT gatekeeping, we're keeping both πβ¨)
aaaand that's the whole page! π this was pgpool-II 4.7.2, dated 2023, and it's the SHOW POOL_CACHE(1) page β bye bestie, go check your cache stats ππ¦
π¦ where this page comes from
- ubuntu stonking: pgpool2 4.7.2-1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms