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 for generate metrics #132

Open
Enotze opened this issue Oct 18, 2023 · 0 comments
Open

High memory usage for generate metrics #132

Enotze opened this issue Oct 18, 2023 · 0 comments

Comments

@Enotze
Copy link

Enotze commented Oct 18, 2023

Use promphp/prometheus_client_php version 2.7.1 and APCng

I am use histograms with name 'sdui_component_time_generation_bucket' and labels 'component', 'state_id'
image
Components count is 100
State_id count is 100
Total number of variants 100 * 100 = 10 000
Generated ~ 128 777 rows for histograms
image
And for response with 15.1 MB
image

PHP use 156 MB
image

I think it is because all metrics collect to one array
\Prometheus\Storage\APCng::collect
image

And all samples in one array
\Prometheus\Storage\APCng::collectHistograms
image

I think solution it is use php generator

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

1 participant