Skip to content

Commit

Permalink
#6081: set IO throttling back to 20 MB/sec now that #6018 is fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemccand committed May 12, 2014
1 parent b674ab5 commit 7cf8234
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/reference/index-modules/store.asciidoc
Expand Up @@ -40,7 +40,7 @@ second. It can be set by setting `indices.store.throttle.type` to
`merge`, and setting `indices.store.throttle.max_bytes_per_sec` to
something like `5mb`. The node level settings can be changed dynamically
using the cluster update settings API. The default is set
to `50mb` with type `merge`.
to `20mb` with type `merge`.

If specific index level configuration is needed, regardless of the node
level settings, it can be set as well using the
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/modules/indices.asciidoc
Expand Up @@ -59,7 +59,7 @@ The following settings can be set to manage the recovery policy:
defaults to `true`.

`indices.recovery.max_bytes_per_sec`::
defaults to `50mb`.
defaults to `20mb`.

[float]
[[throttling]]
Expand All @@ -72,5 +72,5 @@ The following settings can be set to control the store throttling:
could be `merge` (default), `none` or `all`. See <<index-modules-store>>.

`indices.store.throttle.max_bytes_per_sec`::
defaults to `50mb`.
defaults to `20mb`.

Expand Up @@ -81,7 +81,7 @@ public RecoverySettings(Settings settings, NodeSettingsService nodeSettingsServi
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.maxBytesPerSec = componentSettings.getAsBytesSize("max_bytes_per_sec", componentSettings.getAsBytesSize("max_size_per_sec", new ByteSizeValue(50, ByteSizeUnit.MB)));
this.maxBytesPerSec = componentSettings.getAsBytesSize("max_bytes_per_sec", componentSettings.getAsBytesSize("max_size_per_sec", new ByteSizeValue(20, ByteSizeUnit.MB)));
if (maxBytesPerSec.bytes() <= 0) {
rateLimiter = null;
} else {
Expand Down
Expand Up @@ -95,7 +95,7 @@ public IndicesStore(Settings settings, NodeEnvironment nodeEnv, NodeSettingsServ
// we limit with 20MB / sec by default with a default type set to merge sice 0.90.1
this.rateLimitingType = componentSettings.get("throttle.type", StoreRateLimiting.Type.MERGE.name());
rateLimiting.setType(rateLimitingType);
this.rateLimitingThrottle = componentSettings.getAsBytesSize("throttle.max_bytes_per_sec", new ByteSizeValue(50, ByteSizeUnit.MB));
this.rateLimitingThrottle = componentSettings.getAsBytesSize("throttle.max_bytes_per_sec", new ByteSizeValue(20, ByteSizeUnit.MB));
rateLimiting.setMaxRate(rateLimitingThrottle);

logger.debug("using indices.store.throttle.type [{}], with index.store.throttle.max_bytes_per_sec [{}]", rateLimitingType, rateLimitingThrottle);
Expand Down
Expand Up @@ -59,7 +59,7 @@ public void testDirectoryToString() throws IOException {
if (dataPaths.length > 1) {
assertThat(storeString.toLowerCase(Locale.ROOT), containsString("), rate_limited(niofs(" + dataPaths[1].getAbsolutePath().toLowerCase(Locale.ROOT)));
}
assertThat(storeString, endsWith(", type=MERGE, rate=50.0)])"));
assertThat(storeString, endsWith(", type=MERGE, rate=20.0)])"));

createIndexWithStoreType("test", "niofs", "random");
storeString = getStoreDirectory("test", 0).toString();
Expand All @@ -69,7 +69,7 @@ public void testDirectoryToString() throws IOException {
if (dataPaths.length > 1) {
assertThat(storeString.toLowerCase(Locale.ROOT), containsString("), rate_limited(niofs(" + dataPaths[1].getAbsolutePath().toLowerCase(Locale.ROOT)));
}
assertThat(storeString, endsWith(", type=MERGE, rate=50.0)])"));
assertThat(storeString, endsWith(", type=MERGE, rate=20.0)])"));

createIndexWithStoreType("test", "mmapfs", "least_used");
storeString = getStoreDirectory("test", 0).toString();
Expand All @@ -79,7 +79,7 @@ public void testDirectoryToString() throws IOException {
if (dataPaths.length > 1) {
assertThat(storeString.toLowerCase(Locale.ROOT), containsString("), rate_limited(mmapfs(" + dataPaths[1].getAbsolutePath().toLowerCase(Locale.ROOT)));
}
assertThat(storeString, endsWith(", type=MERGE, rate=50.0)])"));
assertThat(storeString, endsWith(", type=MERGE, rate=20.0)])"));

createIndexWithStoreType("test", "simplefs", "least_used");
storeString = getStoreDirectory("test", 0).toString();
Expand All @@ -89,7 +89,7 @@ public void testDirectoryToString() throws IOException {
if (dataPaths.length > 1) {
assertThat(storeString.toLowerCase(Locale.ROOT), containsString("), rate_limited(simplefs(" + dataPaths[1].getAbsolutePath().toLowerCase(Locale.ROOT)));
}
assertThat(storeString, endsWith(", type=MERGE, rate=50.0)])"));
assertThat(storeString, endsWith(", type=MERGE, rate=20.0)])"));

createIndexWithStoreType("test", "memory", "least_used");
storeString = getStoreDirectory("test", 0).toString();
Expand Down

0 comments on commit 7cf8234

Please sign in to comment.