You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I haven't personally seen the memory footprint of our existing application, but I noticed we weren't using jemalloc flag in our version of Ruby.
( How do I know? If you try this one liner bundle exec ruby -r rbconfig -e "puts RbConfig::CONFIG['MAINLIBS']", you should see -ljemalloc as a config option)
jemalloc is an alternate implementation of the underlying malloc memory allocation function that Ruby uses, and it tends to work quite well with monolith application implementations. I've personally used it on two monoliths and seen dramatic memory footprint reductions, and no downsides. Here is an article describing someone's experience adding it, with a couple tasty graphs: https://medium.com/rubyinside/how-we-halved-our-memory-consumption-in-rails-with-jemalloc-86afa4e54aa3
If you need further proof, Mike Perham himself tried to make this default in Ruby: https://bugs.ruby-lang.org/issues/14718
Looks like they were close to adding this into the default, but so far have not agreed on implementing it since it will effect such a wide range of machines. Shouldn't be an issue on our end, especially if we test it properly beforehand.
The text was updated successfully, but these errors were encountered:
Thank you! I have no objections, but we should definitely make sure let operations know when we're ready to merge, just in case they see anything weird pop up in their logs.
I haven't personally seen the memory footprint of our existing application, but I noticed we weren't using
jemalloc
flag in our version of Ruby.( How do I know? If you try this one liner
bundle exec ruby -r rbconfig -e "puts RbConfig::CONFIG['MAINLIBS']"
, you should see-ljemalloc
as a config option)jemalloc
is an alternate implementation of the underlyingmalloc
memory allocation function that Ruby uses, and it tends to work quite well with monolith application implementations. I've personally used it on two monoliths and seen dramatic memory footprint reductions, and no downsides. Here is an article describing someone's experience adding it, with a couple tasty graphs:https://medium.com/rubyinside/how-we-halved-our-memory-consumption-in-rails-with-jemalloc-86afa4e54aa3
If you need further proof, Mike Perham himself tried to make this default in Ruby:
https://bugs.ruby-lang.org/issues/14718
Looks like they were close to adding this into the default, but so far have not agreed on implementing it since it will effect such a wide range of machines. Shouldn't be an issue on our end, especially if we test it properly beforehand.
The text was updated successfully, but these errors were encountered: