From 8f51ad2f53165aacf1aa870bba1fc5de921ff6c2 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 27 Oct 2026 18:14:48 +0100 Subject: [PATCH] docs: worker threads come on top of num_threads --- docs/worker.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/worker.md b/docs/worker.md index 1b6c86a225..9f450bb973 100644 --- a/docs/worker.md +++ b/docs/worker.md @@ -201,10 +201,9 @@ frankenphp { ### Number of threads -When the worker mode is enabled, an additional thread is required to handle the incoming requests, -so the default `num_threads` value is `1 + 2x(number of available CPUs)`. +Worker threads come on top of `num_threads`, which counts the threads left for the requests no worker serves, and `max_threads` limits the whole process, workers included. -Thus, in that mode if `num_threads` and `num` are explicitly set, `num_threads` must be strictly greater then `num`. +When it is not set, `num_threads` defaults to what is left of 2x the number of available CPUs once the workers have their threads, one at the very least: a worker with the default `num` leaves one thread for the other requests. ## Superglobals behavior