v.22.2Improvement
Respect cgroups limits in max_threads autodetection
Why it matters
This feature ensures that ClickHouse correctly limits the maximum number of threads used based on the resource constraints defined by cgroups. It solves the problem of ignoring cgroups restrictions, which could lead to overconsumption of CPU resources and degrade performance on containerized or resource-limited environments.How to use it
This behavior is applied automatically when running ClickHouse in environments with cgroups configured. Users do not need to manually enable anything; themax_threads setting will autodetect and respect cgroups limits by default.