Ruby 4.0.2 performance issues

Hello,

We tried to upgrade Ruby from 3.4.8 to 4.0.2.

In Heroku I saw this, at night, when we don’t have deploys.

I don’t like these spikes. Traffic is the same. For now, we rollback Ruby to 3.4.9 and it seems to be stable as before.

Any recommendations on what to check? Maybe tune GC? Puma? We are at Performance L dynos for web, and we have high traffic. And looks like the performance of workers was the same.

Thank you

3 Likes

There was zjit introduced in 4.0. yjit is setup by default.

That is the main thing that comes to mind but I have no experience with this causing issues for me. I don’t know if Heroku would enable any of this by default.

Can be this https://bugs.ruby-lang.org/issues/21856

1 Like