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

Performance issue #58

Closed
crysis-ps opened this issue Jan 18, 2021 · 4 comments
Closed

Performance issue #58

crysis-ps opened this issue Jan 18, 2021 · 4 comments

Comments

@crysis-ps
Copy link

Hello,
since v 1.2+ version I see the performance drop with loading metrics page.
I have the proxmox cluster with multiple nodes and ~500 VMs.
The metrics page has near 7000 lines.

The 1.1.2 version of pve exporter - the metrics page loads for ~400ms
The 1.2 or v2.0.3 version - the metrics page loads for ~7s

image
image

@znerol
Copy link
Member

znerol commented Jan 18, 2021

There is only one code change between 1.1.2 and 1.2.0: PR #22

The change indeed has potential to slow down scraping on big clusters, since it loops over every guest and fetches the config for each of them which will result in many API calls.

You could remove this line near the end of collector.py:

    registry.register(ClusterNodeConfigCollector(pve))

Then check whether the problem goes away. The only purpose of this collector (as of now) is to extract the onboot flag.

@crysis-ps
Copy link
Author

thank you.
yes, if this line is commented out - the metrics page loads for 300-400ms.

@znerol
Copy link
Member

znerol commented Jan 21, 2021

Ok, thanks for checking. So the best thing would be to make this configurable.

@znerol
Copy link
Member

znerol commented Feb 19, 2021

Published version 2.1.0 to dockerhub and pipy which includes #62. It is now possible to run pve_exporter with the --no-collector.config flag which will deactivate the slow collector.

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