chore: decrease daemon resource pre allocation

This commit is contained in:
Julian Sommer
2026-05-01 11:42:32 +10:00
parent ca965e48d6
commit 4542b22e87
2 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ type hostReserve struct {
// defaultHostReserve is sized to cover predastore + viperblock under load;
// the daemon itself needs little.
var defaultHostReserve = hostReserve{vCPU: 2, memGB: 4.0}
var defaultHostReserve = hostReserve{vCPU: 2, memGB: 2.0}
// minHostMemHeadroomGB is the minimum schedulable memory we require above
// the reserve, so a host that just meets the reserve still has a small
+6 -6
View File
@@ -226,15 +226,15 @@ func TestApplyHostReserve(t *testing.T) {
totalVCPU: 16,
totalMemGB: 64.0,
wantVCPU: 2,
wantMem: 4.0,
wantMem: 2.0,
},
{
name: "boundary host (3 vCPU, 4.5 GB)",
name: "boundary host (3 vCPU, 2.5 GB)",
host: defaultHostReserve,
totalVCPU: 3,
totalMemGB: 4.5,
totalMemGB: 2.5,
wantVCPU: 2,
wantMem: 4.0,
wantMem: 2.0,
},
{
name: "too small: vCPU equals reserve",
@@ -254,14 +254,14 @@ func TestApplyHostReserve(t *testing.T) {
name: "too small: mem at reserve threshold (no headroom)",
host: defaultHostReserve,
totalVCPU: 8,
totalMemGB: 4.0,
totalMemGB: 2.0,
wantErr: true,
},
{
name: "too small: mem just under reserve+headroom",
host: defaultHostReserve,
totalVCPU: 8,
totalMemGB: 4.49,
totalMemGB: 2.49,
wantErr: true,
},
{