标签:
The Events module comes with directives that allow you to configure network mechanisms. Some of the parameters have an important impact on the application‘s performance.
All of the directives listed in the following table must be placed in the events block, which is located at the root of the configuration file:
user nginx nginx; master_process on; worker_processes 4; events { worker_connections 1024; use epoll; } [...]
These directives cannot be placed elsewhere (if you do so, the configuration test will fail).
accept_mutex
Enables or disables the use of an accept mutex (mutual exclusion) to open listening sockets.
Accepted values: on or off
Example: accept_mutex on;
Default value: on
accept_mutex_delay
Defines the amount of time a worker process should wait before trying to acquire the resource again. This value is not used if the accept_mutex directive is set to off.
Syntax: Numeric (time)
Example: accept_mutex_delay 500ms;
Default value: 500 milliseconds
connections
Replaced by worker_connections. This directive is now deprecated.
debug_connection
Writes detailed logs for clients matching this IP address or address block. The debug information is stored in the file
specified with the error_log directive, enabled with the debug level.
Note: Nginx must be compiled with the --debug switch in order to enable this feature.
Syntax: IP address or CIDR block.
Example: debug_connection 172.63.155.21;
Example: debug_connection 172.63.155.0/24;
Default value: None.
multi_accept
Defines whether or not Nginx should accept all incoming connections at once from the listening queue.
Syntax: on or off
Example: multi_accept off;
Default value: off
use
Selects the event model among the available ones (the ones that you enabled at compile time), though Nginx automatically selects the most appropriate one.
The supported models are:
Accepted values: /dev/poll, epoll, eventport, kqueue, rtsig, or select
Example: use kqueue;
Default value: Defined at compile time
worker_connections
Defines the amount of connections that a worker process may treat simultaneously.
Syntax: Numeric
Example: worker_connections 1024;
Default value: None
worker_connections
Defines the amount of connections that a worker process may treat simultaneously.
Syntax: Numeric
Example: worker_connections 1024;
Default value: None
标签:
原文地址:http://www.cnblogs.com/huey/p/5727109.html