View Nginx compile-time parameter settings use the NGINX-V command to view
You can use the nginx-h command to view command Help
The configuration file binds the worker process to a specific core of the CPU, vim/etc/nginx/nginx.conf
Note that the Worker_cpu_affinity parameter is support for CPU multicore, which indicates that 4 process is bound to the 1th 2nd 1th 2nd of the CPU core (this CPU has only two cores)
If you have 4 cores, set this up.
In order to push the 8,16 ...
Worker_rlimit_nofile This parameter in the configuration file is to set the maximum number of file descriptors that a single worker process can open (should be consistent with the value of Ulimit-n because Nginx is sometimes unbalanced for user requests), However, such services as Nginx and Haproxy have been automatically adjusted to their own needs.
Worker_priority This parameter is to set the process priority of the worker process to a range of [-20 19], the lower the value, the higher the priority, you can use the PS Axo comm,pid,nice command to view
Use Epoll This parameter does not have to be defined, Nginx will automatically select.
Define a virtual host the simplest non-way
root specifies the root file path, server_name specifies the server hostname, and the format after the Listen parameter is Ip:port, which is specified as 80 ports for listening on all network card addresses
Nginx Learning Note 1