RailsMallocTrim
Drop-in library for RAILS app to save some memory.
Gem will call malloc_trim
after every GC run. This gem solves the problem with the minimum possible effort.
It will check if malloc_trim
is available and then enables trimming along with loading your Rails app
Installation
Just put it in your Gemfile:
gem 'rails_malloc_trim', '~> 0.2'
Done!
Impact
- 99th percentile performance is slightly impacted
- CPU is very slightly higher
License
The gem is available as open source under the terms of the MIT License.