Skip to content
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 is misleading #84

Closed
frol opened this issue Jul 28, 2017 · 5 comments
Closed

Memory usage is misleading #84

frol opened this issue Jul 28, 2017 · 5 comments
Milestone

Comments

@frol
Copy link

frol commented Jul 28, 2017

There was a long-standing bug in Docker stats util (moby/moby#10824), which included caches into the memory usage reporting. While it was fixed recently in Docker 17.06 (docker/cli#80), ctop is still affected by the issue.

I think it is worth porting the new way of memory usage reporting from the docker/cli#80.

@bcicen
Copy link
Owner

bcicen commented Aug 5, 2017

@frol this is a simple enough change to make; however, I believe page cache is still counted toward a containers memory limit. This could cause confusion when diagnosing OOM events.

Perhaps a breakdown of total usage / page cache usage / total limit would be more transparent.

@frol
Copy link
Author

frol commented Aug 5, 2017

Caches are not counted into the memory limit!

@bcicen
Copy link
Owner

bcicen commented Aug 5, 2017

See memory.limit_in_bytes

sets the maximum amount of user memory (including file cache)

@frol
Copy link
Author

frol commented Aug 6, 2017

Well, that only means that the group cannot ever use more than that amount of memory, but the caches are automatically purged once more memory is allocated on heap.

@bcicen bcicen added this to the v0.7 milestone Aug 26, 2017
@bcicen
Copy link
Owner

bcicen commented Aug 26, 2017

In the latest stable kernel and Docker-CE, I still don't see any circumstance where cache pressure and eviction is evaluated at a per-cgroup level; however, this is an issue to bring up with the Docker team.

For consistency, I've omitted cache from memory usage in 55a356b; to be included with the next relase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants