diff options
author | Geir Storli <geirst@yahooinc.com> | 2022-02-23 17:50:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-23 17:50:11 +0100 |
commit | ab5c16b695ad73a2a6793f2ddd91962be115230d (patch) | |
tree | 4dc75b73ba392d16f4d8714d8889d058725b9530 /config-model/src/main | |
parent | 3be99cd2b3c48f5a457c9647ffb87a20b9f88332 (diff) | |
parent | c4cb61ae2b5b32be6d157a866d132f86e7087ea0 (diff) |
Merge pull request #21349 from vespa-engine/vekterli/add-more-throttle-policy-feature-flags
Add more feature flags for tuning dynamic persistence throttling [run-systemtest]
Diffstat (limited to 'config-model/src/main')
-rw-r--r-- | config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java | 14 | ||||
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/FileStorProducer.java | 9 |
2 files changed, 23 insertions, 0 deletions
diff --git a/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java b/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java index 9ae1a75b858..41fdea27ee6 100644 --- a/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java +++ b/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java @@ -72,6 +72,8 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea private String mergeThrottlingPolicy = "STATIC"; private double persistenceThrottlingWsDecrementFactor = 1.2; private double persistenceThrottlingWsBackoff = 0.95; + private int persistenceThrottlingWindowSize = -1; + private double persistenceThrottlingWsResizeRate = 3.0; private boolean inhibitDefaultMergesWhenGlobalMergesPending = false; private boolean useV8GeoPositions = false; private List<String> environmentVariables = List.of(); @@ -128,6 +130,8 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea @Override public String mergeThrottlingPolicy() { return mergeThrottlingPolicy; } @Override public double persistenceThrottlingWsDecrementFactor() { return persistenceThrottlingWsDecrementFactor; } @Override public double persistenceThrottlingWsBackoff() { return persistenceThrottlingWsBackoff; } + @Override public int persistenceThrottlingWindowSize() { return persistenceThrottlingWindowSize; } + @Override public double persistenceThrottlingWsResizeRate() { return persistenceThrottlingWsResizeRate; } @Override public boolean inhibitDefaultMergesWhenGlobalMergesPending() { return inhibitDefaultMergesWhenGlobalMergesPending; } @Override public boolean useV8GeoPositions() { return useV8GeoPositions; } @Override public List<String> environmentVariables() { return environmentVariables; } @@ -334,6 +338,16 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea return this; } + public TestProperties setPersistenceThrottlingWindowSize(int windowSize) { + this.persistenceThrottlingWindowSize = windowSize; + return this; + } + + public TestProperties setPersistenceThrottlingWsResizeRate(double resizeRate) { + this.persistenceThrottlingWsResizeRate = resizeRate; + return this; + } + public TestProperties inhibitDefaultMergesWhenGlobalMergesPending(boolean value) { this.inhibitDefaultMergesWhenGlobalMergesPending = value; return this; diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/FileStorProducer.java b/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/FileStorProducer.java index f3263658717..81a43108157 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/FileStorProducer.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/FileStorProducer.java @@ -49,6 +49,8 @@ public class FileStorProducer implements StorFilestorConfig.Producer { private final StorFilestorConfig.Async_operation_throttler.Type.Enum asyncOperationThrottlerType; private final double persistenceThrottlingWsDecrementFactor; private final double persistenceThrottlingWsBackoff; + private final int persistenceThrottingWindowSize; + private final double persistenceThrottlingWsResizeRate; private final boolean useAsyncMessageHandlingOnSchedule; private static StorFilestorConfig.Response_sequencer_type.Enum convertResponseSequencerType(String sequencerType) { @@ -75,6 +77,8 @@ public class FileStorProducer implements StorFilestorConfig.Producer { this.asyncOperationThrottlerType = toAsyncOperationThrottlerType(featureFlags.persistenceAsyncThrottling()); this.persistenceThrottlingWsDecrementFactor = featureFlags.persistenceThrottlingWsDecrementFactor(); this.persistenceThrottlingWsBackoff = featureFlags.persistenceThrottlingWsBackoff(); + this.persistenceThrottingWindowSize = featureFlags.persistenceThrottlingWindowSize(); + this.persistenceThrottlingWsResizeRate = featureFlags.persistenceThrottlingWsResizeRate(); this.useAsyncMessageHandlingOnSchedule = featureFlags.useAsyncMessageHandlingOnSchedule(); } @@ -96,6 +100,11 @@ public class FileStorProducer implements StorFilestorConfig.Producer { throttleBuilder.type(asyncOperationThrottlerType); throttleBuilder.window_size_decrement_factor(persistenceThrottlingWsDecrementFactor); throttleBuilder.window_size_backoff(persistenceThrottlingWsBackoff); + if (persistenceThrottingWindowSize > 0) { + throttleBuilder.min_window_size(persistenceThrottingWindowSize); + throttleBuilder.max_window_size(persistenceThrottingWindowSize); + } + throttleBuilder.resize_rate(persistenceThrottlingWsResizeRate); builder.async_operation_throttler(throttleBuilder); } |