From 61b47771771286e2a2e2016c7839fff62d72c738 Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 8 Jul 2013 08:35:12 +1000 Subject: [PATCH] Use more threads for IO to eliminate resource starvation possibly leading to high CPU usage. This brings the count back in line with what we had pre 1.6 / late 1.5 --- proxy/src/main/java/net/md_5/bungee/BungeeCord.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 22bcd4a3..c5c08c12 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java @@ -87,7 +87,7 @@ public class BungeeCord extends ProxyServer * Thread pools. */ public final ScheduledThreadPoolExecutor executors = new BungeeThreadPool( new ThreadFactoryBuilder().setNameFormat( "Bungee Pool Thread #%1$d" ).build() ); - public final MultithreadEventLoopGroup eventLoops = new NioEventLoopGroup( Runtime.getRuntime().availableProcessors(), new ThreadFactoryBuilder().setNameFormat( "Netty IO Thread #%1$d" ).build() ); + public final MultithreadEventLoopGroup eventLoops = new NioEventLoopGroup( 0, new ThreadFactoryBuilder().setNameFormat( "Netty IO Thread #%1$d" ).build() ); /** * locations.yml save thread. */ @@ -172,7 +172,7 @@ public class BungeeCord extends ProxyServer public static void main(String[] args) throws Exception { Calendar deadline = Calendar.getInstance(); - deadline.set( 2013, 7, 16 ); // year, month, date + deadline.set( 2013, 7, 24 ); // year, month, date if ( Calendar.getInstance().after( deadline ) ) { System.err.println( "*** Warning, this build is outdated ***" );