Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support malloc / oldmalloc increase bytes limit GC stat #305

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

booleanbetrayal
Copy link
Contributor

@booleanbetrayal booleanbetrayal commented Jan 30, 2024

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.

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

@booleanbetrayal booleanbetrayal changed the title feat(process): support malloc / oldmalloc increase bytes limit GC stat Support malloc / oldmalloc increase bytes limit GC stat Jan 30, 2024
@SamSaffron
Copy link
Member

looks good, sure we can add

@SamSaffron SamSaffron merged commit f54709a into discourse:main Jan 30, 2024
14 checks passed
@booleanbetrayal
Copy link
Contributor Author

thanks @SamSaffron !

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

Successfully merging this pull request may close these issues.

2 participants