r/ruby • • Dec 25 '22

Ruby 3.2.0 Released

https://www.ruby-lang.org/en/news/2022/12/25/ruby-3-2-0-released/
234 Upvotes

26 comments sorted by

View all comments

7

u/jrochkind Dec 25 '22

I would love to hear more about YJIT. Who's using it in production? Should you expect increased RAM consumption, about how much?

11

u/f9ae8221b Dec 25 '22

Should you expect increased RAM consumption

Yes. All JIT (not just the ruby ones) necessarily increase memory usage as they need to store the compiled code as well as some runtime metadata used to compiled.

about how much?

That's configurable. By default YJIT will use up to 64MB of executable memory, but also use some space for runtime metadata, from our experience it's about 2 or 3x the executable memory.

So for a mid to large app I'd say about ~200MB per process, you can however configure it to use less, it just won't be able to optimize as much.

1

u/jrochkind Dec 27 '22

Thank you, that's very helpful lay of land!