Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Adjust Puma default config to use a minimum of 1 thread, instead of 5 #24227
Re @schneems default Puma config introduced in 5563c32, this change would lower the default minimum thread count from
I found the config file a bit confusing and wondered why it was using the same value for the minimum and maximum thread count. It appears that Puma automatically scales the number of threads (https://github.com/puma/puma#thread-pool) and in the interest of keeping memory usage low on VPS servers etc, I thought it may be smart to default to a lower thread count so that people are more likely to be happy with the default config.
I also tweaked the inline documentation to clarify what was going on.
I'm new to Puma, so forgive me if I'm misunderstanding something. Thank you!
I don't think there is a benefit to running in production with fewer than max threads it just moves thread spawn time from boot time to request time which is not ideal.
You can always modify your local file. This is a sensible starting point not a perfect config for every app.