Change default recovery throttling to 50MB / sec
The current setting of 20MB/sec seems to be too conservative given the capabilities of modern hardware / network throughput. A 50MB default should provide better out of the box performance.
This commit is contained in:
parent
8568c18e6f
commit
b36ef995bb
|
@ -72,5 +72,5 @@ The following settings can be set to control the store throttling:
|
||||||
could be `merge` (default), `not` or `all`. See <<index-modules-store>>.
|
could be `merge` (default), `not` or `all`. See <<index-modules-store>>.
|
||||||
|
|
||||||
`indices.store.throttle.max_bytes_per_sec`::
|
`indices.store.throttle.max_bytes_per_sec`::
|
||||||
defaults to `20mb`.
|
defaults to `50mb`.
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class RecoverySettings extends AbstractComponent {
|
||||||
this.concurrentSmallFileStreams = componentSettings.getAsInt("concurrent_small_file_streams", settings.getAsInt("index.shard.recovery.concurrent_small_file_streams", 2));
|
this.concurrentSmallFileStreams = componentSettings.getAsInt("concurrent_small_file_streams", settings.getAsInt("index.shard.recovery.concurrent_small_file_streams", 2));
|
||||||
this.concurrentSmallFileStreamPool = EsExecutors.newScaling(0, concurrentSmallFileStreams, 60, TimeUnit.SECONDS, EsExecutors.daemonThreadFactory(settings, "[small_file_recovery_stream]"));
|
this.concurrentSmallFileStreamPool = EsExecutors.newScaling(0, concurrentSmallFileStreams, 60, TimeUnit.SECONDS, EsExecutors.daemonThreadFactory(settings, "[small_file_recovery_stream]"));
|
||||||
|
|
||||||
this.maxBytesPerSec = componentSettings.getAsBytesSize("max_bytes_per_sec", componentSettings.getAsBytesSize("max_size_per_sec", new ByteSizeValue(20, ByteSizeUnit.MB)));
|
this.maxBytesPerSec = componentSettings.getAsBytesSize("max_bytes_per_sec", componentSettings.getAsBytesSize("max_size_per_sec", new ByteSizeValue(50, ByteSizeUnit.MB)));
|
||||||
if (maxBytesPerSec.bytes() <= 0) {
|
if (maxBytesPerSec.bytes() <= 0) {
|
||||||
rateLimiter = null;
|
rateLimiter = null;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -44,6 +44,7 @@ import org.elasticsearch.index.merge.scheduler.SerialMergeSchedulerProvider;
|
||||||
import org.elasticsearch.index.translog.TranslogService;
|
import org.elasticsearch.index.translog.TranslogService;
|
||||||
import org.elasticsearch.indices.IndexMissingException;
|
import org.elasticsearch.indices.IndexMissingException;
|
||||||
import org.elasticsearch.indices.IndexTemplateMissingException;
|
import org.elasticsearch.indices.IndexTemplateMissingException;
|
||||||
|
import org.elasticsearch.indices.recovery.RecoverySettings;
|
||||||
import org.elasticsearch.indices.store.IndicesStore;
|
import org.elasticsearch.indices.store.IndicesStore;
|
||||||
import org.elasticsearch.repositories.RepositoryMissingException;
|
import org.elasticsearch.repositories.RepositoryMissingException;
|
||||||
import org.elasticsearch.search.SearchService;
|
import org.elasticsearch.search.SearchService;
|
||||||
|
@ -284,6 +285,14 @@ public abstract class ImmutableTestCluster implements Iterable<Client> {
|
||||||
builder.put(IndicesStore.INDICES_STORE_THROTTLE_TYPE, RandomPicks.randomFrom(random, StoreRateLimiting.Type.values()));
|
builder.put(IndicesStore.INDICES_STORE_THROTTLE_TYPE, RandomPicks.randomFrom(random, StoreRateLimiting.Type.values()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (random.nextBoolean()) {
|
||||||
|
if (random.nextInt(10) == 0) { // do something crazy slow here
|
||||||
|
builder.put(RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC, new ByteSizeValue(RandomInts.randomIntBetween(random, 1, 10), ByteSizeUnit.MB));
|
||||||
|
} else {
|
||||||
|
builder.put(RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC, new ByteSizeValue(RandomInts.randomIntBetween(random, 10, 200), ByteSizeUnit.MB));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue