Skip to content

Commit

Permalink
helm: set GOMAXPROCS on ingesters (#9283)
Browse files Browse the repository at this point in the history
* Helm: set GOMAXPROCS on ingesters

Signed-off-by: Dimitar Dimitrov <[email protected]>

* Add changelog entry

Signed-off-by: Dimitar Dimitrov <[email protected]>

* Update CHANGELOG.md entry

Signed-off-by: Dimitar Dimitrov <[email protected]>

* update helm tests

* Update operations/helm/charts/mimir-distributed/templates/ingester/ingester-statefulset.yaml

Co-authored-by: Vernon Miller <[email protected]>

---------

Signed-off-by: Dimitar Dimitrov <[email protected]>
Co-authored-by: Vernon Miller <[email protected]>
  • Loading branch information
dimitarvdimitrov and aldernero authored Sep 17, 2024
1 parent b616a99 commit bdd443b
Show file tree
Hide file tree
Showing 27 changed files with 199 additions and 16 deletions.
5 changes: 5 additions & 0 deletions operations/compare-helm-with-jsonnet/helm/00-base/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ rollout_operator:
ingester:
zoneAwareReplication:
enabled: false
resources:
requests:
# request the same as jsonnet, so that the derived GOMAXPROCS are the same
cpu: 4
memory: 15Gi
store_gateway:
zoneAwareReplication:
enabled: false
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,3 @@ patches:
patch: |-
- op: remove
path: /spec/template/metadata/namespace
# TODO dimitarvdimitrov: GOMAXPROCS isn't present in Helm for now
- target:
name: mimir-ingester
kind: StatefulSet
patch: |-
- op: remove
path: /spec/template/spec/containers/0/env
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ patches:
- op: remove
path: /spec/template/spec/containers/0/env
# TODO dimitarvdimitrov: GOMAXPROCS isn't present in Helm for now
- target:
name: mimir-ingester
kind: StatefulSet
patch: |-
- op: remove
path: /spec/template/spec/containers/0/env
# TODO(logiraptor): Jsonnet uses a deprecated PodDisruptionBudget api version
- target:
name: mimir-(ingester|store-gateway)
Expand Down
1 change: 1 addition & 0 deletions operations/helm/charts/mimir-distributed/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Entries should include a reference to the Pull Request that introduced the chang
* [ENHANCEMENT] Helm : allow setting a read and write urls to continous-test. #8741
* [ENHANCEMENT] Add support for running continuous-test with GEM #8837
* [ENHANCEMENT] Alerts: `RequestErrors` and `RulerRemoteEvaluationFailing` have been enriched with a native histogram version. #9004
* [ENHANCEMENT] Ingester: set GOMAXPROCS to help with golang scheduling overhead when running on machines with a lot of cores. #9283
* [BUGFIX] Add missing container security context to run `continuous-test` under the restricted security policy. #8653
* [BUGFIX] Add `global.extraVolumeMounts` to the exporter container on memcached statefulsets #8787
* [BUGFIX] Fix helm releases failing when `querier.kedaAutoscaling.predictiveScalingEnabled=true`. #8731
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,13 @@ spec:
{{- $jaeger_queue_size := dig "jaegerReporterMaxQueueSize" nil .Values.ingester }}
{{- if or .Values.global.extraEnv .Values.ingester.env $jaeger_queue_size }}
env:
{{- $cpu_request := dig "requests" "cpu" nil .Values.ingester.resources }}
{{- if $cpu_request }}
{{- $cpu_request_between_3_and_6 := include "mimir.parseCPU" (dict "value" $cpu_request) | float64 | min 6 | max 3 }}
{{/* copy logic from operations/mimir/ingester.libsonnet */}}
- name: "GOMAXPROCS"
value: {{ addf $cpu_request $cpu_request_between_3_and_6 1 | ceil | toString | toYaml }}
{{- end }}
{{- with .Values.global.extraEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -290,6 +293,9 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -437,5 +443,8 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -272,6 +275,9 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -410,5 +416,8 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -262,6 +265,9 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -395,5 +401,8 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,8 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -262,6 +265,9 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -395,5 +401,8 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -262,6 +265,9 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -395,5 +401,8 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -262,6 +265,9 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -395,5 +401,8 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "8"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -294,6 +297,9 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "8"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -443,5 +449,8 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "8"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,8 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -266,6 +269,9 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -401,5 +407,8 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -264,6 +267,9 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -398,5 +404,8 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "8"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -294,6 +297,9 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "8"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -443,5 +449,8 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "8"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -272,6 +275,9 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -410,5 +416,8 @@ spec:
- ALL
readOnlyRootFilesystem: true
env:

- name: "GOMAXPROCS"
value: "4"
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Loading

0 comments on commit bdd443b

Please sign in to comment.