Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load incorrect memory size, should use cgroupfs instead of procfs #8

Open
STRRL opened this issue Dec 10, 2024 · 1 comment
Open

load incorrect memory size, should use cgroupfs instead of procfs #8

STRRL opened this issue Dec 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@STRRL
Copy link
Member

STRRL commented Dec 10, 2024

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.

@STRRL STRRL added the bug Something isn't working label Dec 10, 2024
@STRRL
Copy link
Member Author

STRRL commented Dec 10, 2024

related issue: chaos-mesh/chaos-mesh#4547

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant