-
-
Notifications
You must be signed in to change notification settings - Fork 443
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
Consider adding option to hide irrelevant CPU and RAM stats inside container #1538
Comments
What containerization solution are you using? |
The containers are allocated with web ui of certain proprietary cluster management system, but the underlying containers are most likely managed by docker with NVIDIA Container Toolkit. Cgroup v1 is used, and I could check |
The cgroup stuff seems to be quite messy still cf. kubernetes/kubernetes#119669 . |
It shows
Or, if universal support is difficult at the moment, is it practical to add two customizable meters:
|
if you have both lxc and lxcfs,
|
ps if lxcfs is enabled and the kernel is running cgroups v1 (eg running an old kernel, or running a modern kernel with parameters |
Inside containers hosted on a server with a lot of cores and RAM, with the actual core and RAM limit constrained via cgroup settings (cpuset and memory), the htop's CPU and RAM meters are quite unhelpful, in the sense that it could not reflect the container's actual situation (and sometimes even annoying when the terminal size is small, leaving no space for processes). In my case, the server has 2x Intel(R) Xeon(R) Platinum 8480+ (224 threads) and 2TiB memory, but the container is limited to 16 threads and 32GiB memory.
This two constraints can be queried via
/sys/fs/cgroup/cpuset/cpuset.cpus
and/sys/fs/cgroup/memory/memory.limit_in_bytes
for cgroup v1/sys/fs/cgroup/cpuset.cpus
and/sys/fs/cgroup/memory.max
for cgroup v2Ideally, htop could provide container-aware option such that only the core utilization within the cpuset, and the actual memory limit (and usage) is displayed.
The text was updated successfully, but these errors were encountered: