I'm running a Mac XServe as a dedicated apache mpm-prefork server with 8GB RAM. As part of the tuning process (I'm new to this), I'm trying to come up with the best value for MaxClients. To do so, I'm using 'top' to come up with a average process size, but I'm not sure which value represents actual memory size of the http process: 'RSIZE' or 'RPRVT'
What are the differences of these values? Thanks for any help.
According to:
http://macosx.com/forums/mac-os-x-system-mac-software/12720-top-command-questions.html
RSIZE = total resident memory. May be shared with other processes.
RPRVT = resident private memory.
And according to the manpage:
http://www.manpagez.com/man/1/top/osx-10.5.php
MemRegions
Another interesting link:
http://lists.apple.com/archives/darwin-dev/2007/Nov/msg00132.html
dmah's answer is technically correct - but the point is that you can tell from the per-process figures shown in 'top' how much memory is being shared.
Its not the place to start when working out what MaxClients should be.
There's a complication that the system will use as much free memory as practical for I/O caching - so looking at unused memory does not give a very accurate figure either!
On Linux there's a command 'free' which reports memory usage with and without the I/O buffering/caching, but I don't know if this is available on Mac OS. I used the figures returned from this combined with the number of httpd processes to calculate what MaxClients should be (until it reaches the level where I/O caching is seriously affected, the relationship is fairly linear). But with no procfs I doubt it would be as simple as recompiling it for your machine.
IIRC on BSD in top (or systat -vmstat) it reports the buffer usage along with total memory stats at the top of the page - does MacOS?