ClickHouse's Thread Pool Wakes the Newest Idle Thread: Per-CPU Counters on Padded Cache Lines
ClickHouse’s thread pool wakes the most recently idle thread, and its counters are sharded per CPU so that counting never costs a cache-line ping-pong.
ClickHouse’s thread pool wakes the most recently idle thread, and its counters are sharded per CPU so that counting never costs a cache-line ping-pong.
ClickHouse’s throttler is a token bucket that sleeps for the token deficit and parks the caller’s CPU lease so the wait need not consume concurrency budget.
ClickHouse places parts with a three-level reserve ladder: policy → volume → disk, with per-volume part-size limits and TTL-driven moves.
ClickHouse shares a global CPU-slot budget between queries with a max-min-fair scheduler, where each query’s slot ceiling is mutable and raised only when the pipeline finds real …
UNION ALL merges streams, UNION DISTINCT adds a hash DISTINCT with a self-abandoning preliminary pass, and INTERSECT/EXCEPT filter the left side through a set of the right.