Re: fat apache/mod_ssl/mod_php: big memory size on solaris

2007-02-15 Thread PLI
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

thank for your answer

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.

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.

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

regards.

Ralf S. Engelschall wrote:
 
 Well, you said not RSS above, but only the RSS is what really counts
 here! The _virtual_ process size you can more or less completely ignore.
 Here the different Unix flavors always differ dramatically because of
 the way shared memory areas are counted, etc. So, as long as the RSS
 of your processes is about 10MB, everything is just fine. BTW, as a
 comparison: experience shows that a full-sized Apache usually grows up
 to 50MB in RSS after some processing time. For a small Apache I expect
 about 10MB RSS. The only thing you should keep in mind when comparing
 RSS values is that your system should be not already swapping as this
 fudges your comparison, of course. ;-)
 
Ralf S. Engelschall
[EMAIL PROTECTED]
www.engelschall.com
 
 __
 OpenPKG http://openpkg.org
 Developer Communication List   openpkg-dev@openpkg.org
 
 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF1N1oJR5cCX8pccMRAgS9AKCVn2VLViGZpx5/leszSfwR8zXL6QCg5QpY
rUkGtCFDHVk1dlRCIZJGWIM=
=WxCp
-END PGP SIGNATURE-
__
OpenPKG http://openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: fat apache/mod_ssl/mod_php: big memory size on solaris

2007-02-15 Thread Ralf S. Engelschall
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