-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Clickhouse doesn't respect cgroup limits #2261
Copy link
Copy link
Closed
Labels
Description
Currently getNumberOfPhysicalCPUCores doesn't respect if CK is run inside of a docker container / cgroup. It will return the actual amount of cores on the host instead of the limited amount
Which I'm guessing means CK sizes thread pools etc to use all CPUs instead of the allocated amount
Suggested would be to read /sys/fs/cgroup/cpu/cpu.cfs_quota_us if > -1 and divide by 1000 and round up to closest integer
For memory CK could read /sys/fs/cgroup/memory/memory.limit_in_bytes if available
Reactions are currently unavailable