From owner-freebsd-questions@FreeBSD.ORG Mon Oct 27 19:37: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 2E93E106566B for ; Mon, 27 Oct 2008 19:37:31 +0000 (UTC) (envelope-from freebsd@optiksecurite.com) Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by mx1.freebsd.org (Postfix) with ESMTP id 03BC78FC1D for ; Mon, 27 Oct 2008 19:37:30 +0000 (UTC) (envelope-from freebsd@optiksecurite.com) MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset=ISO-8859-1; format=flowed Received: from [69.69.69.183] ([69.70.93.206]) by VL-MH-MR001.ip.videotron.ca (Sun Java(tm) System Messaging Server 6.3-4.01 (built Aug 3 2007; 32bit)) with ESMTP id <0K9E00DAEX6IPDDQ@VL-MH-MR001.ip.videotron.ca> for freebsd-questions@freebsd.org; Mon, 27 Oct 2008 15:37:30 -0400 (EDT) Message-id: <49061898.60903@optiksecurite.com> Date: Mon, 27 Oct 2008 15:38:00 -0400 From: FreeBSD User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) To: Chuck Swiger References: <49060AE0.3000301@optiksecurite.com> In-reply-to: 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 19:37:31 -0000 Chuck Swiger a écrit : > On Oct 27, 2008, at 11:39 AM, Francis Dubé wrote: >> I've read that this is mainly caused by Apache spawning too many >> processes. Everyone seems to suggest to decrease the MaxClients >> directive in Apache(set to 450 at the moment), but here's the >> problem...i need to increase it ! During peaks all the processes are >> in use, we even have little drops sometime because there isn't enough >> processes to serve the requests. Our traffic is increasing slowly over >> time so i'm affraid that it'll become a real problem soon. Any tips on >> how I could deal with this situation, Apache's or FreBSD's side ? > > You need to keep your MaxClients setting limited to what your system can > run under high load; generally the amount of system memory is the > governing factor. [1] If you set your MaxClients higher than that, your > system will start swapping under the load and once you start hitting VM, > it's game over: your throughput will plummet and clients will start > getting lots of broken connections, just as you describe. > According to top, we have about 2G of Inactive RAM with 1,5G Active (4G total RAM with amd64). Swapping is not a problem in this case. After checking multiple things (MySQL, networks, CPU, RAM) when a drop occurs, we determined that everytimes there is drop, the number is Apache's process is MaxClients (ps aux | grep httpd | wc -l) and the new http request doesn't get answer from Apache (the TCP hanshakes completes but Apache never push the data). Thanks for your reply! > For a rough starting point, divide system RAM by httpd's typical > resident memory size. If your load legitimately exceeds this, you'll > need to beef up the machine or run multiple webserver boxes behind a > load-balancer (IPFW round-robin or similar with PF is a starting point, > but something like a Netscaler or Foundry ServerIron are what the big > websites generally use). >