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

Commit

Permalink
Up the memory/cpu req/limits
Browse files Browse the repository at this point in the history
Signed-off-by: tylerslaton <[email protected]>
  • Loading branch information
tylerslaton committed Jun 21, 2023
1 parent e5533b0 commit 76a6686
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
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: 500m
memory: 1Gi
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: 500m
memory: 1Gi
priorityClassName: system-cluster-critical
serviceAccountName: acorn-system
tolerations:
Expand Down
25 changes: 15 additions & 10 deletions pkg/system/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,24 @@ 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(float64(1 << 20)) // 1 MiB in bytes
gi = int64(float64(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
defaultMemoryRequest = *resource.NewQuantity(256*mi, resource.BinarySI) // DEFAULT_MEMORY_REQUEST
defaultMemoryLimit = *resource.NewQuantity(1*gi, resource.BinarySI) // DEFAULT_MEMORY_LIMIT
defaultCPURequest = *resource.NewMilliQuantity(500, resource.DecimalSI) // DEFAULT_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
registryMemoryRequest = defaultMemoryRequest // REGISTRY_MEMORY_REQUEST
registryMemoryLimit = defaultMemoryLimit // REGISTRY_MEMORY_LIMIT
registryCPURequest = defaultCPURequest // REGISTRY_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
buildkitdMemoryRequest = defaultMemoryRequest // BUILDKITD_MEMORY_REQUEST
buildkitdMemoryLimit = defaultMemoryLimit // BUILDKITD_MEMORY_LIMIT
buildkitdCPURequest = defaultCPURequest // BUILDKITD_CPU_REQUEST

buildkitdServiceMemoryRequest = defaultMemoryRequest // BUILDKITD_SERVICE_MEMORY_REQUEST
buildkitdServiceMemoryLimit = defaultMemoryLimit // BUILDKITD_SERVICE_MEMORY_LIMIT
buildkitdServiceCPURequest = defaultCPURequest // BUILDKITD_SERVICE_CPU_REQUEST
)

func RegistryResources() corev1.ResourceRequirements {
Expand Down

0 comments on commit 76a6686

Please sign in to comment.