extensions icon indicating copy to clipboard operation
extensions copied to clipboard

Fix resource detection for unset CPU and memory limits in cgroup v2

Open mobratil opened this issue 1 year ago • 0 comments

Address the issue where /sys/fs/cgroup/cpu.max and /sys/fs/cgroup/memory.max report "max", indicating unset limits in cgroup v2.

Changes Made:

  • When /sys/fs/cgroup/cpu.max reads "max", the number of CPU cores is now derived from the host's /proc/stat file.
  • Similarly, available memory is determined from the host's /proc/meminfo file if /sys/fs/cgroup/memory.max contains "max".
Microsoft Reviewers: Open in CodeFlow

mobratil avatar Jul 04 '24 14:07 mobratil