Skip to content

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

@STRRL

Description

@STRRL

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions