-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
ExecutorService should expose metrics #34998
Comments
/cc @ebullient (metrics), @jmartisk (metrics) |
@ebullient WDYT about this? It seems reasonable to me, so if you also think it makes sense, I can have a look |
I think the micrometer repo has a binder for the executor service. I did not add it because there is an interesting question about which executor pool to monitor.. |
According to this issue, we already have the data for the Event Loop but we are missing it for the pool used for blocking tasts |
The class is |
For me as a Quarkus user in Keycloak, there is the "main" executor pool I am interested in which I can configure for example via |
Yeah, that's the one @ahus1 |
I did a quick look into what we currently provide in way of Executor metrics, and it seems like Vert.x (and therefore Quarkus) only exposes metrics for the worker pool, not the event loop (which I guess makes sense given the nature of the latter) - see here and here So it seems to like what this ticket asks for is already provided, WDYT? |
@geoand What do you mean by "given the nature of the latter"? Something in the direction of "only does non-blocking stuff and is ideally set to number of cores and should never have a waiting queue"? That would be my guess but I am not sure. Nice avatar btw. ;) |
I am just guessing as to why the event loop doesn't have metrics and my guess is that because there are constantly very short lived runnables going into it and being executed, it might be too much overhead to track them.
Same 😎 |
@geoand - thank you for the pointer, I had a look and this is what I found:
I can have a look at Keycloak, so it uses the Vert.x facade, so that the metrics are recorded. It would be great if the Quarkus team could fill the |
I will have a look |
@ahus1 I assume your analysis is for prod mode, not dev mode, correct? |
@geoand - yes, I started it in prod mode, I double-checked just now. For me it is part of Keycloak, and I started it with:
I debugged the startup down to
in Looking at the code, the configuration In
|
This is done by setting the relevant property in VertxOptions to the size of the Quarkus ExecutorService that is actually by Vertx (in prod mode). The reason we update VertOptions is because PoolMetrics uses it to calculate the blocking pool size. Closes: quarkusio#34998
This is done by setting the relevant property in VertxOptions to the size of the Quarkus ExecutorService that is actually by Vertx (in prod mode). The reason we update VertOptions is because PoolMetrics uses it to calculate the blocking pool size. Closes: quarkusio#34998
This is done by setting the relevant property in VertxOptions to the size of the Quarkus ExecutorService that is actually by Vertx (in prod mode). The reason we update VertOptions is that PoolMetrics uses it to calculate the blocking pool size. Closes: quarkusio#34998
This is done by setting the relevant property in VertxOptions to the size of the Quarkus ExecutorService that is actually by Vertx (in prod mode). The reason we update VertOptions is that PoolMetrics uses it to calculate the blocking pool size. Closes: quarkusio#34998
This is done by setting the relevant property in VertxOptions to the size of the Quarkus ExecutorService that is actually by Vertx (in prod mode). The reason we update VertOptions is that PoolMetrics uses it to calculate the blocking pool size. Closes: quarkusio#34998
Properly report Vertx worker pool size
Created a follow-up issue to capture the metric of rejected submissions to the pool which is currently not exposed: #35540 |
Description
Quarkus starts an ExecutorService which by default has 200 threads and an unbounded queue. Via configuration options the maximum size can be changed, and a queue length can be defined.
To monitor this thread pool in a production or load test environment, metrics on this thread pool would be helpful.
When running Keycloak which is based on Quarkus, the metrics aren't exposed, while for example Vert.x thread pool metrics are exposed.
Helpful metrics would be:
Although the max values don't change during runtime, it would be helpful to show them as the upper limit in a Dashboard afterwards (for example Grafana).
Implementation ideas
All those values are already available as part of the
EnhancedQueueExecutor
implementation, and they need to be published via Micrometer.The metrics
rejectedTaskCount
andsubmittedTaskCount
could be two different labels values of one metric, as they can be summed up, but I don't want to make things more complicated if this would hold this feature back.The text was updated successfully, but these errors were encountered: