Skip to content

Instantly share code, notes, and snippets.

@bryanl
Created June 6, 2012 15:44
Show Gist options
  • Save bryanl/2882782 to your computer and use it in GitHub Desktop.
Save bryanl/2882782 to your computer and use it in GitHub Desktop.
if [ "F$1" == "F" ]; then
echo "Tuning GC settings"
export RUBY_HEAP_MIN_SLOTS=1000000
export RUBY_HEAP_SLOTS_INCREMENT=1000000
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
export RUBY_GC_MALLOC_LIMIT=1000000000
export RUBY_HEAP_FREE_MIN=500000
export RUBY_FREE_MIN=$RUBY_HEAP_FREE_MIN
else
echo "Untuning GC settings"
unset RUBY_HEAP_MIN_SLOTS RUBY_HEAP_SLOTS_INCREMENT RUBY_HEAP_SLOTS_GROWTH_FACTOR RUBY_GC_MALLOC_LIMIT RUBY_HEAP_FREE_MIN RUBY_FREE_MIN
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment