From owner-freebsd-questions Tue Jul 3 0:26:47 2001 Delivered-To: freebsd-questions@freebsd.org Received: from gscamnlm03.wr.usgs.gov (gscamnlm03.wr.usgs.gov [130.118.4.113]) by hub.freebsd.org (Postfix) with ESMTP id 4415937B401; Tue, 3 Jul 2001 00:26:42 -0700 (PDT) (envelope-from rsowders@usgs.gov) To: "Nadir@Attractive" Cc: freebsd-questions@freebsd.org, owner-freebsd-questions@FreeBSD.ORG MIME-Version: 1.0 X-Mailer: Lotus Notes Release 5.0.7 March 21, 2001 Message-ID: From: "Robert L Sowders" Date: Tue, 3 Jul 2001 00:26:35 -0700 Subject: Re: Is it possible to get more power from a FreeBSD system running Apache/MySQL/PHP ? X-MIMETrack: Serialize by Router on gscamnlm03/SERVER/USGS/DOI(Release 5.0.7 |March 21, 2001) at 07/03/2001 12:26:40 AM Content-Type: multipart/mixed; boundary="=_mixed 00294A7488256A7E_=" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --=_mixed 00294A7488256A7E_= Content-Type: text/plain; charset="us-ascii" Here is what somebody I know did to combat the "slashdot effect" of sudden overwhelming surges to his web server. They run the USGS Govs earthquake server and it has no load at all until there is an earthquake and then everyone in southern California wants info right now. Around 400 hits per second, his system handled it no sweat. Read the following. http://pasadena.wr.usgs.gov/office/stans/slashdot.html I see that you reported each instance of apache at 13MB? This is huge, are you doing that much dynamic? I'll look at your config file and get back to you, but something sure sounds peculiar. Are you forcing a parse of every file on the docroot, and looking for .htaccess in every tree? Or maybe your content is really that big. I guess you've had a look at the apache.org site for performance tips of dos and don'ts. Let me have a look at the config file, but I've got a feeling that you could off-load some of the content to other servers, and let your web server get back to serving pages while your other server deliver the content. "Nadir@Attractive" cc: Subject: Is it possible to get more power from a FreeBSD system running Apache/MySQL/PHP ? Hello all, I hope this is the first time anyone is asking such a question, but I couldn't find any help in the archives. We have a FreeBSD 4.2-STABLE server running mainly Apache, PHP and MySQL. It is a 933Mhz Intel Xeon-based server, equipped with 1GB memory and 4 SCSI LVD RAID-5 disks. The Apache's httpd.conf file is attached in my e-mail for your evaluation. Today we had a very HIGH surge of Web visitors to one of our hosted Web sites, and it seemed that the server has reached its limits. Each Apache's instance used nearly 13MB of memory and a sum of 150 instances were active, yielding approximately 2GB of memory usage! This has nearly paralized our server, and I couldn't do anything about it, at least that's what I think. I have few questions: 1. Anyone knows if Apache 2.0 can handle more visitors than Apache 1.3.x in the current configuration that we have? 2. Can I optimize the FreeBSD system that we currently have even further to get more power of the server? 3. The MAXUSERS configuration parameter is set to 256, and this is the kernel's setting now. If I set it to be larger, say 1024, will it yield better results? 4. Personally I think that this server can do MUCH better, and maybe the server's configuration is inaccurate, or insufficient. Any suggestions where to start? 5. If you need further analysis and information about the server's exact configuration, please let me know and I will provide them. Meanwhile, the burst of visitors have dropped and the server is back to its near "dead" state, where it serves pages quickly and do almost nothing. I would like it to serve pages as smoothly, though, when it's overloaded and have so many connections to handle. Please CC me on your replies. Thank you, Noor --=_mixed 00294A7488256A7E_= Content-Type: application/octet-stream; name="httpd.conf" Content-Disposition: attachment; filename="httpd.conf" Content-Transfer-Encoding: base64 U2VydmVyVHlwZSBzdGFuZGFsb25lDQpTZXJ2ZXJUb2tlbnMgUHJvZHVjdE9ubHkNClNlcnZlclJv b3QgIi93d3ciDQpEb2N1bWVudFJvb3QgIi93d3cvaHRtbC9CTEFOSy1WSE9TVCINClBvcnQgODAN ClNlcnZlckFkbWluIHdlYm1hc3RlckBkb21haW4uY29tDQpTZXJ2ZXJOYW1lIHd3dy5kb21haW4u Y29tDQoNClVzZXIgYXBhY2hlDQpHcm91cCBhcGFjaGUNCg0KTGlzdGVuIDE5Mi4xNjguMTAuMTA6 ODANCkxpc3RlbiAxOTIuMTY4LjEwLjEwOjQ0Mw0KTGlzdGVuIDE5Mi4xNjguMTAuMjA6ODANCkxp c3RlbiAxOTIuMTY4LjEwLjIwOjQ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kNCiAgICBBbGxvdyBmcm9tIGFsbA0KPC9EaXJlY3Rvcnk+DQo= --=_mixed 00294A7488256A7E_=-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message