Add GOGC configuration value
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
helm install gitlab-zoekt .
- Execute
kubectl describe pod gitlab-zoekt-0
and verify that GOGC is unset forzoekt-webserver
andzoekt-indexer
helm upgrade gitlab-zoekt . --set webserver.goGc.enabled=true --set webserver.goGc.value=55 --set indexer.goGc.enabled=true --set indexer.goGc.value=75
- Execute
kubectl describe pod gitlab-zoekt-0
and verify that GOGC is set forzoekt-webserver
andzoekt-indexer
zoekt-webserver:
...
Environment:
GOGC: 55
zoekt-indexer:
...
Environment:
GOGC: 75
- 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