nginx and php-fpm operation mode?

nginx and php-fpm is not in the multi-process multi-thread running?
Nginx is a non-blocking IO & IO multiplexing model, similar to that provided by the operating system's epoll functionality to handle multiple client requests in a thread.
Nginx process is the thread that there is only one thread per process, but a thread can service multiple clients.

PHP-FPM is a single-threaded model obstruction, pm.max_children specifies the maximum number of processes, pm.max_requests is restarted after the specified number of requests (since PHP occasional memory leaks, so it is necessary to restart) for each treatment process.
each process PHP-FPM has only one thread, but at the same time a process can only serve one client.

Most Linux programs tend to use processes instead of threads, because in the process of creating Linux is relatively small overhead, and Linux thread functions are not very powerful.

Guess you like

Origin blog.51cto.com/14447492/2420619