From 5a15d5387c5ebd06cf7aa9bc6f66f2cef89f69a4 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 19 Mar 2013 16:07:39 +1100 Subject: [PATCH] Use as many threads as the system can handle. --- proxy/src/main/java/net/md_5/bungee/BungeeCord.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java index 7ec095721..a87ace7f2 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java @@ -69,7 +69,9 @@ public class BungeeCord extends ProxyServer /** * Thread pool. */ - public final MultithreadEventLoopGroup eventLoops = new NioEventLoopGroup( 8, new ThreadFactoryBuilder().setNameFormat( "Netty IO Thread - %1$d" ).build() ); + public final MultithreadEventLoopGroup eventLoops = new NioEventLoopGroup( + Runtime.getRuntime().availableProcessors() * 2, + new ThreadFactoryBuilder().setNameFormat( "Netty IO Thread - %1$d" ).build() ); /** * locations.yml save thread. */