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

How much memory and how many threads does jmx_exporter itself take up? #860

Closed
KeeProMise opened this issue Jul 27, 2023 · 2 comments
Closed

Comments

@KeeProMise
Copy link

I want to use jmx_exporter and would like to consult How much memory and how many threads does jmx_exporter itself take up?

@dhoard
Copy link
Collaborator

dhoard commented Jul 27, 2023

The core memory usage is very small, but the depends on the number of simultaneous HTTP requests being served and the number of MBeans being monitored (HTTP response size.)

Technical Details

The exporter creates threads to process the inbound HTTP requests - the number of threads is proportional to the number of requests received. Threads age out (exit) after a time period if not used.

Each exporter thread allocates a local ByteArrayOutputStream to store the response before sending it to the client - the ByteArrayOutputStream memory is cached and reused for subsequent requests on the thread. While the thread is alive, the memory will expand to the largest response it has sent, but will not be garbage collected until the thread ages out (exits.)

@dhoard
Copy link
Collaborator

dhoard commented Aug 13, 2023

With the 0.20.0 release, the exporters default to a maximum of 10 threads but it is configurable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants