Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 559
Orvyl Avatar asked Jan 27 '17 07:01

Orvyl


People also ask

What is undertow in JBoss?

Undertow is a flexible performant web server written in java, providing both blocking and non-blocking API's based on NIO. Undertow has a composition based architecture that allows you to build a web server by combining small single purpose handlers.

What is spring boot starter undertow?

Spring boot provides an easy way to configure undertow server as like jetty. undertow is web server written in Java and manage and sponsored by JBoss. Main advantages of undertow are HTTP/2 Support, HTTP Upgrade Support, Web Socket Support, Servlet 4.0, Embeddable, Flexible.

What is XNIO thread?

XNIO workers are the central point of coordination for a network application. A worker includes two different thread pool types: I/O threads, which come in two types: Read threads which handle callbacks for read events, and. Write threads which handle callbacks for write events; and.


1 Answers

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;
...
like image 165
Orvyl Avatar answered Sep 20 '22 22:09

Orvyl