On Thu, Feb 15, 2007, PLI wrote:

> I understand the RSS size.
> 72 M for VSize
> 4 M for RSS.
> swap used= +72M
>
> ex: if N apache launched, the size of swap used increase to N*Vsize.

No, not directly. The VS mainly is RSS plus others parts which _could_
be swapped out. But usually they are not. They are _SHARED_ parts
between the processes. If you spawn N Apache processes, each with 72MB
VS and just 4MB RSS, it means that each Apache process requires 4MB of
real RAM while all N Apache processes _together_ and just _once_ require
about 72-4=68MB of real RAM. Sure, in practice this calculation is a
little bit more complicated because the formula is more complex (as lots
of different shared memory segments exists, also other types of memory
exists, each Unix virtual memory subsystem does it partly different,
etc), but as a general rule of thumb it is this way on a modern Unix
system.

> Second, i see something strange during my test, on 2 différent sparc
> (SunFire versus Netra)
>
> The same apache binary (72 M VSize) compiled on SunFire grow to (140 M
> VSize) on Netra. So on the last hardware, the swap available decrease
> dramatically.

No, unless the machine really starts swapping, it just means that the
required shared memory between the Apache processes is larger. I don't
know why, but _once_ 140MB is no problem (see above).

> pmap -x $pid, show me on my netra, 2 blocks of 65M reserved for anon
> memory (shared memory perhaps).
>
> I suspect a bad tunning of my OS (sparc64-solaris2.9) or perhaps a bad
> tuning of the apache config.
>
> I will start an accurate debug, googling so much ;)
> If you have any idea or link....

Well, you have a rather fat Apache (SSL plus PHP integrated), so
it doesn't sound too strange that it consumes about 140MB of VS.
As I said, I would not worry about this at this stage...

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com

______________________________________________________________________
OpenPKG                                             http://openpkg.org
Developer Communication List                   openpkg-dev@openpkg.org

Reply via email to