Skip to content

Instantly share code, notes, and snippets.

@SkyWriter
Created December 6, 2011 08:04
Show Gist options
  • Save SkyWriter/1437311 to your computer and use it in GitHub Desktop.
Save SkyWriter/1437311 to your computer and use it in GitHub Desktop.
Установка параметров управления памятью для 1.9.2
#!/bin/bash
case "$rvm_ruby_string" in
*ree*|*ruby-1.9.2*)
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
;;
*)
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
;;
esac
@SkyWriter
Copy link
Author

Это нужно положить в ~/.rvm/hooks/ и сделать chmod a+x after_use_heap_tune .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment