1-Feb-00 13:11 you wrote:
> I saw some discussions about configuration of "lightweight"
> mod_proxy+mod_ssl server and mod_perl server.
> But, sorry, I can't call mod_proxy+mod_ssl "light" server. Mod_ssl adds a 1
> Meg to size of process.

Who cares ? 1MiB or 20MiBs - no matter. It's just shared code. Real non-shared
data for each apache copy is typically 40-50KiB's and usually tolerable.

> Btw, it seems to be offtopic, but are there any tool kinda 'top' that shows
> really used memory, because top shows:

Heh. If you want to show "really used memory" you must define such thing first.
In current *nix'es (including Linux; in fact ESCPECIALLY in Linux) there are
no such thing as "really used memory". If you have pages shared between all
apache copies (like mod_ssl configuarion data) - is it "really used memory"
or not ? What about libmm's shared memory ? glibc is mapped in [almost]
all processes in system - is it "really used memory" or not ? When you malloced
100MiB and not used it - is it "really used memory" (in such case Linux will
not allocate virtual memory till first write!) ? Etc, etc, etc.

> ----------------------------------------------
> 134 processes: 133 sleeping, 1 running, 0 zombie, 0 stopped
> CPU states:  2.2% user,  3.3% system,  0.0% nice, 94.8% idle
> Mem:  128396K av, 125284K used,   3112K free, 127332K shrd,   7976K buff
> Swap: 130748K av,   3924K used, 126824K free                 52540K cached

>   PID USER     PRI  NI  SIZE  RSS SHARE STAT  LIB %CPU %MEM   TIME COMMAND
> 28358 apache     0   0 17160  16M 11224 S       0  0.0 13.3   0:01 libhttpd.ep
> 28361 apache     0   0 16920  16M 11272 S       0  0.0 13.1   0:01 libhttpd.ep
> 28357 apache     0   0 16876  16M 11260 S       0  0.0 13.1   0:01 libhttpd.ep
> 28356 apache     0   0 16396  16M 11320 S       0  0.0 12.7   0:01 libhttpd.ep
> 28351 root       0   0 14316  13M 14188 S       0  0.0 11.1   0:01 libhttpd.ep
> 28359 apache     0   0 14312  13M 14192 S       0  0.0 11.1   0:00 libhttpd.ep
> 28360 apache     0   0 14312  13M 14192 S       0  0.0 11.1   0:00 libhttpd.ep
> 28339 apache     0   0  1912 1912  1492 S       0  0.0  1.4   0:00 libhttpd.ep
> 28346 apache     0   0  1720 1720  1488 S       0  0.0  1.3   0:00 libhttpd.ep
> 28344 apache     0   0  1712 1712  1488 S       0  0.0  1.3   0:00 libhttpd.ep
> 28337 apache     0   0  1672 1672  1472 S       0  0.0  1.3   0:00 libhttpd.ep
> 28343 apache     0   0  1672 1672  1472 S       0  0.0  1.3   0:00 libhttpd.ep
> 28341 apache     0   0  1664 1664  1468 S       0  0.0  1.2   0:00 libhttpd.ep
> 28338 apache     0   0  1660 1660  1468 S       0  0.0  1.2   0:00 libhttpd.ep
> 28345 apache     0   0  1660 1660  1472 S       0  0.0  1.2   0:00 libhttpd.ep
> 28340 apache     0   0  1656 1656  1468 S       0  0.0  1.2   0:00 libhttpd.ep
> 28342 apache     0   0  1652 1652  1464 S       0  0.0  1.2   0:00 libhttpd.ep
> 28273 root       1   0  1536 1536  1388 S       0  0.2  1.1   0:00 libhttpd.ep
> .............
> ----------------------------------------------
> 125284K used - is it real value ??

Looks so. And it's great: almost all memory is used - this mean that you server
does not swap hard and then throwing out loaded pages (it can do other nasty
things of course but in Linux situation where you have PLENTY free memory is
alarm, not situations where [almost] all available memory is used).

> I ask because Shared memory is greater than used :) I think this is
> impossible.

Hmm. Here I see even more strange shared memory value:
-- cut --
  5:20am  up 12 days, 13:49,  8 users,  load average: 3.74, 3.59, 3.91
253 processes: 248 sleeping, 5 running, 0 zombie, 0 stopped
CPU states: 143.7% user, 29.3% system,  0.0% nice,  0.0% idle
CPU0 states: 73.0% user, 14.3% system,  0.0% nice, 13.0% idle
CPU1 states: 70.6% user, 15.0% system,  0.0% nice, 14.6% idle
Mem:  254748K av, 251876K used,   2872K free,      0K shrd,   2068K buff
Swap: 240960K av,  10492K used, 230468K free                 65828K cached

  PID USER     PRI  NI  SIZE  RSS SHARE STAT MCPU %CPU %MEM   TIME COMMAND
 5197 root       0   0 55112  53M     0 S      0   0.0 21.6   4:17 mirror
16843 apache     0   0  6516 6516  5980 S      1   0.0  2.5   0:00 apache
16914 apache     0   0  6372 6372  5912 S      1   0.0  2.5   0:00 apache
15778 apache     0   0  6228 6228  5948 S      1   0.0  2.4   0:00 apache
16549 apache     0   0  6224 6224  5948 S      0   0.0  2.4   0:00 apache
16546 apache     0   0  6216 6216  5948 S      0   0.0  2.4   0:00 apache
16912 apache     0   0  6216 6216  5948 S      1   0.0  2.4   0:00 apache
16913 apache     0   0  6216 6216  5948 S      1   0.0  2.4   0:00 apache
16942 apache     0   0  6216 6216  5948 S      0   0.0  2.4   0:00 apache
 7939 root       0   0  5992 5992  5816 S      1   0.0  2.3   0:25 apache
 8032 apache     0   0  4408 4408  3940 S      1   0.0  1.7   0:00 apache
-- cut --
Since all works just fine I do not bother much.

> Memory - is a main reason why I wanna place mod_ssl to back_end server. If I
> compile mod_ssl as DSO on front-end and it grows my used memory at 1-2 Meg
> totally for 20-30 front-end processes - it will be a solution.

Try and see.

P.S. BTW top does not count memory itself in Linux :-) Kernel does this
(take look on /proc/meminfo and /proc/<number>/status )... So if you see
strange values in top it's kernel problem, not top one.


Reply via email to