You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TPCH 1T OOM on 16 GiB CN: fix spill thresholds and cgroup memory detection #24327
Running TPCH 1T (scale factor 1000) on a 3-CN cluster with 16 GiB memory per CN causes OOM kills. The root causes are:
Incorrect memory detection in containers: system.MemoryTotal() returns host memory (62G) instead of cgroup limit (16G) when the container uses tini (pid != 1), causing mpool.GlobalCap to be set to ~47G — far exceeding the actual container budget.
HashBuild spill thresholds too loose: Per-operator spill threshold was derived from the inflated GlobalCap, allowing individual hash builds to accumulate too much data before spilling.
GroupBy spill inefficiency: GroupBy spill threshold was too tight (causing excessive expensive serialize/deserialize cycles on Q17), and hash table rebuild on spill reload did not pre-size — leading to O(log N) resize overhead.
GroupBy spill reload panic: PreAllocateGroups with hints > AggBatchSize created multi-chunk state arrays, but GroupGrow filled from the last chunk while getXY indexed from chunk 0, causing BatchMerge to panic with "index out of range [0] with length 0" on Q18/Q20.
Activity