Draft: Tweak Puma Ruby GC in webservice Chart
Note: This should be the last step in gitlab-com/gl-infra/production#3680 (closed)
What does this MR do?
Our application is memory heavy and allocates a lot of long-lived objects during boot, since Puma/Rails preload the application. We measured the required heap slots to be just under 3M, and found that sizing the heap accordingly comes with a reduction in memory use and decrease in start-up time, since the GC has less work to do and allocates fewer heap pages upfront.
For now this is meant to apply to Puma only; we are not targeting Sidekiq yet.
Related issues
gitlab-org/gitlab#289838 (closed)
Test plan
- run
webservice
pod with these changes applied - shell into pod and run
env | grep RUBY_GC_HEAP_INIT_SLOTS
- verify the output is
RUBY_GC_HEAP_INIT_SLOTS=3000000
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: gitlab-org/omnibus-gitlab!5019 (closed)
Edited by Matthias Käppler