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

Docker memory usage is incorrect #2637

Closed
Feriman22 opened this issue Dec 31, 2023 · 5 comments · Fixed by #2745
Closed

Docker memory usage is incorrect #2637

Feriman22 opened this issue Dec 31, 2023 · 5 comments · Fixed by #2745

Comments

@Feriman22
Copy link

Describe the bug
Docker memory usage is incorrect, while comparing the glances and the docker stats command at the same time.

To Reproduce
Steps to reproduce the behavior:

  1. Open Glances webUI
  2. Run the docker stats command
  3. Compare the memory usage of any docker container

Expected behavior
It should be the same or very similar.

Screenshots
glances

Environement (please complete the following information)

  • Operating System: Debian 12, Docker image from nicolargo/glances (latest)
  • Glances & psutil versions: v3.4.0.3
  • How do you install Glances: Docker
@nicolargo
Copy link
Owner

Glances displays the stats returned by the https://github.com/docker/docker-py library.

image

As you can see in this screenshot, the Glances value (1.55 MB is ~ to the one given by Docker-Py 1.6 MB). Do not know what is the value returned by "docker stats"...

@nicolargo
Copy link
Owner

I just open an issue on the upper lib: docker/docker-py#3210

@nicolargo nicolargo added the dependencies Pull requests that update a dependency file label Jan 2, 2024
@Feriman22
Copy link
Author

Thank you!

@nicolargo
Copy link
Owner

nicolargo commented Jan 2, 2024

Have to algorithm inside Glances because Docker-Py return the stats "as it".

So the following computation will be added under the wood: usage - inactive_file.

@nicolargo nicolargo added enhancement breaking change docker and removed needs discussion dependencies Pull requests that update a dependency file labels Jan 2, 2024
@nicolargo
Copy link
Owner

Branch 2637-docker-memory-usage-is-incorrect to be tested and merged into develop.

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

Successfully merging a pull request may close this issue.

2 participants