summaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-09-25 11:27:14 +0200
committerGitHub <noreply@github.com>2023-09-25 11:27:14 +0200
commit4d5c9f2d3033a4e51b916dcde569f8f0451bcee0 (patch)
tree1ee6904242ca9ac17c99058005fd16317a04008a /config-model
parent17f452d78e97fd6a90b220dc417de29029a026cd (diff)
parentb65637ca31665103cff51bec49c69513905ea3e8 (diff)
Merge pull request #28641 from vespa-engine/bjorncs/tighten-heap-requirements
Require larger heap
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/application/validation/JvmHeapSizeValidator.java4
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/application/validation/JvmHeapSizeValidatorTest.java6
2 files changed, 5 insertions, 5 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/application/validation/JvmHeapSizeValidator.java b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/JvmHeapSizeValidator.java
index 2c5e0db14b9..9e231239521 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/application/validation/JvmHeapSizeValidator.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/JvmHeapSizeValidator.java
@@ -28,7 +28,7 @@ public class JvmHeapSizeValidator extends Validator {
}
long jvmModelCost = appCluster.onnxModelCost().aggregatedModelCostInBytes();
if (jvmModelCost > 0) {
- int percentLimit = 10;
+ int percentLimit = 15;
if (mp.percentage() < percentLimit) {
throw new IllegalArgumentException(
("Allocated percentage of memory of JVM in cluster '%s' is too low (%d%% < %d%%). " +
@@ -36,7 +36,7 @@ public class JvmHeapSizeValidator extends Validator {
"You may override this validation by specifying 'allocated-memory' (https://docs.vespa.ai/en/performance/container-tuning.html#jvm-heap-size).")
.formatted(clusterId, mp.percentage(), percentLimit, jvmModelCost / (1024D * 1024 * 1024)));
}
- double gbLimit = 0.4;
+ double gbLimit = 0.6;
double availableMemoryGb = mp.availableMemoryGb().getAsDouble();
if (availableMemoryGb < gbLimit) {
throw new IllegalArgumentException(
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/JvmHeapSizeValidatorTest.java b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/JvmHeapSizeValidatorTest.java
index 086f2fe778f..245887a5d03 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/JvmHeapSizeValidatorTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/JvmHeapSizeValidatorTest.java
@@ -34,16 +34,16 @@ class JvmHeapSizeValidatorTest {
var deployState = createDeployState(8, 7L * 1024 * 1024 * 1024);
var model = new VespaModel(new NullConfigModelRegistry(), deployState);
var e = assertThrows(IllegalArgumentException.class, () -> new JvmHeapSizeValidator().validate(model, deployState));
- String expectedMessage = "Allocated percentage of memory of JVM in cluster 'container' is too low (3% < 10%). Estimated cost of ONNX models is 7.00GB";
+ String expectedMessage = "Allocated percentage of memory of JVM in cluster 'container' is too low (3% < 15%). Estimated cost of ONNX models is 7.00GB";
assertTrue(e.getMessage().contains(expectedMessage), e.getMessage());
}
@Test
void fails_on_too_low_heap_size() throws IOException, SAXException {
- var deployState = createDeployState(2, 1024L * 1024 * 1024);
+ var deployState = createDeployState(2.2, 1024L * 1024 * 1024);
var model = new VespaModel(new NullConfigModelRegistry(), deployState);
var e = assertThrows(IllegalArgumentException.class, () -> new JvmHeapSizeValidator().validate(model, deployState));
- String expectedMessage = "Allocated memory to JVM in cluster 'container' is too low (0.30GB < 0.40GB). Estimated cost of ONNX models is 1.00GB.";
+ String expectedMessage = "Allocated memory to JVM in cluster 'container' is too low (0.50GB < 0.60GB). Estimated cost of ONNX models is 1.00GB.";
assertTrue(e.getMessage().contains(expectedMessage), e.getMessage());
}