-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Inaccurate memory reporting in Nomad #5165
Comments
I think this should be fixed in 0.9 because we get those metrics from the Docker API as part of the new driver. |
Track current memory usage, `memory.usage_in_bytes`, in addition to `memory.max_memory_usage_in_bytes` and friends. This number is closer what Docker reports. Related to #5165 .
@endocrimes we haven't had a chance to upgrade to Nomad |
Thanks @ashald |
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. |
Nomad version
Operating system and Environment details
Issue
We noticed this issue only when we moved our workloads to Docker from rkt but I suspect it might be an issue for other drivers as well.
We have a job running
minio
(we also noticed similar issue with number of other services written in Scala and Python) which resource definition stanza looks like (excerpt):What Nomad reports as memory consumption for this process is (excerpt from a call to https://www.nomadproject.io/api/client.html#read-allocation-statistics):
Even if we count in swap we would still see:
which is about 74 mb and that's approximately what we see in Nomad UI as well.
OTOH, Docker shows a completely different value:
Docker on it's own derives memory consumption from cgroups and reports it as
mem.Usage - mem.Stats["cache"]
(https://github.com/docker/cli/blob/master/cli/command/container/stats_helpers.go#L227-L229) which is populated from https://github.com/docker/libcontainer/blob/master/cgroups/fs/memory.go#L127-L164 - in terms of sysfs, given:where:
and:
and
this would look like
which correspond to what Docker shows.
Until we increased memory to our current level we saw
minio
being frequently killed by OOM killer which led us tot an assumption that real memory usage is different from what Nomad reports.It seems that it's also the cause of #4495.
The text was updated successfully, but these errors were encountered: