-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Memory Usage of any Allocation is always 0 bytes when using cgroups v2 #12088
Comments
when i restart it shows real stats |
why suddenly it shows 0 and after restarting it starts collecting data |
Hi @AlekseyMelikov. Thanks for using Nomad! I'm sorry you are having issues. Is there any chance you can share your jobspec and agent config(s) with us so we can try to replicate your environment? The host OS/version would be really helpful information too. |
Sorry, a lot of information. I tried to attach everything that seemed important to me. There is no way to attach job specifications yet. But if you really need them to find the problem, let me know. Host 1uname -a
lsb_release -a
ip a
ip r
nft --version
/etc/nftables.conf
/etc/nftables/filter.nft
/etc/nftables/nat.nft
Docker
/etc/docker/daemon.json
Consul
/etc/consul.d/consul.hcl
/etc/consul.d/server.hcl
Nomad
/etc/nomad.d/nomad.hcl
/etc/nomad.d/server.hcl
/etc/nomad.d/client.hcl
/opt/cni/config/netname.conflist
Using patched nftables compatible сni plugin from here Host 2uname -a
lsb_release -a
ip a
ip r
nft --version
/etc/nftables.conf
/etc/nftables/filter.nft
/etc/nftables/nat.nft
Docker
/etc/docker/daemon.json
Consul
/etc/consul.d/consul.hcl
/etc/consul.d/client.hcl
Nomad
/etc/nomad.d/nomad.hcl
/etc/nomad.d/client.hcl
/opt/cni/config/netname.conflist
Using patched nftables compatible сni plugin from here If you need more information let me know. |
Thanks for the extra info @AlekseyMelikov. I believe the problem is that Debian 11 and Docker 20.10 switched to using cgroups v2 by default, which is not yet supported by Nomad. If you need access to these stats you can switch your OS to use cgroups v1. Here are some steps on how to do that: I will leave the issue open for us to double check that this is fixed when v2 support lands in Nomad, but I will edit a bit to reflect that. |
Thank you @lgfa29, this solution worked. All I did:
|
I believe this should be fixed in v1.3 (coming soon!) which adds support for cgroups v2. Feel free to re-open if things are still mis-behaving with Nomad v1.3 |
Edit: sorry actually this is still broken, e.g.
|
I was looking at an alloc not doing anything; these values seem to be reporting fine 🤦 |
it fixes the problem |
I can confirm that the stats reported by
I don't think enabling CGroups v1 (which is what adding cc @shoenig |
I am also seeing this on 1.3.1. I can see memory usage being sent in the chrome debugger network tab, although many of the other memory related fields are blank.
nomad alloc status output for same: Task Resources |
Can confirm I'm also able to see the memory usage with I'm guessing this is a separate issue related to the UI itself though, probably needing to fall back to the key that's available if cgroups v2 is in use |
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
I am having this issue now. I don’t remember when it appeared, but I remember that the problem was still in the versions:
I have now updated to
but the problem persists.
Description of the problem - Memory Usage of any Allocation is always 0 bytes
Host Resource Utilization is showing correctly
docker stats
cat /proc/cgroups
Nomad logs
Consul logs
The text was updated successfully, but these errors were encountered: