From 1f3b0d4144029722f19acebc403c3ef3bc57fda3 Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Thu, 23 Aug 2012 13:20:54 +0200 Subject: [PATCH] Reduce index.shard.recovery.concurrent_streams from 5 to 3 to reduce the load when doing recovery, closes #2199. the index.shard.recovery.concurrent_streams controls how many streams are opened from a recovery source to a recovery target to transfer index files. Reduce it from 5 to 3 to reduce the load when doing recovery (for example, due to relocation). Note, recent changes in network buffering will mean that recovery will progress considerably faster, so this change will not affect recovery times. --- .../org/elasticsearch/indices/recovery/RecoverySettings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/elasticsearch/indices/recovery/RecoverySettings.java b/src/main/java/org/elasticsearch/indices/recovery/RecoverySettings.java index 3439f2843f6..534519b5417 100644 --- a/src/main/java/org/elasticsearch/indices/recovery/RecoverySettings.java +++ b/src/main/java/org/elasticsearch/indices/recovery/RecoverySettings.java @@ -67,7 +67,7 @@ public class RecoverySettings extends AbstractComponent { this.translogSize = componentSettings.getAsBytesSize("translog_size", settings.getAsBytesSize("index.shard.recovery.translog_size", new ByteSizeValue(512, ByteSizeUnit.KB))); this.compress = componentSettings.getAsBoolean("compress", true); - this.concurrentStreams = componentSettings.getAsInt("concurrent_streams", settings.getAsInt("index.shard.recovery.concurrent_streams", 5)); + this.concurrentStreams = componentSettings.getAsInt("concurrent_streams", settings.getAsInt("index.shard.recovery.concurrent_streams", 3)); this.concurrentStreamPool = EsExecutors.newScalingExecutorService(0, concurrentStreams, 60, TimeUnit.SECONDS, EsExecutors.daemonThreadFactory(settings, "[recovery_stream]")); this.maxSizePerSec = componentSettings.getAsBytesSize("max_size_per_sec", new ByteSizeValue(0));