diff options
author | André Malo <nd@apache.org> | 2014-02-06 11:39:53 +0000 |
---|---|---|
committer | André Malo <nd@apache.org> | 2014-02-06 11:39:53 +0000 |
commit | c8655eb24cce427aed3e77dfe8bb449513cd0624 (patch) | |
tree | f76a71bcdbf9d9f18a9413376244b2babc7c5c03 /docs/manual/misc/perf-tuning.html.en | |
parent | a6303b0a30a786daef40e02260db4b7f9a99584d (diff) | |
download | httpd-c8655eb24cce427aed3e77dfe8bb449513cd0624.tar.gz |
update transformation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1565186 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/misc/perf-tuning.html.en')
-rw-r--r-- | docs/manual/misc/perf-tuning.html.en | 42 |
1 files changed, 14 insertions, 28 deletions
diff --git a/docs/manual/misc/perf-tuning.html.en b/docs/manual/misc/perf-tuning.html.en index 44eab58d5b..52cb5b6aa4 100644 --- a/docs/manual/misc/perf-tuning.html.en +++ b/docs/manual/misc/perf-tuning.html.en @@ -137,12 +137,10 @@ matching the criteria. Here's an example which disables lookups except for <code>.html</code> and <code>.cgi</code> files:</p> - <pre class="prettyprint lang-config"> -HostnameLookups off + <pre class="prettyprint lang-config">HostnameLookups off <Files ~ "\.(html|cgi)$"> HostnameLookups on -</Files> - </pre> +</Files></pre> <p>But even still, if you just need DNS names in some CGIs you @@ -161,12 +159,10 @@ HostnameLookups off system calls to check up on symlinks. One extra call per filename component. For example, if you had:</p> - <pre class="prettyprint lang-config"> -DocumentRoot /www/htdocs + <pre class="prettyprint lang-config">DocumentRoot /www/htdocs <Directory /> Options SymLinksIfOwnerMatch -</Directory> - </pre> +</Directory></pre> <p>and a request is made for the URI <code>/index.html</code>. @@ -177,16 +173,14 @@ DocumentRoot /www/htdocs every single request. If you really desire the symlinks security checking you can do something like this:</p> - <pre class="prettyprint lang-config"> -DocumentRoot /www/htdocs + <pre class="prettyprint lang-config">DocumentRoot /www/htdocs <Directory /> Options FollowSymLinks </Directory> <Directory /www/htdocs> Options -FollowSymLinks +SymLinksIfOwnerMatch -</Directory> - </pre> +</Directory></pre> <p>This at least avoids the extra checks for the @@ -209,12 +203,10 @@ DocumentRoot /www/htdocs <code>.htaccess</code> for each filename component. For example,</p> - <pre class="prettyprint lang-config"> -DocumentRoot /www/htdocs + <pre class="prettyprint lang-config">DocumentRoot /www/htdocs <Directory /> AllowOverride all -</Directory> - </pre> +</Directory></pre> <p>and a request is made for the URI <code>/index.html</code>. @@ -557,8 +549,7 @@ DocumentRoot /www/htdocs do not match the code, they're contrived for pedagogical purposes):</p> - <pre class="prettyprint lang-c"> - for (;;) { + <pre class="prettyprint lang-c"> for (;;) { for (;;) { fd_set accept_fds; @@ -578,8 +569,7 @@ DocumentRoot /www/htdocs if (new_connection != -1) break; } process_the(new_connection); - } - </pre> + }</pre> <p>But this naive implementation has a serious starvation problem. @@ -618,8 +608,7 @@ DocumentRoot /www/htdocs entry into the inner loop. The loop looks like this (differences highlighted):</p> - <pre class="prettyprint lang-c"> - for (;;) { + <pre class="prettyprint lang-c"> for (;;) { <strong>accept_mutex_on ();</strong> for (;;) { fd_set accept_fds; @@ -641,8 +630,7 @@ DocumentRoot /www/htdocs } <strong>accept_mutex_off ();</strong> process the new_connection; - } - </pre> + }</pre> <p><a id="serialize" name="serialize">The functions</a> @@ -751,8 +739,7 @@ DocumentRoot /www/htdocs <code>http_main.c</code>). The function looks roughly like this:</p> - <pre class="prettyprint lang-c"> - void lingering_close (int s) + <pre class="prettyprint lang-c"> void lingering_close (int s) { char junk_buffer[2048]; @@ -774,8 +761,7 @@ DocumentRoot /www/htdocs } close (s); - } - </pre> + }</pre> <p>This naturally adds some expense at the end of a connection, |