【发布时间】:2023-03-18 19:29:01
【问题描述】:
我们目前正在调整使用 undertow 的服务,但找不到以下属性的默认值:
server.undertow.worker-threads
server.undertow.io-threads
我们了解到 undertow 在设置线程时使用 org.xnio.Options,但找不到任何默认值。
【问题讨论】:
标签: spring-boot undertow
我们目前正在调整使用 undertow 的服务,但找不到以下属性的默认值:
server.undertow.worker-threads
server.undertow.io-threads
我们了解到 undertow 在设置线程时使用 org.xnio.Options,但找不到任何默认值。
【问题讨论】:
标签: spring-boot undertow
来自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;
...
【讨论】:
在最新版本的 Spring boot/Undertow 中,要覆盖的属性如下:
示例:
server.undertow.threads.io=50
server.undertow.threads.worker=50
【讨论】: