diff --git a/config/resources.go b/config/resources.go index 31a5b5d7..a3e1b515 100644 --- a/config/resources.go +++ b/config/resources.go @@ -35,7 +35,7 @@ func CPUsToMicroseconds(cpus float64) int64 { // MiBToBytes converts given MiB amount to bytes. func MiBToBytes(mib int) int64 { - return int64(mib * 104858) + return int64(mib * 1048580) } // getDefaultCPUQuotaPerAgent returns the default CFS microseconds value allowed per agent @@ -45,5 +45,5 @@ func getDefaultCPUQuotaPerAgent() int64 { // getDefaultMemoryPerAgent returns the constant default memory allowed per agent. func getDefaultMemoryPerAgent() int64 { - return MiBToBytes(10000) + return MiBToBytes(1e3) } diff --git a/config/resources_test.go b/config/resources_test.go index 5e633d58..0a45ae75 100644 --- a/config/resources_test.go +++ b/config/resources_test.go @@ -11,7 +11,7 @@ func TestGetAgentResourceLimits(t *testing.T) { limits := GetAgentResourceLimits(ResourcesConfig{}) r.Equal(CPUsToMicroseconds(0.2), limits.CPUQuota) - r.Equal(MiBToBytes(10000), limits.Memory) + r.Equal(MiBToBytes(1000), limits.Memory) } func TestGetAgentResourceLimits_CustomValues(t *testing.T) {