Peter Zhu - Rails and the Ruby Garbage Collector: How to Speed Up Your Rails App - Rails World 2023

preview_player
Показать описание
The Ruby garbage collector is a highly configurable component of Ruby. However, it’s a black box to most Rails developers.

In this talk, @shopify Senior Developer & member of the Ruby Core team Peter Zhu shows you how Ruby's garbage collector works, ways to collect garbage collector metrics, how Shopify sped up their highest traffic app, Storefront Renderer, by 13%, and finally, introduces Autotuner, a new tool designed to help you tune the garbage collector of your Rails app.

Links:

#RailsWorld #RubyonRails #rails #rubygarbagecollection #autotuner

Рекомендации по теме
Комментарии
Автор

Thanks for this amazing talk.
For reader's knowledge, Ruby heap pages were 16kb for a long time (you will find a lot of resources saying they are 16kb) but this changed in late 2022 with Ruby 3.2 to 64kb, the update was made by Peter Zhu (speaker) :)

mathieueustachy
Автор

Very informative and helpful talk, Peter, thanks.!

edwingarcia
Автор

At 24:40 (out of band GC:

I think this calls for introducing an arena garbage collector in Ruby.

The area gets created at the beginning of the request, and it then freezes the memory it allocated at the end of the request.

We would get fine memory control in this type of situations where me know to some extend the lifetime of objects.

For reference we can look at Java's new Memory API (from project Panama).

edwingarcia