Hey All,
I have a question regarding the relationship between GOMAXPROCS and cgroup CPU quota restriction since I haven't found any result in this forum.
Scenario:
- we are running multiple containers with cgroup restriction on the same machine.
- Machine has M number of logical CPU cores
- each container would have roughly N cores of computation resource allocated (N <= M). Restriction is applied with cpu.cfs_quota_us and cpu.cfs_period_us. And container would get throttled if they exceed the allocated resources.
- all containers still see M as number of CPU cores
Question:
- Would this change the assumption of the original default GOMAXPROCS setting (M) for containers?
-- if so, should we set N as the new "default" GOMAXPROCS, and what is the reason behind this? And is it reasonable to ask golang to read from cgroup setting instead for default value?
Any feedback is appreciated!