Skip to content

Add GOGC configuration value

Dmitry Gruzd requested to merge add-gogc-env-variable into main

What does this MR do and why?

This MR adds an option to configure GOGC for zoekt-indexer and zoekt-webserver. We might need it to fix occasional out of memory restarts.

How to set up and validate locally

  1. helm install gitlab-zoekt .
  2. Execute kubectl describe pod gitlab-zoekt-0 and verify that GOGC is unset for zoekt-webserver and zoekt-indexer
  3. helm upgrade gitlab-zoekt . --set webserver.goGc.enabled=true --set webserver.goGc.value=55 --set indexer.goGc.enabled=true --set indexer.goGc.value=75
  4. Execute kubectl describe pod gitlab-zoekt-0 and verify that GOGC is set for zoekt-webserver and zoekt-indexer
  zoekt-webserver:
    ...
    Environment:
      GOGC:  55
  zoekt-indexer:
    ...
    Environment:
      GOGC:  75
  1. You can also use:
$ kubectl exec gitlab-zoekt-0 -c zoekt-indexer -- env | fgrep GOGC
GOGC=75
$ kubectl exec gitlab-zoekt-0 -c zoekt-webserver -- env | fgrep GOGC
GOGC=55
Edited by Dmitry Gruzd

Merge request reports