From owner-freebsd-questions Mon Nov 9 08:30:53 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA21851 for freebsd-questions-outgoing; Mon, 9 Nov 1998 08:30:53 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from loviatar.webcom.com (loviatar.webcom.com [209.1.28.41]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA21836 for ; Mon, 9 Nov 1998 08:30:51 -0800 (PST) (envelope-from graeme@echidna.com) Received: from eresh.webcom.com (eresh.webcom.com [209.1.28.49]) by loviatar.webcom.com (8.9.1/8.9.1) with SMTP id HAA30697 for ; Mon, 9 Nov 1998 07:30:37 -0800 Received: from [199.183.207.97] by inanna.webcom.com (WebCom SMTP 1.2.1) with SMTP id 10308362; Mon Nov 09 08:28 PST 1998 Message-Id: <364742EF.3F00@echidna.com> Date: Mon, 09 Nov 1998 11:30:55 -0800 From: Graeme Tait Organization: Echidna X-Mailer: Mozilla 2.02 (Win16; I) Mime-Version: 1.0 To: freebsd-questions@FreeBSD.ORG Cc: info@boatbooks.com Subject: How to understand memory (etc.) usage/needs Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I've just commisioned a FreeBSD/Apache webserver, serving a moderately busy site (300,000 hits/day over the weekend), and given that I know at this point barely enough UNIX to be dangerous, I'm impressed how well everything is working (I *did* manage to wipe all the sources by disklabelling da0s1f instead of da*1*s1f >:o( ), and how much better Unix utilities handle processing 1GB clog files than stock Windows apps. (which basically don't do much useful at all with such large files). >From all advice, the machine concerned (PII/400MHz, presently 128MB RAM, soon 256 MB) can do this easily, but I would like to understand how to assess resource usage, and know that I'm approaching limits *before* something degrades or breaks. The server may well get considerably busier in the future, and will soon have a fair bit of Perl cgi running in addition to straight html/shtml pages. For instance, an Apache rule is "never swap", so how do I know if this is imminent? Looking at displays like systat -v and top, there seem to be different numbers for memory usage on the different displays, and in any event, I'm not sure what they mean or how to find out. Top displays two numbers, "size" and "res" for each process. If I look at the default Apache setup (MaxClients 150), and multiply these values for Apache's kids (~580 and ~1100) by 150, I get 87MB and 165MB. What does this say about running out of memory? Presently, ps -aux | grep nobody | wc -l shows maybe 60-70 Apache children at busier moments. How should the Apache "MaxClients" value be scaled to installed memory? The only other big memory user at present is named (caching only, for reverse DNS), at maybe 10MB for both "size" and "res". Apart from memory, what other resources should I be monitoring, and how? -- Graeme Tait - Echidna To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message