Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Puma Workers and Threads Suggestion

Can you please suggest Puma Workers and Threads per worker for a real-time app and heavy traffic?

I am using Cloudflare Load-balancers with 8 Dedicated Servers each is 64GB RAM and 16 Core (32 Threads) CPU. Please suggest the max/min number of workers and threads I should start my testing.

Ruby 2.7

Rails 6

like image 209
Adnan Tahir Avatar asked Oct 28 '25 14:10

Adnan Tahir


1 Answers

As always, the answer is, "it depends" (on your application).

Here are some articles on the subject that could help guide your testing:

  • https://www.speedshop.co/2017/10/12/appserver.html
  • https://www.speedshop.co/2020/05/11/the-ruby-gvl-and-scaling.html
  • https://www.speedshop.co/2017/12/04/malloc-doubles-ruby-memory.html

(The articles are written by Nate, one of the maintainers of Puma.)

like image 51
dentarg Avatar answered Oct 31 '25 05:10

dentarg