Re:Why Wasn't Ruby 3 Faster?
by jacobsenscott on Thursday February 11, 2021 @01:39AM
(#26098901)
If you were IO bound you could have run many more rails processes. There's no reason to limit your self to one process per core. You can run many times that number of processes since they are all just waiting on IO.
Re:Why Wasn't Ruby 3 Faster?
by EdwardDiego on Thursday February 11, 2021 @04:32AM
(#26099757)
I'm sure the original commenter is loving all your 20/20 hindsight.
The original commenter offered his story as an issue with Ruby preventing X.
The 20/20 hindsight is not meant to retroactively solve their problem, it's mean as a counter-argument, that the problem was their design, not Ruby.
Re:Why Wasn't Ruby 3 Faster?
by Person5478 on Thursday February 11, 2021 @08:30AM
(#26101256)
The posters point is that Ruby has surprising concurrency semantics compared to other solutions.
It has the same concurrency semantics w/r/t IO as any other language that isn't using an event based runtime. If you wrote your app in C and used a single thread you'd have the exact same issue.
Ruby should be able to execute more than one request on a time because while it can only have one thread executing Ruby at a time it can run other threads while waiting for IO. It seems like for some reason Rails was limited to one thread which is not how it should be configured.
What is Passenger exactly? Never heard of it before now. A quick Google brings up a marketing page that doesn't explain much more.
Re:Why Wasn't Ruby 3 Faster?
by ForHackernews on Thursday February 11, 2021 @03:49AM
(#26099556)
It's an application server. If you're familiar with the Python webdev ecosystem, Passenger is roughly a Ruby equivalent for something like uWSGI or Gunicorn. (IIRC, you can actually run Python apps with Passenger now, too)
Where now = for 5 years or more.
Something like mod_perl / mod_xxx in the early days... and they did some work on the concurrency problems with rails and ruby around the ruby 1.8 days iirc... In the meantime they expanded to more languages...
Not sure if you mean this page or not:
https://www.phusionpassenger.com/
But as they say, it's an application server. Similar to mod_perl for apache/php, unicorn or indeed nodejs (which can function as an application server for Javascript).
Re:Why Wasn't Ruby 3 Faster?
by johnmcauley on Thursday February 11, 2021 @01:18AM
(#26098791)
It’s a Ruby web server that can we bed used with nginx or Apache.
You're absolutely right when you say there was something seriously wrong with the setup! The problem is that it was more or less what you'd get if you set up a default Rails app behind Passenger, and Passenger did this because some of the major Ruby gems weren't threadsafe (e.g. Rails, until 2008), which comes back to concurrency problems with the ecosystem.