Am Fr, 11.02.2011, 16:46, schrieb Michael Peters:
> On 02/11/2011 09:26 AM, Torsten Förtsch wrote:
>
>> What does that mean?
>> ====================
>>
>> The total size of a process comprises its complete address space.
>> Normally, by
>> far not everything of this space is present in RAM.
>
> I'm not sure I'm understanding you correctly here, but are you saying
> that most of the time not all of a process's memory space is in hardware
> RAM? If you are saying that, then I would disagree, at least in the
> context of httpd/mod_perl. Most of the time (if not all the time) the
> goal should be to have enough RAM that your httpd processes completely
> fit into memory.
>
> Or am I missing something?
>
> --
> Michael Peters
> Plus Three, LP
>

I didnt have time yet to read Torsten's post (will do later) but I will
take a stab at this question. You are missing the difference between
address space and used memory. Sample extract from /proc/*/smaps:

Size:                884 kB
Rss:                 536 kB
Pss:                  17 kB
Shared_Clean:        536 kB
Shared_Dirty:          0 kB
Private_Clean:         0 kB
Private_Dirty:         0 kB
Referenced:          536 kB
Swap:                  0 kB

In this case the address space has a size of 884 kb. Only 536 kb are used
though (Rss/Referenced). All of this space is shared. As you can see the
difference between 884 kb and 536 kb is not swapped out but just not
allocated.

Relying on smaps is a little complicated because the format differs with
the kernel version.

I usually use (just) Private_Dirty to determine if an apache process
should be restarted. Its hard to find good thresholds though.

Hendrik

Reply via email to