Hi there, I have deployed my Rails app to Rails 7.1.1 and we found that the request time had increased from <100ms to >500ms , we are using ruby 3.2.2 and when we activate the env RUBY_YJIT_ENABLE=true the site site responses increases to over 600ms.
the main entry point is graphql, not sure if that could be the bottleneck here.
ok, I’ve downgraded to ruby 3.2.0 , but with the flag YIJIT flag the requests are slower too, this is so weird. I’ve also disabled the YIJIT, and now the app flies again. Some pictures on the system
In general you’re going to need to experiment with the call threshold to see what works best for your application. One of our engineers after seeing your post recommended trying --yjit-call-threshold=200 and do the comparison of side-by-side (run a portion of requests on yjit, and a portion on regular ruby) instead of before/after. One of the challenges with before/after is that response times vary time of day and location in the world, increased traffic from social, etc so you’re not getting as accurate data with before/after.