Closed ningziwen closed 1 week ago
In docker, when memory limit is not set, the daemon (maintains and) returns the total memory of the machine (by reading /proc/meminfo
). So the client don't need extra logic or interact with system info like /proc/meminfo
.
I remember the limit is only shown in unix/linux, not windows.
Seems containerd only set the limit when it's set by a user. If we want the sam behavior, should we follow the same pattern and let containerd matains and returns the system memory as limit, or nerdctl
should take care of this?
In docker, when memory limit is not set, the daemon (maintains and) returns the total memory of the machine (by reading
/proc/meminfo
). So the client don't need extra logic or interact with system info like/proc/meminfo
.I remember the limit is only shown in unix/linux, not windows.
Seems containerd only set the limit when it's set by a user. If we want the sam behavior, should we follow the same pattern and let containerd matains and returns the system memory as limit, or
nerdctl
should take care of this?
This should be fixed on the API side (containerd) to keep considtency with other consumer (e.g ctr..). Here we are just consuming metrics returned by API
/assign 🙋♂️
The line to change in cgroup v2: https://github.com/containerd/cgroups/blob/fc3b020f386da06f1facfddef993420644875926/cgroup2/utils.go#L253
Seems containerd only set the limit when it's set by a user. If we want the sam behavior, should we follow the same pattern and let containerd matains and returns the system memory as limit, or nerdctl should take care of this?
Do we want the same behavior? How about showing NA
since there are technically no limits?
Seems containerd only set the limit when it's set by a user. If we want the sam behavior, should we follow the same pattern and let containerd matains and returns the system memory as limit, or nerdctl should take care of this?
Do we want the same behavior? How about showing
NA
since there are technically no limits?
The output should be same as Docker unless there is a specific reason
Decision discussion in cgroup draft PR. https://github.com/containerd/cgroups/pull/265#issuecomment-1418250556
This was resolved recently
Description
When running nerdctl stats without a memory limit on a container, nerdctl is reporting the limit as exbibyte level.
There is one issue related to this in finch repo.
I successfully reproduced this with nerdctl in ubuntu by building from source.
My ubuntu host has 8GB memory.
Steps to reproduce the issue
Describe the results you received and expected
In my 8GB memory ubuntu host, Received:
Expected:
What version of nerdctl are you using?
Are you using a variant of nerdctl? (e.g., Rancher Desktop)
None
Host information