From owner-freebsd-questions@FreeBSD.ORG Thu Aug 4 05:47:07 2005 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0677116A41F for ; Thu, 4 Aug 2005 05:47:07 +0000 (GMT) (envelope-from freebsd@hyperconx.com) Received: from front.hyperconx.net (front.hyperconx.net [66.181.8.130]) by mx1.FreeBSD.org (Postfix) with SMTP id 9BD6443D45 for ; Thu, 4 Aug 2005 05:47:06 +0000 (GMT) (envelope-from freebsd@hyperconx.com) Received: (qmail 15300 invoked from network); 3 Aug 2005 22:47:07 -0700 Received: from unknown (HELO Production) (69.225.224.190) by 66.181.8.130 with SMTP; 3 Aug 2005 22:47:07 -0700 From: "Wil Hatfield" To: "David Banning" , Date: Wed, 3 Aug 2005 22:47:00 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Importance: Normal In-Reply-To: <20050804052716.GA61437@skytracker.ca> Cc: Subject: RE: question on hosting and memory 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: Thu, 04 Aug 2005 05:47:07 -0000 David, First no host should be running anything less than dual 2.x Xeons and 1GB of RAM. Thats a minimum. Add a large swap of about 4GB. Then tailor your 1.3 so it only compiles with the components necessary. Basic core, PHP, Frontpage, Python as DSO whenever possible. And your PHP should only be compiled with what you actually expect to use. Our httpd's are using about 10MB each with PHP loaded. Then fine tune your httpd.conf timeouts so that those idle processes don't stick around too long. Then tune your kernel settings a bit. I use these in sysctl.conf and came about them through trial and error mostly. Of course this means that somebody on the list here may disagree with them but they work well and help keep the processes in line. kern.ipc.somaxconn=1024 kern.maxfiles=20000 kern.maxproc=12328 kern.maxprocperuid=11084 kern.ipc.nmbclusters=32768 net.inet.tcp.recvspace=32768 Of course you will need to fine tune other full time applications on the machine to use as little resources as possible themselves. This includes your SMTP server, Pop3 server, etc. The more you can fine tune the faster the machine can do its business and move on to the next task. Hope it helps, Wil Hatfield HyperConX -----Original Message----- From: owner-freebsd-questions@freebsd.org [mailto:owner-freebsd-questions@freebsd.org]On Behalf Of David Banning Sent: Wednesday, August 03, 2005 10:27 PM To: questions@freebsd.org Subject: question on hosting and memory I am running apache 1.3 with php and I find when that for each person who visits the site, an additional 29 meg is consumed of my measly 512M. Searching around, it seems like this is relatively normal. So here is my question. How do big-time servers handle these type of memory requirements? Presumably there are servers out there getting thousands of visitors at once. Do they have 29 Meg * 1000 for every thousand visitors? At what memory ceiling do they setup another server machine to handle the load? Wouldn't it require a ton of servers to handle a load of a thousand visitors? I am nowhere in this league, but the question comes to mind because it seems crazy that 20 visitors to my site can clog things up, simply because I choose to run apache and php. I have been looking at lighttpd decrease memory usage, but I require url rewriting and I find the documentation for lighttpd is lacking is this area. Any comments or suggestions are welcome - -- _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"