Nginx worker Process Number
Syntax: worker_processes number;
Default: Worker_processes 1;
Role: Defines the number of worker processes in the Master_worker run mode. The number of worker processes directly affects performance. So, how many fits? Based on business requirements. Each worker is a single-threaded process, and his demons invoke each module to implement a variety of functions. If you determine that these modules do not have plug-in calls, then the number of processes can be the same as the number of CPU cores, and conversely, a little less.
Bind the Nginx worker process to the specified CPU core
Syntax: worker_cpu_affinity cpumask [cpumask ...]
Role: Assume that each worker is busy, if more than one process is robbing the same CPU, then there will be synchronization problems. Conversely, if each worker process has a single CPU, full concurrency is achieved.
Example:
Worker_processes 4;
Worker_cpu_affinity 1000 0100 0010 0001;
SSL Hardware acceleration
Syntax: Ssl_engine device;
Role: If the server has an SSL hardware acceleration device, it can be configured to speed up the processing of the SSL protocol. Users can use the commands provided by OpenSSL to see if there is an SSL hardware acceleration device: OpenSSL engine-t
Frequency of execution of system call Gettimeofday
Syntax: Timer_resolution t;
Role: By default, each time the kernel's event calls (such as epoll,select,poll,kqueue, etc.) are returned, the gettimeofday is executed once, implementing the kernel's clock to update the nginx cache clock. In the early days of Linux, this cost was not small.
Nginx Worker Process priority setting
Syntax: worker_priority Nice;
Default: Worker_priority 0;
Role: In Linux and UNIX, when many processes are in an executable state, prioritize to decide which process the kernel chooses to execute. The CPU time slice size of the process allocation is also related to the priority, the higher the priority, the longer the time slice (for example, by default, the minimum time slice is 5ms and the maximum is 800ms). The priority is determined by the static priority and the dynamic adjustment of the kernel based on the execution of the process (currently only +-5 adjustments). Nice is the priority of the process, and his value range is -20~+19,-20 is the highest priority, and +19 is the lowest priority. It is not recommended to set the nice value to be smaller than the kernel process (T is typically-5).
'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
'). Text (i)); }; $numbering. FadeIn (1700); }); });
The above describes the Nginx configuration of the performance configuration, including the nginx aspects of the content, I hope that the PHP tutorial interested in a friend helpful.