jemalloc
LD_PRELOAD=/usr/local/Cellar/jemalloc/3.6.0/lib/libjemalloc.dylib unicorn -c config/unicorn.rb -E production -p 3000
-
http://samsaffron.com/archive/2014/04/08/ruby-2-1-garbage-collection-ready-for-production
LD_PRELOAD=/home/sam/Source/jemalloc-3.5.0/lib/libjemalloc.so RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=0.9 ruby stress.rb
-
http://samsaffron.com/archive/2014/04/08/ruby-2-1-garbage-collection-ready-for-production
-
https://discussion.heroku.com/t/tuning-rgengc-2-1-on-heroku/359/19
gc out of band
- http://architects.dzone.com/articles/unicorn-rawk-kick-gc-out-band
- http://tmm1.net/ruby21-oobgc/
- https://www.digitalocean.com/community/tutorials/how-to-optimize-unicorn-workers-in-a-ruby-on-rails-app