Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

page_cache_* session settings

These settings are available in system.settings and are autogenerated from source.

page_cache_block_size

Type
UInt64
Default
1048576
Version history
VersionDefault valueComment
25.51048576Made this setting adjustable on a per-query level.

Size of file chunks to store in the userspace page cache, in bytes. All reads that go through the cache will be rounded up to a multiple of this size.

This setting can be adjusted on a per-query level basis, but cache entries with different block sizes cannot be reused. Changing this setting effectively invalidates existing entries in the cache.

A higher value, like 1 MiB is good for high-throughput queries, and a lower value, like 64 KiB is good for low-latency point queries.

page_cache_inject_eviction

Type
Bool
Default
0
Version history
VersionDefault valueComment
24.30Added userspace page cache

Userspace page cache will sometimes invalidate some pages at random. Intended for testing.

page_cache_lookahead_blocks

Type
UInt64
Default
16
Version history
VersionDefault valueComment
25.516Made this setting adjustable on a per-query level.

On userspace page cache miss, read up to this many consecutive blocks at once from the underlying storage, if they’re also not in the cache. Each block is page_cache_block_size bytes.

A higher value is good for high-throughput queries, while low-latency point queries will work better without readahead.

page_cache_max_coalesced_bytes

Type
UInt64
Default
16777216
Version history
VersionDefault valueComment
26.516777216New setting to bound the size of a single coalesced read used to populate the userspace page cache on cache miss.

When readBigAt populates the userspace page cache, consecutive cache misses are coalesced into a single read from the underlying storage. This setting bounds the size of one coalesced read in bytes; longer miss runs are split into multiple reads. It limits transient memory usage of the temporary buffer under parallel cold reads.

A higher value reduces the number of HTTP requests for cold scans on object storage; a lower value reduces peak transient memory.

Navigation