Home >Backend Development >PHP Tutorial >nginx main module configuration
Specify the time precision. By default, nginx will call the gettimeofday() function to obtain the time when returning from calls such as
nobody
none
worker_processes 4;
worker_priority
1. Make better use of multi-core CPU performance
2. Reduce the delay time caused by disk I/O blocking
3. Reduce the number of connections used by a single process to call select()/poll(),
Note: select(), poll() are both I/O multiplexing interfaces, which are obtained through polling The events that are readable or writable on the socket, the execution speed and the number of monitored links (i.e. file descriptors) grow linearly. The more sockets that are monitored, the worse the performance, so the sockets that select and poll listen to The words should be as few as possible. Here nginx reduces the number of listeners in a single process by allocating connections to multiple processes.
Copyright statement: This article is an original article by the blogger , may not be reproduced without the permission of the blogger.
The above introduces the nginx main module configuration, including aspects of the configuration. I hope it will be helpful to friends who are interested in PHP tutorials.