Mercurial > hg > nginx-site
comparison xml/en/docs/freebsd_tuning.xml @ 121:49443032011c
Unified <section> syntax for "article" and "module" documents.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Thu, 20 Oct 2011 20:27:51 +0000 |
parents | 9d544687d02c |
children | 7db449e89e92 |
comparison
equal
deleted
inserted
replaced
120:da8bd4d2290f | 121:49443032011c |
---|---|
3 <article title="Tuning FreeBSD for the highload" | 3 <article title="Tuning FreeBSD for the highload" |
4 link="/en/docs/tuning_freebsd.html" | 4 link="/en/docs/tuning_freebsd.html" |
5 lang="en"> | 5 lang="en"> |
6 | 6 |
7 | 7 |
8 <section title="Syncache and syncookies"> | 8 <section name="Syncache and syncookies"> |
9 | 9 |
10 <para> | 10 <para> |
11 We look at how various kernel settings affect ability of the kernel | 11 We look at how various kernel settings affect ability of the kernel |
12 to process requests. Let’s start with TCP/IP connection establishment. | 12 to process requests. Let’s start with TCP/IP connection establishment. |
13 </para> | 13 </para> |
17 </para> | 17 </para> |
18 | 18 |
19 </section> | 19 </section> |
20 | 20 |
21 | 21 |
22 <section name="listen_queues" | 22 <section id="listen_queues" |
23 title="Listen queues"> | 23 name="Listen queues"> |
24 | 24 |
25 <para> | 25 <para> |
26 After the connection has been established it is placed in the listen queue | 26 After the connection has been established it is placed in the listen queue |
27 of the listen socket. | 27 of the listen socket. |
28 To see the current listen queues state, you may run the command | 28 To see the current listen queues state, you may run the command |
81 </para> | 81 </para> |
82 | 82 |
83 </section> | 83 </section> |
84 | 84 |
85 | 85 |
86 <section name="sockets_and_files" | 86 <section id="sockets_and_files" |
87 title="Sockets and files"> | 87 name="Sockets and files"> |
88 | 88 |
89 <para> | 89 <para> |
90 [ sockets, files ] | 90 [ sockets, files ] |
91 </para> | 91 </para> |
92 | 92 |
93 </section> | 93 </section> |
94 | 94 |
95 | 95 |
96 <section name="socket_buffers" | 96 <section id="socket_buffers" |
97 title="Socket buffers"> | 97 name="Socket buffers"> |
98 | 98 |
99 <para> | 99 <para> |
100 When a client sends a data, the data first is received by the kernel | 100 When a client sends a data, the data first is received by the kernel |
101 which places the data in the socket receiving buffer. | 101 which places the data in the socket receiving buffer. |
102 Then an application such as the web server | 102 Then an application such as the web server |
142 </para> | 142 </para> |
143 | 143 |
144 </section> | 144 </section> |
145 | 145 |
146 | 146 |
147 <section name="mbufs" | 147 <section id="mbufs" |
148 title="mbufs, mbuf clusters, etc."> | 148 name="mbufs, mbuf clusters, etc."> |
149 | 149 |
150 <para> | 150 <para> |
151 Inside the kernel the buffers are stored in the form of chains of | 151 Inside the kernel the buffers are stored in the form of chains of |
152 memory chunks linked using the <i>mbuf</i> structures. | 152 memory chunks linked using the <i>mbuf</i> structures. |
153 The mbuf size is 256 bytes and it can be used to store a small amount | 153 The mbuf size is 256 bytes and it can be used to store a small amount |
315 --> | 315 --> |
316 | 316 |
317 </section> | 317 </section> |
318 | 318 |
319 | 319 |
320 <section name="proxying" | 320 <section id="proxying" |
321 title="Proxying"> | 321 name="Proxying"> |
322 | 322 |
323 | 323 |
324 <programlisting> | 324 <programlisting> |
325 net.inet.ip.portrange.randomized=0 | 325 net.inet.ip.portrange.randomized=0 |
326 net.inet.ip.portrange.first=1024 | 326 net.inet.ip.portrange.first=1024 |
328 </programlisting> | 328 </programlisting> |
329 | 329 |
330 </section> | 330 </section> |
331 | 331 |
332 | 332 |
333 <section name="finalizing_connection" | 333 <section id="finalizing_connection" |
334 title="Finalizing connection"> | 334 name="Finalizing connection"> |
335 | 335 |
336 <programlisting> | 336 <programlisting> |
337 net.inet.tcp.fast_finwait2_recycle=1 | 337 net.inet.tcp.fast_finwait2_recycle=1 |
338 </programlisting> | 338 </programlisting> |
339 | 339 |
340 </section> | 340 </section> |
341 | 341 |
342 | 342 |
343 <section name="i386_specific_tuning" | 343 <section id="i386_specific_tuning" |
344 title="i386 specific tuning"> | 344 name="i386 specific tuning"> |
345 | 345 |
346 <para> | 346 <para> |
347 [ KVA, KVM, nsfbufs ] | 347 [ KVA, KVM, nsfbufs ] |
348 </para> | 348 </para> |
349 | 349 |
350 </section> | 350 </section> |
351 | 351 |
352 | 352 |
353 <section name="minor_optmizations" | 353 <section id="minor_optmizations" |
354 title="Minor optimizations"> | 354 name="Minor optimizations"> |
355 | 355 |
356 <para> | 356 <para> |
357 | 357 |
358 <programlisting> | 358 <programlisting> |
359 sysctl kern.random.sys.harvest.ethernet=0 | 359 sysctl kern.random.sys.harvest.ethernet=0 |