mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-20 19:25:52 +00:00
chore: decrease daemon resource pre allocation
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user