From 379b695fc3952c20c6643ccd64afe5a9a9309974 Mon Sep 17 00:00:00 2001 From: Pablo Vizcay Date: Sat, 30 Sep 2017 11:54:54 -0300 Subject: [PATCH 1/2] add Puma internal threads explaining --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4714185008..39aa5273ea 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,8 @@ $ puma -t 8:32 Puma will automatically scale the number of threads, from the minimum until it caps out at the maximum, based on how much traffic is present. The current default is `0:16`. Feel free to experiment, but be careful not to set the number of maximum threads to a large number, as you may exhaust resources on the system (or hit resource limits). +Be aware that additionally Puma creates threads on it's own for internal purposes (e.g. handling slow clients). So even if you specify -t 1:1, expect around 7 threads created in your application. + ### Clustered mode Puma also offers "clustered mode". Clustered mode `fork`s workers from a master process. Each child process still has its own thread pool. You can tune the number of workers with the `-w` (or `--workers`) flag: From 4b4279b1c813e21c62d12730532b7405e9e23663 Mon Sep 17 00:00:00 2001 From: Pablo Vizcay Date: Sun, 1 Oct 2017 11:48:51 -0300 Subject: [PATCH 2/2] fixed typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 39aa5273ea..e8f881d2e5 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ $ puma -t 8:32 Puma will automatically scale the number of threads, from the minimum until it caps out at the maximum, based on how much traffic is present. The current default is `0:16`. Feel free to experiment, but be careful not to set the number of maximum threads to a large number, as you may exhaust resources on the system (or hit resource limits). -Be aware that additionally Puma creates threads on it's own for internal purposes (e.g. handling slow clients). So even if you specify -t 1:1, expect around 7 threads created in your application. +Be aware that additionally Puma creates threads on its own for internal purposes (e.g. handling slow clients). So even if you specify -t 1:1, expect around 7 threads created in your application. ### Clustered mode