Return-Path: Delivered-To: apmail-httpd-docs-archive@www.apache.org Received: (qmail 21830 invoked from network); 16 Nov 2010 11:06:53 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 Nov 2010 11:06:53 -0000 Received: (qmail 7300 invoked by uid 500); 16 Nov 2010 11:07:24 -0000 Delivered-To: apmail-httpd-docs-archive@httpd.apache.org Received: (qmail 7065 invoked by uid 500); 16 Nov 2010 11:07:22 -0000 Mailing-List: contact docs-help@httpd.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: docs@httpd.apache.org List-Id: Delivered-To: mailing list docs@httpd.apache.org Received: (qmail 7057 invoked by uid 99); 16 Nov 2010 11:07:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Nov 2010 11:07:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.131] (HELO eos.apache.org) (140.211.11.131) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Nov 2010 11:07:21 +0000 Received: from eosnew.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id A4571FF3; Tue, 16 Nov 2010 11:06:44 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki To: Apache Wiki Date: Tue, 16 Nov 2010 11:06:44 -0000 Message-ID: <20101116110644.51113.35565@eosnew.apache.org> Subject: =?utf-8?q?=5BHttpd_Wiki=5D_Update_of_=22PerformanceScalingUp=22_by_jmcg?= Dear Wiki user, You have subscribed to a wiki page or wiki category on "Httpd Wiki" for cha= nge notification. The "PerformanceScalingUp" page has been changed by jmcg. http://wiki.apache.org/httpd/PerformanceScalingUp?action=3Ddiff&rev1=3D1&re= v2=3D2 -------------------------------------------------- = See also: http://wiki.apache.org/httpd/PerformanceScalingOut = + =3D 1 Introduction =3D + The Performance Tuning page in the Apache 1.3 documentation says: + = + =E2=80=9CApache is a general webserver, which is designed to be co= rrect first, + and fast second. Even so, its performance is quite satisfactory. M= ost + sites have less than 10Mbits of outgoing bandwidth, which Apache + can fill using only a low end Pentium-based webserver.=E2=80=9D + = + However, this sentence was written a few years ago, and in the meantime + several things have happened. On one hand, web server hardware has become + much faster. On the other hand, many sites now are allowed much more than + ten megabits per second of outgoing bandwidth. In addition, web applicat= ions + have become more complex. The classic brochureware site is alive and wel= l, + but the web has grown up substantially as a computing application platfo= rm + and webmasters may find themselves running dynamic content in Perl, PHP = or + Java, all of which take a toll on performance. + = + Therefore, in spite of strides forward in machine speed and bandwidth al- + lowances, web server performance and web application performance remain = ar- + eas of concern. In this paper and the ApacheCon session it accompanies, = several + aspects of web server performance will be discussed. + = + =3D=3D 1.1 What Will and Will Not Be Discussed =3D=3D + The session will focus on easily accessible configuration and tuning opti= ons for + Apache 1.3 and 2 as well as monitoring tools. Monitoring tools will allo= w you + to observe your web server to gather information about its performance, = or + lack thereof. We=E2=80=99ll assume that you don=E2=80=99t have an unlimi= ted budget for server + hardware, so the existing infrastructure will have to do the job. You ha= ve + no desire to compile your own Apache, or to recompile the operating syst= em + kernel. We do assume, though, that you have some familiarity with the Ap= ache + configuration file. + = + =3D 2 Monitoring Your Server =3D + The first task when sizing or performance-tuning your server is to find o= ut how + your system is currently performing. By monitoring your server under rea= l-world + load, or artificially generated load, you can extrapolate its behavior u= nder stress, + such as when your site is mentioned on Slashdot. + = + =3D=3D 2.1 Monitoring Tools =3D=3D + =3D=3D=3D 2.1.1 top =3D=3D=3D + The top tool ships with Linux and FreeBSD, and can be downloaded for So- + laris2 . It collects a number of statistics for the system and for each = running + process, then displays them interactively on your terminal. The data dis= played + is refreshed every second and varies by platform, but typically includes= system + load average, number of processes and their current states, the percent = CPU(s) + time spent executing user and system code, and the state of the virtual = mem- + ory system. The data displayed for each process is typically configurabl= e and + includes its process name and ID, priority and nice values, memory footp= rint, + and percentage CPU usage. An example top display is shown in Figure 1. + = + Top is a wonderful tool even though it=E2=80=99s slightly resource intens= ive (when + running, its own process is usually in the top ten CPU gluttons). It is = indis- + pensable in determining the size of a running process, which comes in ha= ndy + when determining how many server processes you can run on your machine. + How to do this is described in Section 3.1.3. Top is, however, an intera= ctive tool + and running it continuously has few if any advantages. + = + =3D=3D=3D 2.1.2 free =3D=3D=3D + This command is only available on Linux. It shows how much memory and swap + space is in use. Linux allocates unused memory as file system cache. The= free + command shows usage both with and without this cache. The free command + can be used to find out how much memory the operating system is using, as + = + described in the paragraph =E2=80=98Sizing MaxClients=E2=80=99 on page 10= . The output of free + looks like this: + = + {{{ + sctemme@brutus:~$ free + }}} + {{{ + total used free shared buffers cached + }}} + {{{ + Mem: 4026028 3901892 124136 0 253144 841044 + }}} + {{{ + -/+ buffers/cache: 2807704 1218324 + }}} + {{{ + Swap: 3903784 12540 3891244 + }}} +=20 --------------------------------------------------------------------- To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org For additional commands, e-mail: docs-help@httpd.apache.org