Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_core_module.xml @ 1436:2333e08e277d
Documented thread pools.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 18 Mar 2015 19:01:42 +0300 |
parents | 9012d7935c9b |
children | 42f288fc9ad3 |
comparison
equal
deleted
inserted
replaced
1435:54ed6b72ad3b | 1436:2333e08e277d |
---|---|
15 <section id="directives" name="Directives"> | 15 <section id="directives" name="Directives"> |
16 | 16 |
17 <directive name="aio"> | 17 <directive name="aio"> |
18 <syntax> | 18 <syntax> |
19 <literal>on</literal> | | 19 <literal>on</literal> | |
20 <literal>off</literal></syntax> | 20 <literal>off</literal> | |
21 <literal>threads</literal>[<literal>=</literal><value>pool</value>]</syntax> | |
21 <default>off</default> | 22 <default>off</default> |
22 <context>http</context> | 23 <context>http</context> |
23 <context>server</context> | 24 <context>server</context> |
24 <context>location</context> | 25 <context>location</context> |
25 <appeared-in>0.8.11</appeared-in> | 26 <appeared-in>0.8.11</appeared-in> |
113 sendfile on; | 114 sendfile on; |
114 aio on; | 115 aio on; |
115 directio 8m; | 116 directio 8m; |
116 } | 117 } |
117 </example> | 118 </example> |
119 </para> | |
120 | |
121 <para> | |
122 Finally, files can be read and <link id="sendfile">sent</link> | |
123 using multi-threading (1.7.11), | |
124 without blocking a worker process: | |
125 <example> | |
126 location /video/ { | |
127 sendfile on; | |
128 aio threads; | |
129 } | |
130 </example> | |
131 Read and send file operations are offloaded to threads of the specified | |
132 <link doc="../ngx_core_module.xml" id="thread_pool">pool</link>. | |
133 If the pool name is omitted, | |
134 the pool with the name “<literal>default</literal>” is used. | |
135 The pool name can also be set with variables: | |
136 <example> | |
137 aio threads=pool$disk; | |
138 </example> | |
139 By default, multi-threading is disabled, it should be | |
140 enabled with the | |
141 <literal>--with-threads</literal> configuration parameter. | |
142 Currently, multi-threading is compatible only with the | |
143 <link doc="../events.xml" id="epoll"/>, | |
144 <link doc="../events.xml" id="kqueue"/>, | |
145 and | |
146 <link doc="../events.xml" id="eventport"/> methods. | |
147 Multi-threaded sending of files is only supported on Linux. | |
118 </para> | 148 </para> |
119 | 149 |
120 <para> | 150 <para> |
121 See also the <link id="sendfile"/> directive. | 151 See also the <link id="sendfile"/> directive. |
122 </para> | 152 </para> |