Skip to content

Instantly share code, notes, and snippets.

@nesquena
Created October 29, 2010 21:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nesquena/654409 to your computer and use it in GitHub Desktop.
Save nesquena/654409 to your computer and use it in GitHub Desktop.
Performance Turning for REE
# http://www.rubyenterpriseedition.com/documentation.html#_garbage_collector_performance_tuning
# http://snaprails.tumblr.com/post/241746095/rubys-gc-configuration
# http://smartic.us/2010/10/27/tune-your-ruby-enterprise-edition-garbage-collection-settings-to-run-tests-faster/
# http://izumi.plan99.net/blog/wp-content/uploads/2009/01/ree-documentation.html#_garbage_collector_performance_tuning
$ sudo nano /usr/local/bin/tuned_ruby
# !/bin/bash 
export RUBY_HEAP_MIN_SLOTS=500000
export RUBY_HEAP_SLOTS_INCREMENT=250000
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
export RUBY_GC_MALLOC_LIMIT=50000000
exec "/usr/local/bin/ruby" "$@"
$ sudo chmod a+x /usr/local/bin/tuned_ruby
$ sudo nano /etc/nginx/conf/includes/passenger.conf
passenger_ruby /usr/local/bin/tuned_ruby;
$ sudo service nginx restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment