Grzegorz Nieweglowski <[EMAIL PROTECTED]> writes:
> Dominik Vogt wrote:
> > Any decent kernel is clever enough not to load multiple copies of the
> > same write-only data.
> 
> I'm using the linux kernel, 2.4.21.
> 
> Results of the "free" command with 100 instances of FvwmPager running:
> 
>          total       used       free     shared    buffers     cached
> Mem:    224728     131148      93580          0          0      18396
> -/+ buffers/cache: 112752     111976
> Swap:    51192       1372      49820
> 
> And the same after "killall FvwmPager":
> 
>          total       used       free     shared    buffers     cached
> Mem:    224728      70896     153832          0          0      18416
> -/+ buffers/cache:  52480     172248
> Swap:    51192       1372      49820
> 
> I guess that with 'a few hundreds' per module te amount of memory freed
> after killing all those pagers should change by a couple of megabytes in
> worst case , not by ~60MBs. And I believe these readings are correct
> - starting more modules (200 and up) chewed up all of RAM and swap, and
> the infamous OOM killer started killing processes.
> 
> Either it's my config, or running two pagers uses more ram than just "(1
> FvwmPager) + (less than 1KB)"

Here is my calculation of what the pager uses.  This is on Solaris 8
using the "pmap" command.  This is the output, slightly reformattted:

3490:   /opt/public/src//fvwm/2.5.7/FvwmPager 10 7 none 4800003 1 0 1
00052000     16K read/write/exec   /opt/public/src/fvwm/2.5.7/FvwmPager
00056000     72K read/write/exec     [ heap ]
FF036000     24K read/write/exec   /usr/lib/libc.so.1
FF03C000      8K read/write/exec   /usr/lib/libc.so.1
FF072000      8K read/write/exec   /usr/openwin/lib/libdga.so.1
FF11A000     32K read/write/exec   /usr/lib/libnsl.so.1
FF122000     32K read/write/exec   /usr/lib/libnsl.so.1
FF154000      8K read/write/exec   /usr/lib/libmp.so.2
FF170000      8K read/write/exec     [ anon ]
FF21C000     24K read/write/exec   /usr/openwin/lib/libX11.so.4
FF254000      8K read/write/exec   /usr/lib/libm.so.1
FF27A000      8K read/write/exec   /usr/lib/libsocket.so.1
FF2A8000      8K read/write/exec   /usr/openwin/lib/libXext.so.0
FF2D4000      8K read/write/exec   /usr/openwin/lib/libICE.so.6
FF2D6000      8K read/write/exec   /usr/openwin/lib/libICE.so.6
FF2FA000      8K read/write/exec   /usr/openwin/lib/libSM.so.6
FF31C000      8K read/write/exec   /usr/lib/libz.so.1
FF366000      8K read/write/exec   /opt/public/lib/libpng.so.3.1.2.5
FF38C000     16K read/write/exec   /opt/public/lib/libXpm.so.4.10
FF3B0000      8K read/write/exec     [ anon ]
FF3E0000      8K read/write/exec   /usr/lib/ld.so.1
FFBE8000     32K read/write/exec     [ stack ]

            360K

00010000    208K read/exec         /opt/public/src/fvwm/2.5.7/FvwmPager
FEF70000     16K read/exec         /usr/platform/sun4u/lib/libc_psr.so.1
FEF80000    664K read/exec         /usr/lib/libc.so.1
FF050000     72K read/exec         /usr/openwin/lib/libdga.so.1
FF080000    552K read/exec         /usr/lib/libnsl.so.1
FF140000     16K read/exec         /usr/lib/libmp.so.2
FF180000    560K read/exec         /usr/openwin/lib/libX11.so.4
FF230000     88K read/exec         /usr/lib/libm.so.1
FF260000     40K read/exec         /usr/lib/libsocket.so.1
FF280000     96K read/exec         /usr/openwin/lib/libXext.so.0
FF2B0000     80K read/exec         /usr/openwin/lib/libICE.so.6
FF2E0000     40K read/exec         /usr/openwin/lib/libSM.so.6
FF300000     48K read/exec         /usr/lib/libz.so.1
FF330000    160K read/exec         /opt/public/lib/libpng.so.3.1.2.5
FF370000     56K read/exec         /opt/public/lib/libXpm.so.4.10
FF3A0000      8K read/exec         /usr/lib/libdl.so.1
FF3C0000    128K read/exec         /usr/lib/ld.so.1

           2832K

 total     3192K

The total memory is 3meg.
I separated that into read/write and read/exec.
The read/exec is common memory (its only used once no matter how
often the pager is loaded).  Of the 3meg, thats 2.8 meg thats common.
The balance is 360K.

So, I'd say that the each instance of the pager takes 360K.

Probably what is most important is how much of this actually resides
in memory.  That could be a lot less than 360K.

Another issue is how many libaries got mapped into memory that
I wasn't already using.  I this case, I think I have all of them
already mapped.

One of the nice things about Fvwm is how much memory the pager
consumes for me. (Zero, I don't use it.)

-- 
Dan Espen                           E-mail: [EMAIL PROTECTED]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to