Skip to content

Bump gitlab-exporter to v10, tune GC settings

Matthias Käppler requested to merge mk-gitlab-exporter-jemalloc into master

What does this MR do?

See gitlab-org/omnibus-gitlab!4922 (merged)

These changes will make gitlab-exporter less memory hungry by:

  • using a newer gitlab-exporter version that runs a full GC cycle after each request
  • tunes the jemalloc memory allocator to better suit this service's needs

NOTE: this MR requires a change in CNG: gitlab-org/build/CNG!588 (merged)

Related issues

Test plan

NOTE: This requires gitlab-exporter 10, which is not on CNG master yet. You can use the following build tag to test this locally:

helm upgrade gitlab . \                                                         
  --set global.hosts.domain=192.168.18.5.nip.io \
  -f examples/kind/values-base.yaml \
  -f examples/kind/values-ssl.yaml \
--set gitlab.gitlab-exporter.enabled=true \
--set gitlab.gitlab-exporter.image.tag=5b20a1693e001b7227ea1696dc7cef13c7bc8eec

We expect to see no difference in functional behavior, but a drop in memory use.

To verify that the new settings are being applied:

  • install the gitlab Chart from this MR and run the cluster
  • make sure that gitlab-exporter is enabled and running (e.g. kubectl get pod)
  • shell into pod and find its pid, e.g. pgrep -af gitlab-exporter
  • run xargs -0 -L1 -a /proc/<pid>/environ | grep MALLOC; it should list the string as configured
  • run pmap <pid> | grep jemalloc (files mapped into process memory); it should list libjemalloc.so

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • Merge Request Title and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for omnibus-gitlab opened
Edited by Matthias Käppler

Merge request reports