Differences between revisions 1 and 2
Revision 1 as of 2022-08-05 13:07:56
Size: 613
Editor: ?vv221
Comment: New GitLab tweak: Run puma in single process mode
Revision 2 as of 2022-08-07 18:35:58
Size: 726
Editor: ?vv221
Comment: Provide more realistic mesurements for reclaimed RAM with Puma single mode
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
By default, [[puma]] is run in cluster mode, with three dedicated workers. On small instances you can reclaim ~1.5GB of RAM by disabling this cluster mode in favour of a single process. By default, [[puma]] is run in cluster mode, with three dedicated workers. According to [[https://gitlab.com/gitlab-org/memory-team/memory-team-2gb-week/-/issues/2#note_449139363|some measurements]] you can reclaim up to 250MB of memory by disabling this cluster mode in favour of a single process.

Tweaks for GitLab

Reduce memory usage on small instances

Run puma in single process mode

By default, ?puma is run in cluster mode, with three dedicated workers. According to some measurements you can reclaim up to 250MB of memory by disabling this cluster mode in favour of a single process.

Disabling puma cluster mode is done in the configuration file /etc/gitlab/puma.rb. Look for the following line:

workers 3

and replace it with:

workers 0

Once the change in configuration is done, you need to restart puma with:

# service gitlab-puma.service restart