perf.html revision b71ea83f2a0b307ea3877b972d20e9150e406676
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<html>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<head>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<title>Hints on Running a High-Performance Web Server</title>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand</head>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<body>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<!--#include virtual="header.html" -->
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<h2>Hints on Running a High-Performance Web Server</H2>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand
724e753cb0055b84f896522e8c5ec45ad996c195Michel NormandRunning Apache on a heavily loaded web server, one often encounters
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normandproblems related to the machine and OS configuration. "Heavy" is
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normandrelative, of course - but if you are seeing more than a couple hits
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normandper second on a sustained basis you should consult the pointers on
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normandthis page. In general the suggestions involve how to tune your kernel
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normandfor the heavier TCP load, hardware/software conflicts that arise, etc.
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<UL>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<LI><A HREF="#AUX">A/UX (Apple's UNIX)</A>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<LI><A HREF="#BSD">BSD-based (BSDI, FreeBSD, etc)</A>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<LI><A HREF="#DEC">Digital UNIX</A>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<LI><A HREF="#HP">Hewlett-Packard</A>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<LI><A HREF="#Linux">Linux</A>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<LI><A HREF="#SGI">SGI</A>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<LI><A HREF="#Solaris">Solaris</A>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<LI><A HREF="#SunOS">SunOS 4.x</A>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand</UL>
91480a0f0a62732f3115d556b689d62d574294aeDaniel Lezcano
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<HR>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<A NAME="AUX">
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<H3>A/UX (Apple's UNIX)</H3>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand</A>
00b3c2e2845792face31017e905f9b8b4ea48653Cedric Le Goater
00b3c2e2845792face31017e905f9b8b4ea48653Cedric Le GoaterIf you are running Apache on A/UX, a page that gives some helpful
00b3c2e2845792face31017e905f9b8b4ea48653Cedric Le Goaterperformance hints (concerning the <I>listen()</I> queue and using
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normandvirtual hosts)
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<A HREF="http://www.jaguNET.com/apache.html">can be found here</A>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<P><HR>
adaeaa992a6a7a6af923416a1c36b63858055533Daniel Lezcano
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<A NAME="BSD">
ded1d23faabc31a5bbbf5f52c17423c59f63e23aDaniel Lezcano<H3>BSD-based (BSDI, FreeBSD, etc)</H3>
ded1d23faabc31a5bbbf5f52c17423c59f63e23aDaniel Lezcano</A>
ded1d23faabc31a5bbbf5f52c17423c59f63e23aDaniel Lezcano
ded1d23faabc31a5bbbf5f52c17423c59f63e23aDaniel Lezcano<A HREF="perf-bsd44.html#initial">Quick</A> and
ded1d23faabc31a5bbbf5f52c17423c59f63e23aDaniel Lezcano<A HREF="perf-bsd44.html#detail">detailed</A>
ded1d23faabc31a5bbbf5f52c17423c59f63e23aDaniel Lezcanoperformance tuning hints for BSD-derived systems.
ded1d23faabc31a5bbbf5f52c17423c59f63e23aDaniel Lezcano
ded1d23faabc31a5bbbf5f52c17423c59f63e23aDaniel Lezcano<P><HR>
ded1d23faabc31a5bbbf5f52c17423c59f63e23aDaniel Lezcano
ded1d23faabc31a5bbbf5f52c17423c59f63e23aDaniel Lezcano<A NAME="DEC">
ded1d23faabc31a5bbbf5f52c17423c59f63e23aDaniel Lezcano<H3>Digital UNIX</H3>
ded1d23faabc31a5bbbf5f52c17423c59f63e23aDaniel Lezcano</A>
ded1d23faabc31a5bbbf5f52c17423c59f63e23aDaniel Lezcano
ded1d23faabc31a5bbbf5f52c17423c59f63e23aDaniel LezcanoWe have some <A HREF="perf-dec.html">newsgroup postings</A> on how to
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normandtune Digital UNIX 3.2 and 4.0.
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand
adaeaa992a6a7a6af923416a1c36b63858055533Daniel Lezcano<P><HR>
ded1d23faabc31a5bbbf5f52c17423c59f63e23aDaniel Lezcano
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<A NAME="HP">
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<H3>Hewlett-Packard</H3>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand</A>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand
724e753cb0055b84f896522e8c5ec45ad996c195Michel NormandSome documentation on tuning HP machines can be found at <A
724e753cb0055b84f896522e8c5ec45ad996c195Michel NormandHREF="http://www.software.hp.com/internet/perf/tuning.html">http://www.software.hp.com/internet/perf/tuning.html</A>.
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<P><HR>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<A NAME="Linux">
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<H3>Linux</H3>
d97b36f8f87775b81009a39fbbdd7b491ed4f605Daniel Lezcano</A>
ded1d23faabc31a5bbbf5f52c17423c59f63e23aDaniel Lezcano
724e753cb0055b84f896522e8c5ec45ad996c195Michel NormandThe most common problem on Linux shows up on heavily-loaded systems
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normandwhere the whole server will appear to freeze for a couple of minutes
46968ea3cc8f8ee80fee87efcebc783bb3e7486aDaniel Lezcanoat a time, and then come back to life. This has been traced to a
46968ea3cc8f8ee80fee87efcebc783bb3e7486aDaniel Lezcanolisten() queue overload - certain Linux implementations have a low
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normandvalue set for the incoming connection queue which can cause problems.
ded1d23faabc31a5bbbf5f52c17423c59f63e23aDaniel LezcanoPlease see our <a
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normandhref="http://www.qosina.com/~awm/apache/linux-tcp.html">Using Apache on
46968ea3cc8f8ee80fee87efcebc783bb3e7486aDaniel LezcanoLinux</a> page for more info on how to fix this.
d97b36f8f87775b81009a39fbbdd7b491ed4f605Daniel Lezcano
d97b36f8f87775b81009a39fbbdd7b491ed4f605Daniel Lezcano<P><HR>
d97b36f8f87775b81009a39fbbdd7b491ed4f605Daniel Lezcano
d97b36f8f87775b81009a39fbbdd7b491ed4f605Daniel Lezcano<A NAME="SGI">
d97b36f8f87775b81009a39fbbdd7b491ed4f605Daniel Lezcano<H3>SGI</H3>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand
d97b36f8f87775b81009a39fbbdd7b491ed4f605Daniel Lezcano<UL>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<LI><A HREF="http://www.sgi.com/Products/WebFORCE/TuningGuide.html">
724e753cb0055b84f896522e8c5ec45ad996c195Michel NormandWebFORCE Web Server Tuning Guidelines for IRIX 5.3,
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand&lt;http://www.sgi.com/Products/WebFORCE/TuningGuide.html&gt;</A>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand</UL>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<P><HR>
d97b36f8f87775b81009a39fbbdd7b491ed4f605Daniel Lezcano
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<A NAME="Solaris">
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<H3>Solaris 2.4</H3>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand</A>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand
d97b36f8f87775b81009a39fbbdd7b491ed4f605Daniel LezcanoThe Solaris 2.4 TCP implementation has a few inherent limitations that
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normandonly became apparent under heavy loads. This has been fixed to some
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normandextent in 2.5 (and completely revamped in 2.6), but for now consult
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normandthe following URL for tips on how to expand the capabilities if you
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normandare finding slowdowns and lags are hurting performance.
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<UL>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<LI><A href="http://www.sun.com/cgi-bin/show?sun-on-net/Sun.Internet.Solutions/performance/">
724e753cb0055b84f896522e8c5ec45ad996c195Michel NormandWorld Wide Web Server Performance,
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand&lt;http://www.sun.com/cgi-bin/show?sun-on-net/Sun.Internet.Solutions/performance/&gt;</a>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand</UL>
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand<P><HR>
26b2d1526876e6155066fece0f1c703cbed322a1Michel Normand
26b2d1526876e6155066fece0f1c703cbed322a1Michel Normand<A NAME="SunOS">
26b2d1526876e6155066fece0f1c703cbed322a1Michel Normand<H3>SunOS 4.x</H3>
26b2d1526876e6155066fece0f1c703cbed322a1Michel Normand</A>
26b2d1526876e6155066fece0f1c703cbed322a1Michel Normand
26b2d1526876e6155066fece0f1c703cbed322a1Michel NormandMore information on tuning SOMAXCONN on SunOS can be found at
26b2d1526876e6155066fece0f1c703cbed322a1Michel Normand<A HREF="http://www.islandnet.com/~mark/somaxconn.html">
26b2d1526876e6155066fece0f1c703cbed322a1Michel Normandhttp://www.islandnet.com/~mark/somaxconn.html</A>.
26b2d1526876e6155066fece0f1c703cbed322a1Michel Normand
26b2d1526876e6155066fece0f1c703cbed322a1Michel Normand<P><HR>
26b2d1526876e6155066fece0f1c703cbed322a1Michel Normand
26b2d1526876e6155066fece0f1c703cbed322a1Michel Normand<H3>More welcome!</H3>
26b2d1526876e6155066fece0f1c703cbed322a1Michel Normand
26b2d1526876e6155066fece0f1c703cbed322a1Michel NormandIf you have tips to contribute, send mail to <a
26b2d1526876e6155066fece0f1c703cbed322a1Michel Normandhref="mailto:brian@organic.com">brian@organic.com</a>
26b2d1526876e6155066fece0f1c703cbed322a1Michel Normand
26b2d1526876e6155066fece0f1c703cbed322a1Michel Normand<!--#include virtual="footer.html" -->
26b2d1526876e6155066fece0f1c703cbed322a1Michel Normand</body></html>
26b2d1526876e6155066fece0f1c703cbed322a1Michel Normand
26b2d1526876e6155066fece0f1c703cbed322a1Michel Normand