-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Cache JMX connection and MBeans names and attributes #1019
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Max Melentyev <[email protected]>
Signed-off-by: Max Melentyev <[email protected]>
Signed-off-by: Max Melentyev <[email protected]>
@max-melentyev Thanks for the PR! I'll need to review it. |
@max-melentyev This PR changes a lot and makes some assumptions that I don't feel are always valid. An Thoughts? |
Hey, I'm not very familiar with java. I've tested this PR with cassandra and it produced the same result as a version from trunk. Cassandra adds some new metrics during bootstrap and when new tables created so without this event handler some metrics were missing. If there's another way MBean can start generating different set of metrics without giving a notification, then it's probably not handled by the code. There are other issues with this code though:
I started working on a fix, but we decided to use https://github.com/k8ssandra/management-api-for-apache-cassandra which showed the same performance as jmx exporter with this patch. Please let me know if you want me to push my WIP fix, or feel free to close the PR. |
@max-melentyev I would say push your latest code. It may be something we should look at in the future. |
And don't use Cleaner API to support Java 8
Done |
Hey, I saw significant improvement with jmx connection cached. Here is a chart for sample cassandra cluster without any traffic, orange line is for an instance with patched exporter:
Cassandra Clusters with traffic have GC time and throughput decreased, and we saw latencies improved up to 50%. But this depends on the traffic patters and vary from cluster to cluster.
Implementation details: