'\" t .\" Title: SHOW POOL_CACHE .\" Author: The Pgpool Global Development Group .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 2023 .\" Manual: pgpool-II 4.3.7 Documentation .\" Source: pgpool-II 4.3.7 .\" Language: English .\" .TH "SHOW POOL_CACHE" "1" "2023" "pgpool-II 4.3.7" "pgpool-II 4.3.7 Documentation" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" SHOW_POOL_CACHE \- displays cache storage statistics .SH "SYNOPSIS" .sp .nf SHOW POOL_CACHE .fi .SH "DESCRIPTION" .PP \fBSHOW POOL_CACHE\fR displays in memory query cache statistics if in memory query cache is enabled\&. Here is an example session: See Table\ \&26, \(lqItems displayed in show pool_cache\(rq for a description of each item\&. .sp .if n \{\ .RS 4 .\} .nf test=# \ex \ex 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 .fi .if n \{\ .RE .\} .sp .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .PP If the cache storage is memcached, values for all columns except num_cache_hits, num_selects and cache_hit_ratio show 0\&. .sp .5v .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&26.\ \&Items displayed in show pool_cache .TS allbox tab(:); lB lB. T{ Name T}:T{ Description T} .T& l l l l l l l l l l l l l l l l. T{ num_cache_hits T}:T{ The number of hits against the query cache\&. T} T{ num_selects T}:T{ The number of SELECT that did not hit against the query cache\&. T} T{ cache_hit_ratio T}:T{ The cache hit ratio\&. Calculated as num_cache_hits/(num_cache_hits+num_selects)\&. T} T{ num_hash_entries T}:T{ 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 than memqcache_max_num_cache\&. For example, 100,000, which is the default for memqcache_max_num_cache is adjusted to 131,072 (2 to the 17th power)\&. T} T{ used_hash_entries T}:T{ The number of used hash entries\&. If the value approaches num_hash_entries, it is recommended to increase num_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\&. T} T{ num_cache_entries T}:T{ The number of cache entries already used\&. In the current implementation the number should be identical to used_hash_entries\&. T} T{ free_cache_entries_size T}:T{ The size in bytes of the unsed cache\&. As this value approaches 0, it removes the registered cache and registers a new cache, which does not cause an error, but reduces performance\&. Consider to increase memqcache_total_size\&. T} T{ fragment_cache_entries_size T}:T{ 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 by memqcache_cache_block_size\&. When a registered cache is evicted, the space becomes fragmented until the next time that block is reused\&. fragment_cache_entries_size displays the total size of such fragmented regions\&. T} .TE .sp 1