Add the following to your .bash_profile
. It's based off the 37 signals REE tuning.
# Ruby GC Tuning
export RUBY_HEAP_MIN_SLOTS=600000
export RUBY_GC_MALLOC_LIMIT=59000000
export RUBY_HEAP_FREE_MIN=100000
export RUBY_HEAP_MIN_SLOTS=600000 | |
export RUBY_GC_MALLOC_LIMIT=59000000 | |
export RUBY_HEAP_FREE_MIN=100000 |
Units: Finished tests in 439.690378s, 3.1568 tests/s, 9.5522 assertions/s.
Functionals: Finished tests in 445.060007s, 1.5616 tests/s, 4.8151 assertions/s.
Before: 884.750385 seconds
Units: Finished tests in 391.271548s, 3.5474 tests/s, 10.7342 assertions/s.
Functionals: Finished tests in 307.495845s, 2.2602 tests/s, 6.9692 assertions/s.
After: 698.767393
185.982 seconds OR 3.09 minutes faster
Unoptimized: http://ken.ht/unit-test-profiles | |
Test Optimization: Run Rake with GC flag optimizations stolen from 37 signals. | |
RUBY_HEAP_MIN_SLOTS=600000 RUBY_GC_MALLOC_LIMIT=59000000 RUBY_HEAP_FREE_MIN=100000 | |
No Optimization | |
Units: Finished tests in 439.690378s, 3.1568 tests/s, 9.5522 assertions/s. | |
Functionals: Finished tests in 445.060007s, 1.5616 tests/s, 4.8151 assertions/s. | |
= before: 884.750385 | |
GC Optimizations no profiling: | |
Finished tests in 391.271548s, 3.5474 tests/s, 10.7342 assertions/s. | |
Finished tests in 307.495845s, 2.2602 tests/s, 6.9692 assertions/s. | |
= after: 698.767393 | |
http://ken.ht/unit-test-profiles-optimized-gc | |
185.98299200000008s faster, 3.0997165333333347 minutes | |
20% faster |
Profiled Results: Before Optimizations / After Optimizations.