diff options
author | Geir Storli <geirst@oath.com> | 2017-10-16 16:38:47 +0200 |
---|---|---|
committer | Geir Storli <geirst@oath.com> | 2017-10-16 16:40:21 +0200 |
commit | ecc2a41d6e73896122f4a761a3805cc77423b484 (patch) | |
tree | 2cc3900eae39f285b9e690ae963f252ba3cfb1a5 /config-model | |
parent | 812e7452bbbdf092f223e065e443f7d3f91db449 (diff) |
Remove tuning of proton background.threads, as it is replaced by feeding.concurrency.
Diffstat (limited to 'config-model')
6 files changed, 1 insertions, 61 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomSearchTuningBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomSearchTuningBuilder.java index f9cbdafabc8..06f4e1cb2e9 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomSearchTuningBuilder.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomSearchTuningBuilder.java @@ -74,8 +74,6 @@ public class DomSearchTuningBuilder extends VespaDomBuilder.DomConfigProducerBui handleSummary(parent, e, t.searchNode); } else if (equals("initialize", e)) { handleInitialize(e, t.searchNode); - } else if (equals("background", e)) { - handleBackground(e, t.searchNode); } else if (equals("feeding", e)) { handleFeeding(e, t.searchNode); } @@ -256,8 +254,7 @@ public class DomSearchTuningBuilder extends VespaDomBuilder.DomConfigProducerBui s.logStore.minFileSizeFactor = asDouble(e); } else if (equals("numthreads", e)) { parent.deployLogger().log(Level.WARNING, - "Element 'numthreads is deprecated. Use background.threads instead." + - " For now it will take max of the two."); + "Element 'numthreads is deprecated. Use feeding.concurrency instead."); s.logStore.numThreads = asInt(e); } else if (equals("chunk", e)) { s.logStore.chunk = new Tuning.SearchNode.Summary.Store.Component(true); @@ -275,15 +272,6 @@ public class DomSearchTuningBuilder extends VespaDomBuilder.DomConfigProducerBui } } - private void handleBackground(Element spec, Tuning.SearchNode sn) { - sn.background = new Tuning.SearchNode.Background(); - for (Element e : XML.getChildren(spec)) { - if (equals("threads", e)) { - sn.background.threads = asInt(e); - } - } - } - private void handleFeeding(Element spec, Tuning.SearchNode sn) { sn.feeding = new Tuning.SearchNode.Feeding(); for (Element e : XML.getChildren(spec)) { diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/NodeFlavorTuning.java b/config-model/src/main/java/com/yahoo/vespa/model/search/NodeFlavorTuning.java index 36988669415..ff09da17af8 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/search/NodeFlavorTuning.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/search/NodeFlavorTuning.java @@ -27,7 +27,6 @@ public class NodeFlavorTuning implements ProtonConfig.Producer { setHwInfo(builder); tuneDiskWriteSpeed(builder); tuneDocumentStoreMaxFileSize(builder.summary.log); - tuneDocumentStoreNumThreads(builder.background); tuneFlushStrategyMemoryLimits(builder.flush.memory); tuneFlushStrategyTlsSize(builder.flush.memory); tuneSummaryReadIo(builder.summary.read); @@ -58,10 +57,6 @@ public class NodeFlavorTuning implements ProtonConfig.Producer { builder.maxfilesize(fileSizeBytes); } - private void tuneDocumentStoreNumThreads(ProtonConfig.Background.Builder builder) { - builder.threads(max(8, (int)nodeFlavor.getMinCpuCores()/2)); - } - private void tuneFlushStrategyMemoryLimits(ProtonConfig.Flush.Memory.Builder builder) { long memoryLimitBytes = (long) ((nodeFlavor.getMinMainMemoryAvailableGb() / 8) * GB); builder.maxmemory(memoryLimitBytes); diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/Tuning.java b/config-model/src/main/java/com/yahoo/vespa/model/search/Tuning.java index f34ae441d8b..2c1c5cd83ce 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/search/Tuning.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/search/Tuning.java @@ -334,17 +334,6 @@ public class Tuning extends AbstractConfigProducer implements PartitionsConfig.P } } - public static class Background implements ProtonConfig.Producer { - public Integer threads = null; - - @Override - public void getConfig(ProtonConfig.Builder builder) { - if (threads != null) { - builder.background.threads(threads); - } - } - } - public static class Feeding implements ProtonConfig.Producer { public Double concurrency = null; @@ -363,7 +352,6 @@ public class Tuning extends AbstractConfigProducer implements PartitionsConfig.P public Attribute attribute = null; public Summary summary = null; public Initialize initialize = null; - public Background background = null; public Feeding feeding = null; @Override @@ -375,7 +363,6 @@ public class Tuning extends AbstractConfigProducer implements PartitionsConfig.P if (attribute != null) attribute.getConfig(builder); if (summary != null) summary.getConfig(builder); if (initialize != null) initialize.getConfig(builder); - if (background != null) background.getConfig(builder); if (feeding != null) feeding.getConfig(builder); } } diff --git a/config-model/src/main/resources/schema/content.rnc b/config-model/src/main/resources/schema/content.rnc index ca36375eeb0..8325a542dbd 100644 --- a/config-model/src/main/resources/schema/content.rnc +++ b/config-model/src/main/resources/schema/content.rnc @@ -354,9 +354,6 @@ Tuning = element tuning { element initialize { element threads { xsd:nonNegativeInteger }? }? & - element background { - element threads { xsd:nonNegativeInteger }? - }? & element feeding { element concurrency { xsd:double { minInclusive = "0.0" maxInclusive = "1.0" } }? }? diff --git a/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/DomSearchTuningBuilderTest.java b/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/DomSearchTuningBuilderTest.java index 070fc4f0d0e..cbee943172f 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/DomSearchTuningBuilderTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/DomSearchTuningBuilderTest.java @@ -234,16 +234,6 @@ public class DomSearchTuningBuilderTest extends DomBuilderTest { } @Test - public void requireThatWeCanParseBackgroundTag() { - Tuning t = createTuning(parseXml("<background>", - "<threads>7</threads>", - "</background>")); - assertEquals(7, t.searchNode.background.threads.intValue()); - String cfg = getProtonCfg(t); - assertThat(cfg, containsString("background.threads 7")); - } - - @Test public void requireThatWeCanParseFeedingTag() { Tuning t = createTuning(parseXml("<feeding>", "<concurrency>0.7</concurrency>", diff --git a/config-model/src/test/java/com/yahoo/vespa/model/search/NodeFlavorTuningTest.java b/config-model/src/test/java/com/yahoo/vespa/model/search/NodeFlavorTuningTest.java index 52d014e2630..db6e3c7605f 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/search/NodeFlavorTuningTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/search/NodeFlavorTuningTest.java @@ -64,19 +64,6 @@ public class NodeFlavorTuningTest { } @Test - public void require_that_documentstore_numthreads_is_based_on_num_cores() { - assertDocumentStoreNumThreads(8, 0); - assertDocumentStoreNumThreads(8, 1.0); - assertDocumentStoreNumThreads(8, 3.0); - assertDocumentStoreNumThreads(8, 4.0); - assertDocumentStoreNumThreads(8, 8.0); - assertDocumentStoreNumThreads(12, 24.0); - assertDocumentStoreNumThreads(16, 32.0); - assertDocumentStoreNumThreads(24, 48.0); - assertDocumentStoreNumThreads(32, 64.0); - } - - @Test public void require_that_flush_strategy_memory_limits_are_set_based_on_available_memory() { assertFlushStrategyMemory(512 * MB, 4); assertFlushStrategyMemory(1 * GB, 8); @@ -108,10 +95,6 @@ public class NodeFlavorTuningTest { assertEquals(expMemoryBytes, configFromMemorySetting(memoryGb).flush().memory().each().maxmemory()); } - private static void assertDocumentStoreNumThreads(int numThreads, double numCores) { - assertEquals(numThreads, configFromNumCoresSetting(numCores).background().threads()); - } - private static void assertFlushStrategyTlsSize(long expTlsSizeBytes, int diskGb) { assertEquals(expTlsSizeBytes, configFromDiskSetting(diskGb).flush().memory().maxtlssize()); } |