From owner-freebsd-questions@FreeBSD.ORG Mon Oct 27 18:58:31 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC1DE106567C for ; Mon, 27 Oct 2008 18:58:31 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from asmtpout020.mac.com (asmtpout020.mac.com [17.148.16.95]) by mx1.freebsd.org (Postfix) with ESMTP id B837F8FC1A for ; Mon, 27 Oct 2008 18:58:31 +0000 (UTC) (envelope-from cswiger@mac.com) MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Received: from cswiger1.apple.com ([17.227.140.124]) by asmtp020.mac.com (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug 7 2008; 32bit)) with ESMTPSA id <0K9E00GZCVDIIV10@asmtp020.mac.com> for freebsd-questions@freebsd.org; Mon, 27 Oct 2008 11:58:31 -0700 (PDT) Message-id: From: Chuck Swiger To: =?ISO-8859-1?Q?Francis_Dub=E9?= In-reply-to: <49060AE0.3000301@optiksecurite.com> Content-transfer-encoding: quoted-printable Date: Mon, 27 Oct 2008 11:58:30 -0700 References: <49060AE0.3000301@optiksecurite.com> X-Mailer: Apple Mail (2.929.2) Cc: freebsd-questions@freebsd.org Subject: Re: collecting pv entries -- suggest increasing PMAP_SHPGPERPROC X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 18:58:31 -0000 On Oct 27, 2008, at 11:39 AM, Francis Dub=E9 wrote: > I've read that this is mainly caused by Apache spawning too many =20 > processes. Everyone seems to suggest to decrease the MaxClients =20 > directive in Apache(set to 450 at the moment), but here's the =20 > problem...i need to increase it ! During peaks all the processes are =20= > in use, we even have little drops sometime because there isn't =20 > enough processes to serve the requests. Our traffic is increasing =20 > slowly over time so i'm affraid that it'll become a real problem =20 > soon. Any tips on how I could deal with this situation, Apache's or =20= > FreBSD's side ? You need to keep your MaxClients setting limited to what your system =20 can run under high load; generally the amount of system memory is the =20= governing factor. [1] If you set your MaxClients higher than that, =20 your system will start swapping under the load and once you start =20 hitting VM, it's game over: your throughput will plummet and clients =20 will start getting lots of broken connections, just as you describe. For a rough starting point, divide system RAM by httpd's typical =20 resident memory size. If your load legitimately exceeds this, you'll =20= need to beef up the machine or run multiple webserver boxes behind a =20 load-balancer (IPFW round-robin or similar with PF is a starting =20 point, but something like a Netscaler or Foundry ServerIron are what =20 the big websites generally use). --=20 -Chuck [1]: There can be other bottlenecks; sometimes poorly written external =20= cgi-bin scripts or dynamic content coming from mod_perl, mod_php, etc =20= can demand a lot of CPU or end up blocking on some resource (ie, DB =20 locking) and choking the webserver performance before it runs out of =20 RAM. But you can run a site getting several million hits a day on a =20 Sun E250 with only 1GB of RAM and 2 x ~400MHz CPU. :-)=