I just noticed that we're using this library for fetching max available mem:
|
memInfo, _ := psutil.VirtualMemory() |
in the source code, it use procfs to get meminfo:
https://github.com/shirou/gopsutil/blob/c95f835cd977d7aa68f61d7ea06e452cac789927/mem/mem_linux.go#L34
in a container, the procfs does NOT represent the resources in cgroupfs.
I just noticed that we're using this library for fetching max available mem:
memStress/main.go
Line 117 in 6583ea9
in the source code, it use procfs to get meminfo:
https://github.com/shirou/gopsutil/blob/c95f835cd977d7aa68f61d7ea06e452cac789927/mem/mem_linux.go#L34
in a container, the procfs does NOT represent the resources in cgroupfs.