I’m considering moving a Rails app over from Heroku:
Rails 6.1.4.1
Ruby 2.7.4
Postgres 13
I’ve got everything working pretty well on the render side but have noticed that that some requests take much longer for the Render CPU (Starter Plus) to process than even the base Heroku Hobby dyno.
A complex request that takes about 1-2 seconds on Heroku is taking about 13-20 seconds on render. The logs show it’s almost all ActiveRecord:
Completed 200 OK in 13888ms (Views: 0.5ms | ActiveRecord: 13588.9ms | Allocations: 157653)
Yes a lot of allocations etc, it’s a very complex request. I’m just trying to figure out why the exact same request, with the same database and setup on Heroku, on a lower tier server, takes 1/10th the time to process.
Are there other setup steps I should be considering that could be affecting the ActiveRecord performance?