samnang
5/1/2012 - 5:15 AM

Ruby’s GC Configuration

Ruby’s GC Configuration

- http://www.coffeepowered.net/2009/06/13/fine-tuning-your-garbage-collector/
- http://snaprails.tumblr.com/post/241746095/rubys-gc-configuration

  article’s settings:                                     ("spec spec" took 17-23!sec)
	export RUBY_HEAP_MIN_SLOTS=1250000
	export RUBY_HEAP_SLOTS_INCREMENT=100000
	export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
	export RUBY_GC_MALLOC_LIMIT=30000000
	export RUBY_HEAP_FREE_MIN=12500

  37signals’s settings:                                   ("spec spec" took 17-18!sec)
	export RUBY_HEAP_MIN_SLOTS=600000
	export RUBY_HEAP_SLOTS_INCREMENT=10000
	export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1.8
	export RUBY_GC_MALLOC_LIMIT=59000000
	export RUBY_HEAP_FREE_MIN=100000

  twitter’s settings:                                     ("spec spec" took 17-28sec)
	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
	export RUBY_HEAP_FREE_MIN=4096

  _default’s settings:                                     ("spec spec" took 25-37sec)
	export RUBY_HEAP_MIN_SLOTS=10000
	export RUBY_HEAP_SLOTS_INCREMENT=10000
	export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1.8
	export RUBY_GC_MALLOC_LIMIT=8000000
	export RUBY_HEAP_FREE_MIN=4096