When using the exec2 driver with Go 1.25+ services, the Go runtime fails to auto-detect cgroup CPU quotas, defaulting instead to the total host core count. This occurs even when /sys/fs/cgroup and /proc are unveiled.
Observed Behavior
In Go 1.25, the runtime natively attempts to discover CPU limits via cgroup v2. However, inside an exec2 task, the process is placed in a new cgroup namespace.
/proc/self/cgroup reports the process is at the cgroup root (0::/).
Go runtime is not picking up the allocation's actual slice limit (nomad.slice/alloc-.../cpu.max), it defaults to the number of host cores causing overthreading.
Nomad v1.10.4
Go 1.25
When using the exec2 driver with Go 1.25+ services, the Go runtime fails to auto-detect cgroup CPU quotas, defaulting instead to the total host core count. This occurs even when /sys/fs/cgroup and /proc are unveiled.
Observed Behavior
In Go 1.25, the runtime natively attempts to discover CPU limits via cgroup v2. However, inside an exec2 task, the process is placed in a new cgroup namespace.
/proc/self/cgroup reports the process is at the cgroup root (0::/).
Go runtime is not picking up the allocation's actual slice limit (nomad.slice/alloc-.../cpu.max), it defaults to the number of host cores causing overthreading.
Nomad v1.10.4
Go 1.25