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

high memory usage #3

Open
lukasmrtvy opened this issue Oct 14, 2023 · 7 comments
Open

high memory usage #3

lukasmrtvy opened this issue Oct 14, 2023 · 7 comments

Comments

@lukasmrtvy
Copy link

lukasmrtvy commented Oct 14, 2023

Hey,
seems that the exporter consuming up to 2.24GiB memory by default

@egvimo
Copy link
Owner

egvimo commented Oct 15, 2023

Hi @lukasmrtvy,
yes, memory is quite high comparing to others, but I think it comes from the apt_info.py script. A single call to this script takes 5 to 7 seconds. And takes up memory. On my cluster the memory is currently at 450 MB.

Not knowing your setup, my first guess would be to change the scrape interval. Mine is on 2 minutes.

@egvimo
Copy link
Owner

egvimo commented Oct 20, 2023

Hi @lukasmrtvy,
I've replaced the whole web stack of the exporter. Can you try again with the new version?

@lukasmrtvy
Copy link
Author

Hi, with 7d scrape interval its 112.8MiB on 0.2.1, previous version was ~50MiB

@egvimo
Copy link
Owner

egvimo commented Oct 21, 2023

I've replaced everything and added cache.close() to the apt_info.py script.

With my previous version the container got OOM killed and restarted (I've set a memory limit to the container). With this new version it's the same.

I have no idea what I can change to prevent the memory increase. It has to be the apt_info.py script, because this is the only common code with these two versions.

@lukasmrtvy
Copy link
Author

@egvimo
Copy link
Owner

egvimo commented Oct 22, 2023

I've updated the script with the changes from the pull request, but it seems that this was not the cause for the OOM.

@egvimo
Copy link
Owner

egvimo commented Mar 1, 2024

With the latest release it looks like the memory is now stable. @lukasmrtvy can you please test?

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