Search code examples
spring-bootundertow

Undertow properties default values


We're currently tuning our services that uses undertow but we can't find the default values of the following properties:

server.undertow.worker-threads
server.undertow.io-threads

We learned that undertow is using org.xnio.Options in setting-up the threads but can't find any default values.


Solution

  • From https://github.com/undertow-io/undertow/blob/master/core/src/main/java/io/undertow/Undertow.java

    ...
        ioThreads = Math.max(Runtime.getRuntime().availableProcessors(), 2);
        workerThreads = ioThreads * 8;
    ...