Created
February 17, 2011 08:55
-
-
Save mocoso/831330 to your computer and use it in GitHub Desktop.
Save this to ~/.rvm/hooks/ to tweak the GC (reducing the number of times it runs) for REE under RVM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "RVM - using $rvm_ruby_string" | |
case "$rvm_ruby_string" in | |
ree*) | |
export RUBY_GC_MALLOC_LIMIT=50000000 | |
export RUBY_HEAP_MIN_SLOTS=1250000 | |
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 | |
export RUBY_HEAP_SLOTS_INCREMENT=500000 | |
echo "Garbage collection tweaked" | |
;; | |
*) | |
unset RUBY_HEAP_MIN_SLOTS RUBY_HEAP_SLOTS_INCREMENT RUBY_HEAP_SLOTS_GROWTH_FACTOR RUBY_GC_MALLOC_LIMIT RUBY_HEAP_FREE_MIN | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment