Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

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

Number and total size of memory regions, and total size of memory regions broken into private (broken into non-library and library) and shared components.

Another interesting link:

http://lists.apple.com/archives/darwin-dev/2007/Nov/msg00132.html

share|improve this answer
    
Thanks for this reply. It answered my basic question, but I'm still unsure using those values is the best way to configure MaxClients. That last link was very interesting. –  DTest Nov 27 '10 at 18:13
    

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?

share|improve this answer
    
Yes, Mac 'top' provides that information as well. And no 'free' command unfortunately. I know MaxClients calculation is an estimate, but previously I was using an average value of RSIZE (from top output) as a per process memory usage. Even though part of that is shared (if I understand the links dmah provided), I figure it's better to overestimate than under. –  DTest Nov 27 '10 at 18:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.