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

Export ArrayByteBufferPool statistics via JMX #12706

Open
wendigo opened this issue Jan 13, 2025 · 10 comments · May be fixed by #12709
Open

Export ArrayByteBufferPool statistics via JMX #12706

wendigo opened this issue Jan 13, 2025 · 10 comments · May be fixed by #12709
Labels
Enhancement Sponsored This issue affects a user with a commercial support agreement

Comments

@wendigo
Copy link

wendigo commented Jan 13, 2025

Jetty Version

12.x

Jetty Environment

ee10

Java Version

Question

Where I can find ArrayByteBufferPool allocation/bucket statistics (aggregated, not per-retainable buffer)? Seem like ArrayByteBufferPool.setStatisticsEnabled a noop from JMX perspective

@joakime
Copy link
Contributor

joakime commented Jan 13, 2025

The statistics are only per RetainedBucket, there's no aggregate statistics.

@wendigo
Copy link
Author

wendigo commented Jan 13, 2025

@joakime does it make sense to add aggregate to the Pool itself?

@sbordet
Copy link
Contributor

sbordet commented Jan 13, 2025

@wendigo the statistics are in the dump() of ArrayByteBufferPool.

Can you specify what would you be doing with aggregate statistics?
I'm not sure what exact parameter you are interested in, and aggregates across all buckets seem not that interesting -- you won't be able to tell much from an aggregate number.

@wendigo
Copy link
Author

wendigo commented Jan 13, 2025

@sbordet the distribution of allocation sizes mostly, size of currently allocated memory

@wendigo
Copy link
Author

wendigo commented Jan 13, 2025

Basically we want to make sure that the pool is configured accordingly to our actual usage

@sbordet
Copy link
Contributor

sbordet commented Jan 13, 2025

@wendigo then you don't want aggregates, but per-bucket statistics, which is already available in the dump.
Is that sufficient?

@wendigo
Copy link
Author

wendigo commented Jan 13, 2025

@sbordet i'd like that information to be exported as mbean so I can track it in datadog

@sbordet
Copy link
Contributor

sbordet commented Jan 13, 2025

@wendigo ok, we will need to do some work with JMX open types, since the data you want is tabular.

@sbordet sbordet changed the title ArrayByteBufferPool.isStatisticsEnabled Export ArrayByteBufferPool statistics via JMX Jan 13, 2025
@sbordet sbordet added Enhancement Sponsored This issue affects a user with a commercial support agreement and removed Question labels Jan 13, 2025
sbordet added a commit that referenced this issue Jan 14, 2025
* Exposed bucket statistics as a list of maps.
* Exposed non-bucket statistic map.
* Fixed get[Direct|Heap]Memory() and exposed getAvailable[Direct|Heap]Memory().

Signed-off-by: Simone Bordet <[email protected]>
@sbordet sbordet moved this to 🏗 In progress in Jetty 12.0.17 Jan 14, 2025
@sbordet
Copy link
Contributor

sbordet commented Jan 14, 2025

@wendigo could you check #12709 and see if that's enough for you?

@wendigo
Copy link
Author

wendigo commented Jan 14, 2025

@sbordet yes, I can that test, just give me an hour or two

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Sponsored This issue affects a user with a commercial support agreement
Projects
Status: 🏗 In progress
Development

Successfully merging a pull request may close this issue.

3 participants