summaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/vespa/model/search/NodeResourcesTuning.java
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2023-05-23 22:16:30 +0200
committerGitHub <noreply@github.com>2023-05-23 22:16:30 +0200
commit482e915731f2d3a78acfff7b2ce4a11ec612ff58 (patch)
tree39b8a90a580b786656798e3a66e420d96e324257 /config-model/src/main/java/com/yahoo/vespa/model/search/NodeResourcesTuning.java
parentd009d437e26f1fafa741ae373c2fd666f4026bba (diff)
parente6f9700c89bfb8a43e97f2a4af3f1d56ba9a8894 (diff)
Merge pull request #27194 from vespa-engine/bratseth/container-memoryOverheadv8.167.17
Model fixed memory overhead for containers
Diffstat (limited to 'config-model/src/main/java/com/yahoo/vespa/model/search/NodeResourcesTuning.java')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/search/NodeResourcesTuning.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/NodeResourcesTuning.java b/config-model/src/main/java/com/yahoo/vespa/model/search/NodeResourcesTuning.java
index b444de5fb14..1ad99404823 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/search/NodeResourcesTuning.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/search/NodeResourcesTuning.java
@@ -3,6 +3,7 @@ package com.yahoo.vespa.model.search;
import com.yahoo.config.provision.NodeResources;
import com.yahoo.vespa.config.search.core.ProtonConfig;
+import com.yahoo.vespa.model.Host;
import static java.lang.Long.min;
import static java.lang.Long.max;
@@ -27,10 +28,6 @@ public class NodeResourcesTuning implements ProtonConfig.Producer {
private final int threadsPerSearch;
private final double fractionOfMemoryReserved;
- // Memory for other processes running on the node (config-proxy, metrics-proxy).
- // Keep in sync with node-repository/ClusterModel
- public static final double nodeMemoryOverheadGb = 0.7;
-
public NodeResourcesTuning(NodeResources resources,
int threadsPerSearch,
double fractionOfMemoryReserved) {
@@ -129,7 +126,7 @@ public class NodeResourcesTuning implements ProtonConfig.Producer {
/** Returns the memory we can expect will be available for the content node processes */
private double usableMemoryGb() {
- double usableMemoryGb = resources.memoryGb() - nodeMemoryOverheadGb;
+ double usableMemoryGb = resources.memoryGb() - Host.memoryOverheadGb;
return usableMemoryGb * (1 - fractionOfMemoryReserved);
}