Memory, admission and parallelism
Shared cache budget, working capacity and the relationship between concurrency and read workers.
Cache budget and process memory
The cache is an instance-wide budget shared across databases and read processes. Capacity planning distinguishes resident pages, aggregation state, sorting, dimension builds and result serialization. --cache-mb controls the configured cache budget; total process memory also includes these other allocations. Reserve headroom for the operating system, Studio and colocated applications.
Memory budgets and caches
--cache-mb configures the instance cache budget, default 256 MiB at CLI startup; it is not a cap on total process/machine memory. The budget is divided among coordinator and readers. Workspace, HTTP envelopes and Python objects add costs. Coordinator cache counters are not a sum across all processes.
Page, column/vector, aggregate-state and exact-result caches have different roles. Snapshot-bound result caching can avoid reads entirely. Writes and snapshot changes govern reuse; do not assume an old result remains reusable after changes.
Read-process selection
Without --query-workers, Core considers available CPUs, process/container restrictions and memory budget, capped at 64 read processes. Small budgets reduce the effective count. The configured count is a pool, not a guarantee of using every reader for every query. --query-workers 0 runs without separate read processes.
Eligible operators include full/filtered scans, vector and exact-DISTINCT aggregates, some join aggregates, index aggregates and top-k. Coordination costs, input size and available readers affect selection. Two joined tables do not require two cores; a client-throttled export may use little CPU.
Disk spill and safeguards
External sorts, some joins, DISTINCT, derived inputs and aggregates may use private temporary files. Spill protects some budgets but does not make every calculation unlimited. Extended reducers and specific intermediate forms retain explicit guards. Reserve temporary disk space and investigate budget errors rather than arbitrarily increasing process counts.