jemalloc does not greedily allocate memory, and it's not clear to me how you would think so from reading that gitlab issue discussion. I can well imagine jemalloc not behaving as desired under certain conditions, but if so it's surely more involved than wanton naivete.
Re:Gitlab 10.7 Released
by jbergstroem on Sunday April 22, 2018 @03:54PM
(#16898188)
I explained poorly. I ran into issues with updating jemalloc as part of a software update. While debugging the issue I disabled jemalloc (unsetting the ld_preload) and noticied a sharp difference in how much memory ruby had allocated. I guess _pre_allocating is incorrect and a better explanation is _not releasing it_. Thanks for rebutting my argument and giving me the opportunity to elaborate.
Also, the cookbook for setting up postgres also takes your total ram into account.
1: https://gitlab.com/gitlab-org/omnibus-gitlab/issues/3313