238 lines
14 KiB
HTML
238 lines
14 KiB
HTML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE html
|
||
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html lang="en-us" xml:lang="en-us">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<meta name="security" content="public" />
|
||
|
<meta name="Robots" content="index,follow" />
|
||
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
||
|
<meta name="DC.Type" content="topic" />
|
||
|
<meta name="DC.Title" content="Manage server performance for HTTP Server (powered by Apache)" />
|
||
|
<meta name="abstract" content="This topic provides information about how to manage your HTTP Server performance." />
|
||
|
<meta name="description" content="This topic provides information about how to manage your HTTP Server performance." />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzaieparhttp.htm" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2002,2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2002,2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="rzaiemngperf" />
|
||
|
<meta name="DC.Language" content="en-us" />
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
||
|
<title>Manage server performance for HTTP Server (powered by Apache)</title>
|
||
|
</head>
|
||
|
<body id="rzaiemngperf"><a name="rzaiemngperf"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Manage server performance for HTTP Server (powered by Apache)</h1>
|
||
|
<div><p>This topic provides information about how to manage your HTTP Server
|
||
|
performance.</p>
|
||
|
<div class="important"><span class="importanttitle">Important:</span> Information
|
||
|
for this topic supports the latest PTF levels for HTTP Server for i5/OS .
|
||
|
It is recommended that you install the latest PTFs to upgrade to the latest
|
||
|
level of the HTTP Server for i5/OS. Some of the topics documented here are
|
||
|
not available prior to this update. See <a href="http://www-03.ibm.com/servers/eserver/iseries/software/http/services/service.html" target="_blank">http://www.ibm.com/servers/eserver/iseries/software/http/services/service.htm</a> <img src="www.gif" alt="Link outside Information Center" /> for more information. </div>
|
||
|
<p>There are several things that can affect your server's performance. Consider
|
||
|
the following performance related topics: </p>
|
||
|
<ul><li><a href="#local">Local cache</a></li>
|
||
|
<li><a href="#files">Files to cache when server has started</a></li>
|
||
|
<li><a href="#threads">Threads</a></li>
|
||
|
<li><a href="#dns">DNS lookups</a></li>
|
||
|
<li><a href="#ssi">Server-side includes</a></li>
|
||
|
<li><a href="#content">Content negotiation</a></li>
|
||
|
<li><a href="#doctree">Document tree</a></li>
|
||
|
<li><a href="#htaccess">.htaccess files</a></li>
|
||
|
<li><a href="#vh">Virtual host log files</a></li>
|
||
|
<li><a href="#keep">KeepAlive and KeepAliveTimeout</a></li>
|
||
|
<li><a href="#log">Logging</a></li>
|
||
|
<li><a href="#cgi">CGI programs</a></li>
|
||
|
<li><a href="#tcp">TCP/IP settings</a></li>
|
||
|
<li><a href="#network">Network</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div>
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzaieparhttp.htm" title="This topic provides step-by-step tasks for HTTP Server.">HTTP Server tasks</a></div>
|
||
|
</div>
|
||
|
</div><div class="hr" id="local"><a name="local"><!-- --></a><h2 class="topictitle2">Local cache </h2>
|
||
|
<div><p>Enabling the HTTP Server's local cache can result in better performance
|
||
|
and system throughput by caching (in memory) frequently accessed files. You
|
||
|
can configure several settings associated with the local cache. </p>
|
||
|
<p>To configure the local cache settings, do the following: </p>
|
||
|
<ol><li>Click the <strong>Manage</strong> tab. </li>
|
||
|
<li>Click the <span class="uicontrol">HTTP Servers</span> subtab.</li>
|
||
|
<li>Select your HTTP Server (powered by Apache) from the <strong>Server</strong> list.
|
||
|
</li>
|
||
|
<li>Select the <strong>Global configuration</strong> from the <strong>Server area</strong> list.
|
||
|
</li>
|
||
|
<li>Expand <strong>Server Properties</strong>. </li>
|
||
|
<li>Click <strong>System Resources</strong>. </li>
|
||
|
<li>Click the <strong>Caching</strong> tab in the form. </li>
|
||
|
</ol>
|
||
|
<p>Enter or select options from this form. After you are finished, click <strong>OK</strong>. </p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="hr" id="files"><a name="files"><!-- --></a><h2 class="topictitle2">Files to cache when server has started</h2>
|
||
|
<div><p>Including file names in <strong>Files to cache when server is started</strong> causes
|
||
|
the files to be loaded into the server's memory when the server is started.
|
||
|
</p>
|
||
|
<ul><li><strong>Copy into memory</strong> specifies the names of files that you want to
|
||
|
load into the server's memory each time you start the server. By keeping your
|
||
|
most frequently requested files loaded in the server's memory, you can improve
|
||
|
your server's response time for those files. For example, if you load your
|
||
|
server's welcome page into memory at startup, the server can handle requests
|
||
|
for the page much more quickly than if it had to read the file from the file
|
||
|
system. </li>
|
||
|
<li><strong>Keep file descriptor open</strong> specifies the names of ASCII stream files
|
||
|
whose descriptors are cached at the server startup. By keeping your most frequently
|
||
|
requested files opened at server startup, you can improve your server's response
|
||
|
time for those files. For example, if you open your server's welcome page
|
||
|
files at startup, the server can handle requests for the page much more quickly
|
||
|
than if it had to open the files each time they are requested. The advantage
|
||
|
of using this option over Copy into memory is it does not cache the content
|
||
|
of the file and therefore does not allocate large amount of memory, yet provides
|
||
|
similar performance. The disadvantage of using this option over Copy into
|
||
|
memory is it only caches the file descriptors of ASCII stream files and it
|
||
|
keeps the file open (share read) while the server is active. </li>
|
||
|
<li><strong>Memory map of file</strong> option is the same as Copy into memory except
|
||
|
it uses memory address pointers, instead of simply using a chunk of server
|
||
|
memory, to specify the names of files that you want to map into the server's
|
||
|
memory each time that you start the server. </li>
|
||
|
</ul>
|
||
|
<p><strong>What to cache</strong> allows you to specify what information is included
|
||
|
in the cache. </p>
|
||
|
<ul><li><strong>Dynamically cache files based on file usage</strong> allows dynamic caching.
|
||
|
The default value is off (or disabled). </li>
|
||
|
<li><strong>Update cache when files are modified</strong> updates the cache whenever
|
||
|
its original file content changes. The default value is on (or enabled). </li>
|
||
|
</ul>
|
||
|
<p>Enter or select options from this form. After you are finished, click <strong>OK</strong>. </p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="hr" id="threads"><a name="threads"><!-- --></a><h2 class="topictitle2">Threads</h2>
|
||
|
<div><p>Each time your server receives a client request, the server first checks
|
||
|
to see if any threads are available and then uses available threads to process
|
||
|
the request. If no threads are available, it holds the request until threads
|
||
|
become available. When a request ends, the server threads become idle (at
|
||
|
which point they are available for the server to use again). </p>
|
||
|
<div class="note"><span class="notetitle">Note:</span> The HTTP Server performance may increase by increasing the number of
|
||
|
threads, but not the iSeries™ system performance.</div>
|
||
|
<p>Setting the maximum number of active threads too high can cause a decrease
|
||
|
in system performance. You can experiment with lowering the maximum number
|
||
|
of active threads until you see no affect on system performance. A good starting
|
||
|
point would be half of the previous setting. For example, if you had the maximum
|
||
|
number of active threads set to 100, try setting it to 50. Lowering the maximum
|
||
|
number of active threads directive might result in an increased number of
|
||
|
rejected connections when the server reaches its capacity. </p>
|
||
|
<p>To change the number of threads to process requests, do the following: </p>
|
||
|
<ol><li>Click the <strong>Manage</strong> tab. </li>
|
||
|
<li>Click the <span class="uicontrol">HTTP Servers</span> subtab.</li>
|
||
|
<li>Select your HTTP Server (powered by Apache) from the <strong>Server</strong> list.
|
||
|
</li>
|
||
|
<li>Select the <strong>Global configuration</strong> from the <strong>Server area</strong> list.
|
||
|
</li>
|
||
|
<li>Expand <strong>Server Properties</strong>. </li>
|
||
|
<li>Click <strong>System Resources</strong>. </li>
|
||
|
<li>Click the <strong>Advanced</strong> tab in the form. </li>
|
||
|
</ol>
|
||
|
<p>Enter or select options from this form. After you are finished, click <strong>OK</strong>. </p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="hr" id="dns"><a name="dns"><!-- --></a><h2 class="topictitle2">DNS lookups</h2>
|
||
|
<div><p>Every time the server needs to request a DNS lookup, there may be a delay
|
||
|
while the DNS server is contacted. Limit the use of DNS lookups. Consider
|
||
|
logging IP addresses and using a log analysis tool that does DNS lookups.
|
||
|
</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="hr" id="ssi"><a name="ssi"><!-- --></a><h2 class="topictitle2">Server-side includes</h2>
|
||
|
<div><p>Server performance can be impacted when server-side includes are processed.
|
||
|
Limit the use of server-side includes except where needed. </p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="hr" id="content"><a name="content"><!-- --></a><h2 class="topictitle2">Content negotiation</h2>
|
||
|
<div><p>Restrict content negotiation to those contexts where it is needed. </p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="hr" id="doctree"><a name="doctree"><!-- --></a><h2 class="topictitle2">Document tree</h2>
|
||
|
<div><p>Try to organize your document tree into a flat broad tree structure rather
|
||
|
than a narrow deep tree structure. The fewer directory levels the better.
|
||
|
</p>
|
||
|
<p>For better performance, store static and Net.Data<sup>®</sup> files in the root (or /) file
|
||
|
system. Avoid placing static and Net.Data files in the QSYS and QDLS file
|
||
|
systems. </p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="hr" id="htaccess"><a name="htaccess"><!-- --></a><h2 class="topictitle2">.htaccess files</h2>
|
||
|
<div><p>Server performance is impacted if the server must look for and open .htaccess
|
||
|
files. If the <a href="rzaiemod_core.htm#allowoverride">AllowOverride</a> directive is set to None, the server does
|
||
|
not look for .htaccess files. If AllowOverride is set to All, there is a significant
|
||
|
performance impact as the server looks for .htaccess files in every directory.
|
||
|
</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="hr" id="vh"><a name="vh"><!-- --></a><h2 class="topictitle2">Virtual host log files</h2>
|
||
|
<div><p>If you create separate log files for each virtual host, you should consider
|
||
|
that a file descriptor is opened for each log file. Opening too many file
|
||
|
descriptors can impact system performance. </p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="hr" id="keep"><a name="keep"><!-- --></a><h2 class="topictitle2">KeepAlive and KeepAliveTimeout</h2>
|
||
|
<div><p>The connection time-out determines the number of seconds the server waits
|
||
|
for a subsequent request before closing a persistent connection. Enabling
|
||
|
persistent connections increases the throughput of your server. Consider decreasing
|
||
|
the connection time-out if you have simple pages without images. </p>
|
||
|
<p>To set this value, do the following: </p>
|
||
|
<ol><li>Click the <strong>Manage</strong> tab. </li>
|
||
|
<li>Click the <span class="uicontrol">HTTP Servers</span> subtab.</li>
|
||
|
<li>Select your HTTP Server (powered by Apache) from the <strong>Server</strong> list.
|
||
|
</li>
|
||
|
<li>Select the <strong>Global configuration</strong> from the <strong>Server area</strong> list.
|
||
|
</li>
|
||
|
<li>Expand <strong>Server Properties</strong>. </li>
|
||
|
<li>Click <strong>System Resources</strong>. </li>
|
||
|
<li>Click the <strong>HTTP Connections</strong> tab in the form. </li>
|
||
|
<li>Enter a value for <strong>Connection time-out</strong>, or make a selection from
|
||
|
the list. </li>
|
||
|
<li>Enter a value for <strong>Maximum pending connections</strong>, or make a selection
|
||
|
from the list. </li>
|
||
|
<li>Select <strong>Enabled</strong> for <strong>Allow persistent connections</strong>. </li>
|
||
|
<li>Enter a value for <strong>Time to wait between requests</strong>, or make a selection
|
||
|
from the list. </li>
|
||
|
<li>Enter a value for <strong>Maximum requests per connection</strong>, or make a selection
|
||
|
from the list. </li>
|
||
|
<li>Click <strong>OK</strong>. </li>
|
||
|
</ol>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="hr" id="log"><a name="log"><!-- --></a><h2 class="topictitle2">Logging</h2>
|
||
|
<div><p>Logging server activity does impact server performance. Try to do as little
|
||
|
error and access logging as required. </p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="hr" id="cgi"><a name="cgi"><!-- --></a><h2 class="topictitle2">CGI programs</h2>
|
||
|
<div><p>CGI programs should be run in a named activation group to get the best
|
||
|
performance. Also determine what CGI jobs your server generally uses. Use
|
||
|
the StartCGI and StartThreadedCGI directives to start those jobs when the
|
||
|
server starts. Use the QTMHHTP1 user profile to run CGI requests. If you must
|
||
|
use a different user profile, use a "dummy" user profile (a user profile that
|
||
|
is not allowed to sign-on) instead of <tt>%%CLIENT%%</tt>. </p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="hr" id="tcp"><a name="tcp"><!-- --></a><h2 class="topictitle2">TCP/IP settings</h2>
|
||
|
<div><p>See <a href="../rzahg/rzahgictcp2.htm">Adjusting
|
||
|
your TCP/IP configuration</a> for more information on TCP/IP settings.
|
||
|
</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="hr" id="network"><a name="network"><!-- --></a><h2 class="topictitle2">Network</h2>
|
||
|
<div><p>Consider that the performance of the network that your data flows across
|
||
|
can also affect the perception of your server's performance. </p>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</body>
|
||
|
</html>
|