Search code examples
javahttpthreadpoolquarkus

How to setting http thread pool max size on quarkus


Sorry, I'm not really know about http thread pool how work on Quarkus.

I want setting http thread pool max size, But I see the Quarkus doc have a lot config property about thread.

I try setting each that and check it working or not on prometheus. but prometheus base_thread_max_count always not match my config.

So, I want know how setting and check that. Thanks so much


Solution

  • If you mean the pool that handles HTTP I/O events only, then that's quarkus.http.io-threads

    If you mean the worker pool that handles blocking operations, that's quarkus.vertx.worker-pool-size

    The metric base_thread_max_count isn't really relevant to this, it shows you the maximum number of threads ever being active in that JVM, so it takes into account various threads unrelated to the HTTP layer. To see the number of active IO threads, I'd suggest taking a thread dump and counting the threads named vert.x-eventloop-thread-*, for worker threads it is executor-thread-*.

    Also bear in mind that worker threads are created lazily, so setting a high number to quarkus.vertx.worker-pool-size might not have any immediate effect.