-
Notifications
You must be signed in to change notification settings - Fork 814
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
High CPU Load and intermediate image count failure #1342
Comments
Hi @sukrit007 , Can you try to use the A big list of images may take longer than the default timeout (5 seconds). |
In theory I think that should get rid of timeouts. However, this call seems a bit expensive when used with all=true parameter. (results in CPU spikes). Wondering if this can be made configurable. Ideally I would have hoped docker to provide api to publish the counts. But intermediate image layers might not have much relevance. So would prefer to turn it off. |
Fixes #1342. We should always cast boolean options from the config with the `_is_affirmative` tool, otherwise you're exposed to oddities like bool('false') == True. This introduces a new option `collect_images_stats` that is enabled by default and skips the collection of metrics `docker.images.available` and `docker.images.intermediate` that sometimes is very slow through docker API if you have a lot of intermediate layer images.
Is there easy way to install from latest source ? |
This will be part of the Agent 5.2, which will be release this month. But the packages and the container will be upgraded together. But if you can't wait, you can put a modified version of the docker check into You can copy the check and remove this line https://github.com/DataDog/dd-agent/blob/5.1.x/checks.d/docker.py#L130 |
Thanks. for now I have created a customized docker image and commented the line you mentioned: https://github.com/totem/dd-agent/blob/master/Dockerfile#L4 Note: I had to modify file:
CPU load is much better as compared to before. I will investigate to see if i run into anything else. Thanks for quick turnaround. |
When there are lot of intermediate docker images, the following line leads to high cpu utilization by docker daemon:
https://github.com/DataDog/dd-agent/blob/5.1.x/checks.d/docker.py#L150
Also the call fails due to timeout .
Can we make intermediate image counter configurable (and turn it off by default ?).
Env Info:
Docker version:
Docker version 1.4.1, build 5bc2ff8-dirty
Agent Image:
datadog/docker-dd-agent:latest image-id: 8f65aeca1481
The text was updated successfully, but these errors were encountered: