aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@vespa.ai>2023-05-22 11:05:26 +0200
committerJon Bratseth <bratseth@vespa.ai>2023-05-22 11:05:26 +0200
commit1b2ce97684449b5cf8f02d099d3034984229bffe (patch)
tree3f952673b0ea6b3b93b6a79999c12edeadefdcaa /config-model/src/main
parent7f0e6584f6e8f3e38e491494b0a7b24d37db4187 (diff)
Model memory overhead
Diffstat (limited to 'config-model/src/main')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/search/NodeResourcesTuning.java7
1 files changed, 4 insertions, 3 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 5b747b93268..b444de5fb14 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
@@ -27,8 +27,9 @@ public class NodeResourcesTuning implements ProtonConfig.Producer {
private final int threadsPerSearch;
private final double fractionOfMemoryReserved;
- // "Reserve" 0.5GB of memory for other processes running on the content node (config-proxy, metrics-proxy).
- public static final double reservedMemoryGb = 0.7;
+ // 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,
@@ -128,7 +129,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() - reservedMemoryGb;
+ double usableMemoryGb = resources.memoryGb() - nodeMemoryOverheadGb;
return usableMemoryGb * (1 - fractionOfMemoryReserved);
}