Skip to content

Instantly share code, notes, and snippets.

@mjansen401
Created May 7, 2012 21:10
Show Gist options
  • Save mjansen401/2630461 to your computer and use it in GitHub Desktop.
Save mjansen401/2630461 to your computer and use it in GitHub Desktop.
Tune Ruby's garbage collector
Courtesy of http://www.rubyenterpriseedition.com/documentation.html#_garbage_collector_performance_tuning
Add to your .bash_profile:
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment