3 ms·
Yeah, you can certainly run puma in the same operational mode as unicorn with clustering. But what I'd suggest is that you do instead is creating 1.5 as many wo
by evanphx 13y ago
Yeah, you can certainly run puma in the same operational mode as unicorn with clustering. But what I'd suggest is that you do instead is creating 1.5 as many workers has you have cores in your machine and perhaps 8 threads per worker. With that configuration, you'll get much more even performance than unicorn because you won't get as much cpu thrashing from context switches between processes and the threads will allow a high number of concurrent requests to all make progress concurrently.
- FooBarWidget 13y agoHi Evan, thanks for your great work on Puma. Back in the days Mongrel was already multithreaded but it never reached its full potential because multithreading in the Rails world was so messed up back then. I'm glad to see that you've developed it into such a good state. When I checked your code, it was simple, clean and easy to read. Wonderful technology. Unicorn currently does have better fault-tolerance tools than Puma though, e.g. the 1-minute timeout on that Unicorn has by default. Unicorn also currently has more documentation than Puma. So there is a tradeoff in the choice, and there's still plenty that all the app servers can learn from each other.
- cmer 13y ago8 threads per worker on MRI? Isn't that a recipe for disaster? Or maybe I'm missing something?