-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Cadvisor high cpu and memory fix #288
base: master
Are you sure you want to change the base?
Conversation
@razem-io You forgot the most important setting discovered in that issue:
Using that one has the biggest impact on CPU usage for me, much more than changing the scrape interval like you did now. |
@kroese funny enough that did not change anything for me. I guess it depends on the individual setup. Do you know what the impact is? Not sure if the labels are used somewhere in the dashboard. I can add it, if does not do much. |
@razem-io It does not change anything in the dashboards, so it wouldn't hurt to use this setting as dock-prom is not using the labels that it generates. Strange that it didnt make any difference in your case. Maybe it depends on the amount of containers for example (I have 70+ running). Or the fact that I collect the data from 3 different remote docker machines over the network, not just from a local instance. But I could see a massive difference in CPU usage after disabling the labels. |
@kroese I added your suggestion to the PR. Sorry, I totally forgot about it. |
@razem-io unfortunately, adding the |
@patrontheo thanks! I reverted the commit. Haven't tested it myself yet. Should have done that before pushing the changes. |
If I am not mistaken, those settings won't affect the current dashboards at all, while reducing CPU usage of cadvisor by a lot. On my test system, the average CPU usage was reduced from ~7% to ~2%.
All the credit goes to this comment: google/cadvisor#2523 (comment)
As a nice side effect, it also seems to reduce the memory needed.