From b6277ac14d5c35c8f5c80616829868c4ea74abfa Mon Sep 17 00:00:00 2001 From: kimchy Date: Wed, 15 Dec 2010 01:16:00 +0200 Subject: [PATCH] increase netty worker count to default to the updated value netty defaults to --- .../org/elasticsearch/http/netty/NettyHttpServerTransport.java | 2 +- .../java/org/elasticsearch/transport/netty/NettyTransport.java | 2 +- .../memcached/netty/NettyMemcachedServerTransport.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/http/netty/NettyHttpServerTransport.java b/modules/elasticsearch/src/main/java/org/elasticsearch/http/netty/NettyHttpServerTransport.java index a94c06ea629..1b9535487c5 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/http/netty/NettyHttpServerTransport.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/http/netty/NettyHttpServerTransport.java @@ -106,7 +106,7 @@ public class NettyHttpServerTransport extends AbstractLifecycleComponent implem this.threadPool = threadPool; this.networkService = networkService; - this.workerCount = componentSettings.getAsInt("worker_count", Runtime.getRuntime().availableProcessors()); + this.workerCount = componentSettings.getAsInt("worker_count", Runtime.getRuntime().availableProcessors() * 2); this.blockingServer = settings.getAsBoolean("transport.tcp.blocking_server", settings.getAsBoolean(TCP_BLOCKING_SERVER, settings.getAsBoolean(TCP_BLOCKING, false))); this.blockingClient = settings.getAsBoolean("transport.tcp.blocking_client", settings.getAsBoolean(TCP_BLOCKING_CLIENT, settings.getAsBoolean(TCP_BLOCKING, false))); this.port = componentSettings.get("port", settings.get("transport.tcp.port", "9300-9400")); diff --git a/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/netty/NettyMemcachedServerTransport.java b/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/netty/NettyMemcachedServerTransport.java index a14485a57fc..c4f5f5c5cbb 100644 --- a/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/netty/NettyMemcachedServerTransport.java +++ b/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/netty/NettyMemcachedServerTransport.java @@ -93,7 +93,7 @@ public class NettyMemcachedServerTransport extends AbstractLifecycleComponent