switch to a 60 bit hash
[httpd-crcsyncproxy.git] / docs / manual / platform / perf-hp.html.en
blob55a05a2c4b017706e801c2c71513066b8f1ece44
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
4 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5 This file is generated from xml source: DO NOT EDIT
6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7 -->
8 <title>Running a High-Performance Web Server on HPUX - Apache HTTP Server</title>
9 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
12 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
13 <body id="manual-page" class="no-sidebar"><div id="page-header">
14 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
15 <p class="apache">Apache HTTP Server Version 2.3</p>
16 <img alt="" src="../images/feather.gif" /></div>
17 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
18 <div id="path">
19 <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Platform Specific Notes</a></div><div id="page-content"><div id="preamble"><h1>Running a High-Performance Web Server on HPUX</h1>
20 <div class="toplang">
21 <p><span>Available Languages: </span><a href="../en/platform/perf-hp.html" title="English">&nbsp;en&nbsp;</a> |
22 <a href="../ko/platform/perf-hp.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
23 </div>
26 <pre>
27 Date: Wed, 05 Nov 1997 16:59:34 -0800
28 From: Rick Jones &lt;<a href="mailto:raj@cup.hp.com">raj@cup.hp.com</a>&gt;
29 Reply-To: <a href="mailto:raj@cup.hp.com">raj@cup.hp.com</a>
30 Organization: Network Performance
31 Subject: HP-UX tuning tips
32 </pre>
34 <p>Here are some tuning tips for HP-UX to add to the tuning page.</p>
36 <p>For HP-UX 9.X: Upgrade to 10.20<br />
37 For HP-UX 10.[00|01|10]: Upgrade to 10.20</p>
39 <p>For HP-UX 10.20:</p>
41 <p>Install the latest cumulative ARPA Transport Patch. This
42 will allow you to configure the size of the TCP connection
43 lookup hash table. The default is 256 buckets and must be set
44 to a power of two. This is accomplished with adb against the
45 *disc* image of the kernel. The variable name is <code>tcp_hash_size</code>.
46 Notice that it's critically important that you use "<code>W</code>"
47 to write a 32 bit quantity, not "<code>w</code>" to write a 16 bit
48 value when patching the disc image because the <code>tcp_hash_size</code>
49 variable is a 32 bit quantity.</p>
51 <p>How to pick the value? Examine the output of <a href="ftp://ftp.cup.hp.com/dist/networking/tools/connhist">ftp://ftp.cup.hp.com/dist/networking/tools/connhist</a>
52 and see how many total TCP connections exist on the system. You
53 probably want that number divided by the hash table size to be
54 reasonably small, say less than 10. Folks can look at HP's
55 SPECweb96 disclosures for some common settings. These can be
56 found at <a href="http://www.specbench.org/">http://www.specbench.org/</a>.
57 If an HP-UX system was performing at 1000 SPECweb96 connections
58 per second, the <code>TIME_WAIT</code> time of 60 seconds would mean
59 60,000 TCP "connections" being tracked.</p>
61 <p>Folks can check their listen queue depths with <a href="ftp://ftp.cup.hp.com/dist/networking/misc/listenq">ftp://ftp.cup.hp.com/dist/networking/misc/listenq</a>.</p>
63 <p>If folks are running Apache on a PA-8000 based system, they
64 should consider "chatr'ing" the Apache executable to have a
65 large page size. This would be "<code>chatr +pi L &lt;BINARY&gt;</code>".
66 The GID of the running executable must have <code>MLOCK</code> privileges.
67 <code>Setprivgrp(1m)</code> should be consulted for assigning
68 <code>MLOCK</code>. The change can be validated by running Glance
69 and examining the memory regions of the server(s) to make sure that
70 they show a non-trivial fraction of the text segment being locked.</p>
72 <p>If folks are running Apache on MP systems, they might
73 consider writing a small program that uses <code>mpctl()</code>
74 to bind processes to processors. A simple <code>pid % numcpu</code>
75 algorithm is probably sufficient. This might even go into the
76 source code.</p>
78 <p>If folks are concerned about the number of <code>FIN_WAIT_2</code>
79 connections, they can use nettune to shrink the value of
80 <code>tcp_keepstart</code>. However, they should be careful there -
81 certainly do not make it less than oh two to four minutes. If
82 <code>tcp_hash_size</code> has been set well, it is probably OK to
83 let the <code>FIN_WAIT_2</code>'s take longer to timeout (perhaps
84 even the default two hours) - they will not on average have a big
85 impact on performance.</p>
87 <p>There are other things that could go into the code base, but
88 that might be left for another email. Feel free to drop me a
89 message if you or others are interested.</p>
91 <p>sincerely,</p>
93 <p>rick jones</p>
95 <p><a href="http://www.cup.hp.com/netperf/NetperfPage.html">http://www.cup.hp.com/netperf/NetperfPage.html</a></p>
97 </div>
98 </div>
99 <div class="bottomlang">
100 <p><span>Available Languages: </span><a href="../en/platform/perf-hp.html" title="English">&nbsp;en&nbsp;</a> |
101 <a href="../ko/platform/perf-hp.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
102 </div><div id="footer">
103 <p class="apache">Copyright 2009 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
104 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
105 </body></html>