From c50ecb3f0ce5d6fe34d58b1449e4ae46b343abad Mon Sep 17 00:00:00 2001 From: franz1981 Date: Mon, 29 May 2023 09:01:26 +0200 Subject: [PATCH] Reduce the number of event loop threads for io_uring --- frameworks/Java/netty/src/main/java/hello/HelloWebServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/Java/netty/src/main/java/hello/HelloWebServer.java b/frameworks/Java/netty/src/main/java/hello/HelloWebServer.java index 547671df969..84cc86ab273 100644 --- a/frameworks/Java/netty/src/main/java/hello/HelloWebServer.java +++ b/frameworks/Java/netty/src/main/java/hello/HelloWebServer.java @@ -37,7 +37,7 @@ public HelloWebServer(int port) { public void run() throws Exception { // Configure the server. if (IOUring.isAvailable()) { - doRun(new IOUringEventLoopGroup(), IOUringServerSocketChannel.class, IoMultiplexer.IO_URING); + doRun(new IOUringEventLoopGroup(Runtime.getRuntime().availableProcessors()), IOUringServerSocketChannel.class, IoMultiplexer.IO_URING); } else if (Epoll.isAvailable()) { doRun(new EpollEventLoopGroup(), EpollServerSocketChannel.class, IoMultiplexer.EPOLL);