Enable jemalloc on all GitLab.com environments
It was found in production#2778 (comment 432371721) that unlike omnibus we are not using jemalloc
on kubernetes nodes which is resulting in differences for memory allocation on the pods.
See https://medium.com/rubyinside/how-we-halved-our-memory-consumption-in-rails-with-jemalloc-86afa4e54aa3 for more information on jemalloc as well as gitlab-org/omnibus-gitlab#1556 (closed) for the original issue that enabled this in omnibus.
Once gitlab-org/build/CNG!536 (merged) is merged, we can test this in non-prod environments.
-
Confirm that /usr/lib/libjemalloc.so
is available on pods -
Set LD_PRELOAD=/usr/lib/libjemalloc.so
on non-production environments gitlab-com/gl-infra/k8s-workloads/gitlab-com!474 (merged) -
Set LD_PRELOAD=/usr/lib/libjemalloc.so
on all sidekiq shards gitlab-com/gl-infra/k8s-workloads/gitlab-com!475 (merged) -
Set LD_PRELOAD=/usr/lib/libjemalloc.so
on canary and main webservice gitlab-com/gl-infra/k8s-workloads/gitlab-com!476 (merged)
After switching to libjemalloc.so
we should evaluate the memory profile of pods to see the impact.
Edited by John Jarvis