Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Nov 1998 11:30:55 -0800
From:      Graeme Tait <graeme@echidna.com>
To:        freebsd-questions@FreeBSD.ORG
Cc:        info@boatbooks.com
Subject:   How to understand memory (etc.) usage/needs
Message-ID:  <364742EF.3F00@echidna.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?364742EF.3F00>