Skip to content

Commit 1f3b0d4

Browse files
committed
Reduce index.shard.recovery.concurrent_streams from 5 to 3 to reduce the load when doing recovery, closes elastic#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.
1 parent 37b33cf commit 1f3b0d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/elasticsearch/indices/recovery/RecoverySettings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public RecoverySettings(Settings settings, NodeSettingsService nodeSettingsServi
6767
this.translogSize = componentSettings.getAsBytesSize("translog_size", settings.getAsBytesSize("index.shard.recovery.translog_size", new ByteSizeValue(512, ByteSizeUnit.KB)));
6868
this.compress = componentSettings.getAsBoolean("compress", true);
6969

70-
this.concurrentStreams = componentSettings.getAsInt("concurrent_streams", settings.getAsInt("index.shard.recovery.concurrent_streams", 5));
70+
this.concurrentStreams = componentSettings.getAsInt("concurrent_streams", settings.getAsInt("index.shard.recovery.concurrent_streams", 3));
7171
this.concurrentStreamPool = EsExecutors.newScalingExecutorService(0, concurrentStreams, 60, TimeUnit.SECONDS, EsExecutors.daemonThreadFactory(settings, "[recovery_stream]"));
7272

7373
this.maxSizePerSec = componentSettings.getAsBytesSize("max_size_per_sec", new ByteSizeValue(0));

0 commit comments

Comments
 (0)