I came across Fred Wu's post endorsing tweaking your MRI Ruby garbage collection settings for great justice. The results in the post and comments indicated ~33% speedup. Intrigued, I started looking into it more and found more in-depth explanations for the magic by Dennis Taylor and on StackOverflow.
After local testing that put our numbers in line with Fred Wu and readers', I tried it out on our test environment in Jenkins. Preliminary results are a 42.45% speedup on an M1 Large Amazon EC2 instance (7.5 GiB).
Awesome.
Without tweaks:
Baseline of about 4:15-4:30, based on prior experience.
With tweaks:
A significant improvement, pretty much in line with results on Fred Wu's post.
With tweaks and a ridiculous Ruby GC Malloc Limit (1,000,000,000):
I was testing Dennis Taylor's post on Goclio, but it seemed to negatively affect the speed. Note that at the time, the tweaked tests were running in around 2 minutes and 35 seconds.
With RUBY_HEAP_FREE_MIN instead of RUBY_FREE_MIN:
I was messing around to see whether RUBY_HEAP_~ was a valid variable to use. According to the StackOverflow post, RUBY_FREE_MIN is the correct variable name.
With RUBY_MIN_SLOTS:
While this was left out of Fred Wu's post, it seemed not to affect test speed.
I understand that these tests are not statistically rigorous. I'm okay with that.