Mercurial > hg > nginx-site
annotate xml/en/docs/events.xml @ 567:7ff0dd5fe6f0
Updated with Netcraft July 2012 Web Server Survey stats.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Tue, 03 Jul 2012 13:25:07 +0000 |
parents | ffafb169cca9 |
children | be54c443235a |
rev | line source |
---|---|
553
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1 <!DOCTYPE article SYSTEM "../../../dtd/article.dtd"> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
3 <article name="Connection processing methods" |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
4 link="/en/docs/events.html" |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
5 lang="en"> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
6 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
7 <section> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
9 <para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
10 nginx supports a variety of connection processing methods. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
11 The availability of a particular method depends on the platform used. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
12 On platforms that support several methods nginx will normally |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
13 select the most efficient method automatically. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
14 However, if needed, a connection processing method can be selected |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
15 explicitly with the |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
16 <link doc="ngx_core_module.xml" id="use"/> directive. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
17 </para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
18 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
19 <para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
20 The following connection processing methods are supported: |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
21 <list type="bullet"> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
22 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
23 <listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
24 <para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
25 <literal>select</literal>—standard method. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
26 The supporting module is built automatically on platforms that lack |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
27 more efficient methods. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
28 The <literal>--with-select_module</literal> and |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
29 <literal>--without-select_module</literal> configuration parameters |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
30 can be used to forcibly enable or disable the build of this module. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
31 </para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
32 </listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
33 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
34 <listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
35 <para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
36 <literal>poll</literal>—standard method. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
37 The supporting module is built automatically on platforms that lack |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
38 more efficient methods. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
39 The <literal>--with-poll_module</literal> and |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
40 <literal>--without-poll_module</literal> configuration parameters |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
41 can be used to forcibly enable or disable the build of this module. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
42 </para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
43 </listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
44 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
45 <listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
46 <para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
47 <literal>kqueue</literal>—efficient method used on |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
48 FreeBSD 4.1+, OpenBSD 2.9+, NetBSD 2.0, and Mac OS X. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
49 </para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
50 </listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
51 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
52 <listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
53 <para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
54 <literal>epoll</literal>—efficient method used on |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
55 Linux 2.6+. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
56 <note> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
57 Some older distributions like SuSEĀ 8.2 provide patches |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
58 that add epoll support to 2.4 kernels. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
59 </note> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
60 </para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
61 </listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
62 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
63 <listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
64 <para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
65 <literal>rtsig</literal>—real time signals, efficient method |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
66 used on Linux 2.2.19+. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
67 By default, |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
68 the system-wide event queue is limited by 1024 signals. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
69 On loaded servers it may become necessary to increase this limit |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
70 by changing the <path>/proc/sys/kernel/rtsig-max</path> kernel parameter. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
71 However, in Linux 2.6.6-mm2 this parameter is gone, and each process |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
72 now has its own event queue. |
554
ccb7451af1d8
Documented the "worker_rlimit_sigpending" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
553
diff
changeset
|
73 The size of each queue is limited by <literal>RLIMIT_SIGPENDING</literal> |
ccb7451af1d8
Documented the "worker_rlimit_sigpending" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
553
diff
changeset
|
74 (see also <link doc="ngx_core_module.xml" id="worker_rlimit_sigpending"/>). |
553
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
75 </para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
76 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
77 <para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
78 On queue overflow, nginx discards the queue and falls back to |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
79 <literal>poll</literal> connection processing method until |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
80 the situation gets back to normal. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
81 </para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
82 </listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
83 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
84 <listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
85 <para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
86 <literal>/dev/poll</literal>—efficient method used on |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
87 Solaris 7 11/99+, HP/UX 11.22+ (eventport), IRIX 6.5.15+, |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
88 and Tru64 UNIX 5.1A+. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
89 </para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
90 </listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
91 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
92 <listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
93 <para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
94 <literal>eventport</literal>—event ports, efficient method |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
95 used on Solaris 10. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
96 </para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
97 </listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
98 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
99 </list> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
100 </para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
101 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
102 </section> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
103 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
104 </article> |