This PR adds support for Ruby GC statistic metrics malloc_increase_bytes_limit and oldmalloc_increase_bytes_limit. These metrics are useful in determining malloc limits for GC tuning, preventing unnecessary limit threshold recalculations and expansion.
We use these values from Production to tune RUBY_GC_MALLOC_LIMIT and RUBY_GC_OLDMALLOC_LIMIT accordingly.
We see that appropriate tuning of these metrics can help to alleviate immediate cold start / reboot request latency in our application.
This PR adds support for Ruby GC statistic metrics
malloc_increase_bytes_limit
andoldmalloc_increase_bytes_limit
. These metrics are useful in determining malloc limits for GC tuning, preventing unnecessary limit threshold recalculations and expansion.We use these values from Production to tune
RUBY_GC_MALLOC_LIMIT
andRUBY_GC_OLDMALLOC_LIMIT
accordingly.We see that appropriate tuning of these metrics can help to alleviate immediate cold start / reboot request latency in our application.
see also: https://blog.appsignal.com/2021/11/17/practical-garbage-collection-tuning-in-ruby.html see also: https://engineering.appfolio.com/appfolio-engineering/2018/6/27/ruby-memory-environment-variables-simpler-than-they-look