Skip to content
Opensource internals
  • Posts

Clickhouse

ClickHouse's Thread Pool Wakes the Newest Idle Thread: Per-CPU Counters on Padded Cache Lines

Oct 17, 2026 19 min read Jay Hubbert

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.

ClickhouseConcurrencyInternalsPerformanceThread pool

Read more →

ClickHouse's Token-Bucket Throttler Sleeps for the Deficit and Parks the CPU Lease

Oct 17, 2026 16 min read Jay Hubbert

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.

ClickhouseInternalsPerformanceIoThrottling

Read more →

ClickHouse's Storage Policy Places Parts by Refusal: Big Parts Skip the Fast Tier

Oct 17, 2026 11 min read Jay Hubbert

ClickHouse places parts with a three-level reserve ladder: policy → volume → disk, with per-volume part-size limits and TTL-driven moves.

ClickhouseInternalsStorageDisksMergetree

Read more →

ClickHouse Shares a CPU Budget Between Queries: A Slot Ceiling Each Query Can Raise

Oct 17, 2026 20 min read Jay Hubbert

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 …

ClickhouseConcurrencyInternalsSchedulingPerformance

Read more →

ClickHouse Plans UNION, INTERSECT and EXCEPT Three Ways: A Preliminary DISTINCT That Can Give Up

Oct 17, 2026 14 min read Jay Hubbert

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.

ClickhousePerformanceInternalsSet operationsDistinct

Read more →

← Newer Page 15 of 21 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·