ClickHouse Batches Memory Accounting Per Thread
ClickHouse does not charge the memory tracker on every allocation; each thread batches up to 4 MiB locally.
ClickHouse does not charge the memory tracker on every allocation; each thread batches up to 4 MiB locally.
ClickHouse charges every allocation to a chain of memory trackers — global, user, query, thread.
ClickHouse replaces operator new and interposes the libc malloc symbols so every allocation is charged.