Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Up the memory/cpu req/limits #1825

Merged
merged 1 commit into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/install/apiserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ spec:
runAsUser: 1000
resources:
requests:
cpu: 50m
memory: 100Mi
cpu: 100m
memory: 256Mi
priorityClassName: system-cluster-critical
serviceAccountName: acorn-system
tolerations:
Expand Down
4 changes: 2 additions & 2 deletions pkg/install/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ spec:
port: 8888
resources:
requests:
cpu: 150m
memory: 200Mi
cpu: 100m
memory: 256Mi
priorityClassName: system-cluster-critical
serviceAccountName: acorn-system
tolerations:
Expand Down
21 changes: 11 additions & 10 deletions pkg/system/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,20 @@ import (
// on metrics we have collected from internal use. You can override these values by setting
// the corresponding environment variable.
var (
mi = int64(1_048_576) // 1 MiB in bytes
mi = int64(1 << 20) // 1 MiB in bytes
gi = int64(1 << 30) // 1 GiB in bytes.

registryMemoryRequest = *resource.NewQuantity(40*mi, resource.BinarySI) // REGISTRY_MEMORY_REQUEST
registryMemoryLimit = *resource.NewQuantity(80*mi, resource.BinarySI) // REGISTRY_MEMORY_LIMIT
registryCPURequest = *resource.NewMilliQuantity(50, resource.DecimalSI) // REGISTRY_CPU_REQUEST
registryMemoryRequest = *resource.NewQuantity(128*mi, resource.BinarySI) // REGISTRY_MEMORY_REQUEST
registryMemoryLimit = *resource.NewQuantity(512*mi, resource.BinarySI) // REGISTRY_MEMORY_LIMIT
registryCPURequest = *resource.NewMilliQuantity(200, resource.DecimalSI) // REGISTRY_CPU_REQUEST

buildkitdMemoryRequest = *resource.NewQuantity(100*mi, resource.BinarySI) // BUILDKITD_MEMORY_REQUEST
buildkitdMemoryLimit = *resource.NewQuantity(200*mi, resource.BinarySI) // BUILDKITD_MEMORY_LIMIT
buildkitdCPURequest = *resource.NewMilliQuantity(50, resource.DecimalSI) // BUILDKITD_CPU_REQUEST
buildkitdMemoryRequest = *resource.NewQuantity(256*mi, resource.BinarySI) // BUILDKITD_MEMORY_REQUEST
buildkitdMemoryLimit = *resource.NewQuantity(1*gi, resource.BinarySI) // BUILDKITD_MEMORY_LIMIT
buildkitdCPURequest = *resource.NewMilliQuantity(800, resource.DecimalSI) // BUILDKITD_CPU_REQUEST

buildkitdServiceMemoryRequest = *resource.NewQuantity(70*mi, resource.BinarySI) // BUILDKITD_SERVICE_MEMORY_REQUEST
buildkitdServiceMemoryLimit = *resource.NewQuantity(140*mi, resource.BinarySI) // BUILDKITD_SERVICE_MEMORY_LIMIT
buildkitdServiceCPURequest = *resource.NewMilliQuantity(50, resource.DecimalSI) // BUILDKITD_SERVICE_CPU_REQUEST
buildkitdServiceMemoryRequest = *resource.NewQuantity(128*mi, resource.BinarySI) // BUILDKITD_SERVICE_MEMORY_REQUEST
buildkitdServiceMemoryLimit = *resource.NewQuantity(256*mi, resource.BinarySI) // BUILDKITD_SERVICE_MEMORY_LIMIT
buildkitdServiceCPURequest = *resource.NewMilliQuantity(200, resource.DecimalSI) // BUILDKITD_SERVICE_CPU_REQUEST
)

func RegistryResources() corev1.ResourceRequirements {
Expand Down