Skip to content

Commit

Permalink
Increase container ideal memory load to 0.9
Browse files Browse the repository at this point in the history
Vespa will now attempt to allocate memory to this level.
If we don't allow it, all allocations will be unfulfiled,
since adding more resources won't decrease used
memory per container.
  • Loading branch information
bratseth committed Jun 5, 2024
1 parent 52e29fb commit fc30c43
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class ClusterModel {
static final double idealQueryCpuLoad = 0.75;
static final double idealWriteCpuLoad = 0.95;

static final double idealContainerMemoryLoad = 0.8;
static final double idealContainerMemoryLoad = 0.9;
static final double idealContentMemoryLoad = 0.65;

static final double idealContainerDiskLoad = 0.95;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public void test_autoscaling_without_traffic_exclusive() {
fixture.tester().clock().advance(duration.negated());
fixture.loader().zeroTraffic(20, 1);
fixture.tester().assertResources("Scaled down",
2, 1, 2, 16, 100,
2, 1, 2, 8, 100,
fixture.autoscale());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ public void testScalingSuggestionsMaintainer() {
new TestMetric());
maintainer.maintain();

assertEquals("8 nodes with [vcpu: 3.3, memory: 4.5 Gb, disk: 10.0 Gb, bandwidth: 0.1 Gbps, architecture: any]",
assertEquals("8 nodes with [vcpu: 3.3, memory: 4.0 Gb, disk: 10.0 Gb, bandwidth: 0.1 Gbps, architecture: any]",
suggestionOf(app1, cluster1, tester).resources().get().toString());
assertEquals("7 nodes with [vcpu: 4.4, memory: 5.3 Gb, disk: 16.5 Gb, bandwidth: 0.1 Gbps, architecture: any]",
suggestionOf(app2, cluster2, tester).resources().get().toString());

// Secondary suggestions
assertEquals("9 nodes with [vcpu: 2.9, memory: 4.5 Gb, disk: 10.0 Gb, bandwidth: 0.1 Gbps, architecture: any]",
assertEquals("9 nodes with [vcpu: 2.9, memory: 4.0 Gb, disk: 10.0 Gb, bandwidth: 0.1 Gbps, architecture: any]",
suggestionsOf(app1, cluster1, tester).get(1).resources().get().toString());
assertEquals("8 nodes with [vcpu: 3.8, memory: 4.7 Gb, disk: 14.2 Gb, bandwidth: 0.1 Gbps, architecture: any]",
suggestionsOf(app2, cluster2, tester).get(1).resources().get().toString());
Expand All @@ -89,7 +89,7 @@ public void testScalingSuggestionsMaintainer() {
addMeasurements(0.10f, 0.10f, 0.10f, 0, 500, app1, tester.nodeRepository());
maintainer.maintain();
assertEquals("Suggestion stays at the peak value observed",
"8 nodes with [vcpu: 3.3, memory: 4.5 Gb, disk: 10.0 Gb, bandwidth: 0.1 Gbps, architecture: any]",
"8 nodes with [vcpu: 3.3, memory: 4.0 Gb, disk: 10.0 Gb, bandwidth: 0.1 Gbps, architecture: any]",
suggestionOf(app1, cluster1, tester).resources().get().toString());
// Utilization is still way down and a week has passed
tester.clock().advance(Duration.ofDays(7));
Expand Down

0 comments on commit fc30c43

Please sign in to comment.