aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2023-05-22 11:50:31 +0200
committerGitHub <noreply@github.com>2023-05-22 11:50:31 +0200
commit87173c30b69a522d1197206bfdc678931b62c16e (patch)
tree23fa017df5153664ab20121a482e479c330edb99 /config-model/src/main
parent07d0699378a589bcdffa08bba840b695a185ef99 (diff)
parent6429ecefcc607e78f7b9242744dd8d1e690c5537 (diff)
Merge pull request #27162 from vespa-engine/bratseth/memory-overhead
Model memory overhead
Diffstat (limited to 'config-model/src/main')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/search/NodeResourcesTuning.java8
1 files changed, 4 insertions, 4 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 981f6aa0d29..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,9 +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).
- // And 0.2GB for distributor and proton basics.
- 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,
@@ -129,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);
}