Mercurial > hg > nginx-site
comparison xml/en/docs/freebsd_tuning.xml @ 747:ddec437b692b
Fixed a number of typos.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Wed, 31 Oct 2012 09:18:29 +0000 |
parents | 764fbac1b8b4 |
children | 9ca8b71e0e03 |
comparison
equal
deleted
inserted
replaced
746:a02360a5c265 | 747:ddec437b692b |
---|---|
117 You may change them on the fly using the sysctls | 117 You may change them on the fly using the sysctls |
118 <path>net.inet.tcp.recvspace</path> and | 118 <path>net.inet.tcp.recvspace</path> and |
119 <path>net.inet.tcp.sendspace</path>. | 119 <path>net.inet.tcp.sendspace</path>. |
120 Of course the bigger buffer sizes may increase throughput, | 120 Of course the bigger buffer sizes may increase throughput, |
121 because connections may use bigger TCP sliding windows sizes. | 121 because connections may use bigger TCP sliding windows sizes. |
122 And on the Internet you may see recomendations to increase | 122 And on the Internet you may see recommendations to increase |
123 the buffer sizes to one or even several megabytes. | 123 the buffer sizes to one or even several megabytes. |
124 However, such large buffer sizes are suitable for local networks | 124 However, such large buffer sizes are suitable for local networks |
125 or for networks under your control. | 125 or for networks under your control. |
126 Since on the Internet a slow modem client may ask a large file | 126 Since on the Internet a slow modem client may ask a large file |
127 and then it will download the file during several minutes if not hours. | 127 and then it will download the file during several minutes if not hours. |
135 The server may place a whole large response in the sending buffer, then may | 135 The server may place a whole large response in the sending buffer, then may |
136 close the connection, and let the kernel to send the response to a slow client, | 136 close the connection, and let the kernel to send the response to a slow client, |
137 while the server is ready to serve other requests. | 137 while the server is ready to serve other requests. |
138 You should decide what is it better to bind to a client in your case: | 138 You should decide what is it better to bind to a client in your case: |
139 a tens megabytes Apache/mod_perl process | 139 a tens megabytes Apache/mod_perl process |
140 or the hundreds kilbytes socket sending buffer. | 140 or the hundreds kilobytes socket sending buffer. |
141 Note that nginx uses non-blocking I/O system calls | 141 Note that nginx uses non-blocking I/O system calls |
142 and devotes just tens kilobytes to connections, | 142 and devotes just tens kilobytes to connections, |
143 therefore it does not require the large buffer sizes. | 143 therefore it does not require the large buffer sizes. |
144 </para> | 144 </para> |
145 | 145 |
217 | 217 |
218 <note> | 218 <note> |
219 The page size jumbo clusters have been introduced in FreeBSD 7.0. | 219 The page size jumbo clusters have been introduced in FreeBSD 7.0. |
220 In earlier versions you should tune only 2K mbuf clusters. | 220 In earlier versions you should tune only 2K mbuf clusters. |
221 Prior to FreeBSD 6.2, the <path>kern.ipc.nmbclusters</path> value can be | 221 Prior to FreeBSD 6.2, the <path>kern.ipc.nmbclusters</path> value can be |
222 set only on the boot time via loader tunnable. | 222 set only on the boot time via loader tunable. |
223 </note> | 223 </note> |
224 </para> | 224 </para> |
225 | 225 |
226 <para> | 226 <para> |
227 On the amd64 architecture FreeBSD kernel can use for sockets buffers | 227 On the amd64 architecture FreeBSD kernel can use for sockets buffers |
228 almost all physical memory, | 228 almost all physical memory, |
229 while on the i386 architecture no more than 2G memory can be used, | 229 while on the i386 architecture no more than 2G memory can be used, |
230 regardless of the available physical memory. | 230 regardless of the available physical memory. |
231 We will discuss the i386 specific tunning later. | 231 We will discuss the i386 specific tuning later. |
232 </para> | 232 </para> |
233 | 233 |
234 <para> | 234 <para> |
235 There is way not to use the jumbo clusters while serving static files: | 235 There is way not to use the jumbo clusters while serving static files: |
236 the <i>sendfile()</i> system call. | 236 the <i>sendfile()</i> system call. |
354 </para> | 354 </para> |
355 | 355 |
356 </section> | 356 </section> |
357 | 357 |
358 | 358 |
359 <section id="minor_optmizations" | 359 <section id="minor_optimizations" |
360 name="Minor optimizations"> | 360 name="Minor optimizations"> |
361 | 361 |
362 <para> | 362 <para> |
363 | 363 |
364 <programlisting> | 364 <programlisting> |