Skip to content
Opensource internals
  • Posts

Clickhouse

ClickHouse's Thread Pool Wakes the Newest Idle Thread and Counts Events Per CPU

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 Without Burning a CPU Slot

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 →

How ClickHouse Spreads Parts Across Disks: the Storage Policy

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 with Fair CPU Slots

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 →

How ClickHouse Runs UNION, INTERSECT and EXCEPT

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 ·