is Nginx and php-fpm running in multi-threaded mode?
Nginx is a non-blocking IO & IO multiplexing model that can handle requests from multiple clients in a single line thread with similar epoll functionality provided by the operating system.
Nginx process is a thread, that is, there is only one thread in each process, but this one thread can serve multiple clients.
PHP-FPM is a blocked single-threaded model that pm.max_children
specifies the maximum number of processes, pm.max_requests
specifying how many requests each process will have to restart (because PHP occasionally has a memory leak, so a restart is required).
PHP-FPM has only one thread per process, but a process can serve only one client at a time.
Most Linux programs tend to use processes rather than threads, because Linux is relatively inexpensive to create processes, and Linux's threading capabilities are not very powerful.
How is nginx and PHP-FPM operating?