On Wed, 7 Feb 2001, rene mendoza wrote:

> Hi, i have a question regarding mod_perl/apache mysql memory usage
> 
> I have a Linux box running Red Hat 6.1, Apache 1.3.14, 
> compiled statically with mod_perl 1.24_01, mod_ssl, and Open SSL,
> mod_dav and mod_gzip running as DSO's, 
> MYSQL is
> mysql-3.23.28-gamma-pc-linux-gnu-i686 (binary)
> 
> 
> im using Apache DBI and Apache Session Mysql
> the linux box has an Intel celeron processor @400mhz, 
> 96 Mb of RAM (graphics video share at 4MB i think)
> and a hard drive of 4GB
> 
> 
> this is a development offline server so i running things like X, and, vnc and kde 
> but im very concerned with the usage of memory
> 
> 
> im connecting via ethernet from a windows box with Internet Explorer and with
> Netscape, after a few requests httpd memory usage grows to 80MB, and mysqld to over 
>20MB
> 
> 
> it still feels fast but im wondering if its normal???

It's normal because perl (mod_perl as a part) is not freeing memory at
cleanup phase of request serving.
It'll cure by changing in httpd.conf MaxClientsPerChild from 0 to 25 -
100.

> 
> i m not familiar linux memory usage under linux
> , i know that probably this question should be sent to other list
> any suggestions to where??
> 
> anybody please could tell me where to look (my mason components, handler.pl,
> httpd.conf, or somewhere else)
> i guess that the same mysql database handle isnt being used by the components am i 
>right?
> 
> 
> im using  Mason 0.896
> 
> ########################################################################
> 
> On startup this is the output of top -b:
> 
>   3:43pm  up 14 min,  1 user,  load average: 0.09, 0.12, 0.09
> 58 processes: 57 sleeping, 1 running, 0 zombie, 0 stopped
> CPU states:  2.1% user,  6.7% system,  0.0% nice, 91.1% idle
> Mem:   87364K av,  85236K used,   2128K free,  77048K shrd,   5944K buff
> Swap: 128512K av,   3492K used, 125020K free                 50264K cached
> 
>   PID USER     PRI  NI  SIZE  RSS SHARE STAT  LIB %CPU %MEM   TIME COMMAND
>   726 root      18   0  4204 4204  2948 S       0  4.9  4.8   0:31 gtop
>   680 root       9   0  4076 4076  1168 S       0  1.5  4.6   0:24 Xvnc
>   756 root       5   0  4268 4268  3080 S       0  1.1  4.8   0:04 ktop
>   770 root       9   0  1032 1032   824 R       0  0.9  1.1   0:00 top
>     3 root       1   0     0    0     0 SW      0  0.1  0.0   0:00 kupdate
>     1 root       0   0   460  460   388 S       0  0.0  0.5   0:04 init
>     2 root       0   0     0    0     0 SW      0  0.0  0.0   0:00 kflushd
>     4 root       0   0     0    0     0 SW      0  0.0  0.0   0:00 kpiod
>     5 root       0   0     0    0     0 SW      0  0.0  0.0   0:00 kswapd
>     6 root     -20 -20     0    0     0 SW<     0  0.0  0.0   0:00 mdrecoveryd
>   291 bin        0   0   308  288   228 S       0  0.0  0.3   0:00 portmap
>   307 root       0   0   392  380   328 S       0  0.0  0.4   0:00 apmd
>   360 root       0   0   516  508   420 S       0  0.0  0.5   0:00 syslogd
>   371 root       0   0   668  656   316 S       0  0.0  0.7   0:00 klogd
>   387 daemon     0   0   312  296   232 S       0  0.0  0.3   0:00 atd
>   403 root       0   0   548  540   452 S       0  0.0  0.6   0:00 crond
>   423 root       0   0   444  436   368 S       0  0.0  0.4   0:00 inetd
>   439 root       0   0   448  436   368 S       0  0.0  0.4   0:00 lpd
>   462 root       0   0   868  868   672 S       0  0.0  0.9   0:00 in.telnetd
>   463 root       0   0  1116 1116   868 S       0  0.0  1.2   0:00 login
>   464 jaimeren   0   0   956  956   768 S       0  0.0  1.0   0:00 bash
>   478 root       0   0  1064 1064   704 S       0  0.0  1.2   0:00 su
>   479 root       5   0   988  988   756 S       0  0.0  1.1   0:00 bash
>   505 root       0   0   808  664   516 S       0  0.0  0.7   0:00 sendmail
>   522 root       0   0   340  312   268 S       0  0.0  0.3   0:00 gpm
>   539 xfs        0   0  1088 1080   584 S       0  0.0  1.2   0:00 xfs
>   590 root       0   0   392  332   252 S       0  0.0  0.3   0:00 S99local
>   592 root       0   0   840  840   688 S       0  0.0  0.9   0:00 safe_mysqld
>   621 root       0   0  1632 1632   988 S       0  0.0  1.8   0:00 mysqld
>   623 root       0   0   596  512   408 S       0  0.0  0.5   0:00 smbd
>   634 root       0   0   756  708   572 S       0  0.0  0.8   0:00 nmbd
>   639 root       0   0  1632 1632   988 S       0  0.0  1.8   0:00 mysqld
>   640 root       0   0  1632 1632   988 S       0  0.0  1.8   0:00 mysqld
>   641 root       0   0  1200  656   452 S       0  0.0  0.7   0:00 named
>   643 root       0   0   384  384   316 S       0  0.0  0.4   0:00 mingetty
>   644 root       0   0   384  384   316 S       0  0.0  0.4   0:00 mingetty
>   645 root       0   0   384  384   316 S       0  0.0  0.4   0:00 mingetty
>   646 root       0   0   384  384   316 S       0  0.0  0.4   0:00 mingetty
>   647 root       0   0   384  384   316 S       0  0.0  0.4   0:00 mingetty
>   648 root       0   0   384  384   316 S       0  0.0  0.4   0:00 mingetty
>   649 root       0   0  1004 1004   944 S       0  0.0  1.1   0:00 gdm
>   657 root       0   0 11016  10M  1812 S       0  0.0 12.6   0:00 X
>   658 root       0   0   776  736   668 S       0  0.0  0.8   0:00 gdm
>   665 gdm        0   0  3156 3156  2400 S       0  0.0  3.6   0:00 gdmlogin
>   683 root       0   0  4116 4116  3004 S       0  0.0  4.7   0:02 kwm
>   684 root       0   0  3736 3736  2712 S       0  0.0  4.2   0:00 kbgndwm
>   685 root       0   0   400  344   264 S       0  0.0  0.3   0:00 startkde
>   690 root       0   0   656  656   512 S       0  0.0  0.7   0:00 autorun
>   711 root       0   0  1576  404   324 S       0  0.0  0.4   0:01 kfm
>   712 root       0   0  3692 3692  2688 S       0  0.0  4.2   0:00 krootwm
>   713 root       0   0  2228 1212   976 S       0  0.0  1.3   0:01 kpanel
>   728 root       0   0   436  436   336 S       0  0.0  0.4   0:00 esd
>   764 root       0   0  7472 7472  7296 S       0  0.0  8.5   0:00 httpd
>   765 nobody     0   0  7476 7476  7316 S       0  0.0  8.5   0:00 httpd
>   766 nobody     0   0  7476 7476  7316 S       0  0.0  8.5   0:00 httpd
>   767 nobody     0   0  7476 7476  7316 S       0  0.0  8.5   0:00 httpd
>   768 nobody     0   0  7476 7476  7316 S       0  0.0  8.5   0:00 httpd
>   769 nobody     0   0  7476 7476  7316 S       0  0.0  8.5   0:00 httpd
>   
>   
>   According to gtop memory usage is:
>   there are 6 httpd processes using 44852K
>   there are 3 mysqld processes using 4896k
>   
>   
>   
>   apachectl status says the following
>   
>      Server Version: Apache/1.3.14 (Unix) DAV/1.0.2 mod_perl/1.24_01
>    mod_ssl/2.7.1 OpenSSL/0.9.6
>    Server Built: Jan 22 2001 13:50:11
>      _________________________________________________________________
> 
>    Current Time: Wednesday, 07-Feb-2001 15:54:29 CST
>    Restart Time: Wednesday, 07-Feb-2001 15:42:40 CST
>    Parent Server Generation: 0
>    Server uptime: 11 minutes 49 seconds
>    Total accesses: 0 - Total Traffic: 0 kB
>    CPU Usage: u0 s0 cu0 cs0
>    0 requests/sec - 0 B/second -
>    1 requests currently being processed, 4 idle servers
> ____W...........................................................
> ................................................................
> ................................................................
> ................................................................
> 
>    
>  mysqladmin shows says the following
>  
> 
> | Bytes_received           | 73    |
> | Bytes_sent               | 309   |
> | Connections              | 4     |
>    
>    
> ##########################################################################
> 
> After a few requests of both browsers i get the following
> 
> mysql extended status:
> 
> | Bytes_received           | 47875 |
> | Bytes_sent               | 56982 |
> | Connections              | 14    |
> 
> apache status
> 
> 
> Current Time: Wednesday, 07-Feb-2001 16:32:28 CST
>    Restart Time: Wednesday, 07-Feb-2001 15:42:40 CST
>    Parent Server Generation: 0
>    Server uptime: 49 minutes 48 seconds
>    Total accesses: 191 - Total Traffic: 189 kB
>    CPU Usage: u4.12 s.71 cu0 cs0 - .162% CPU load
>    .0639 requests/sec - 64 B/second - 1013 B/request
>    1 requests currently being processed, 8 idle servers
> _____W___.......................................................
> ................................................................
> ................................................................
> ................................................................
> 
> according to gtop memory usage is 
> 
>   there are 10 httpd processes using 83168K
>   there are 11 mysqld processes using 25828k
>   
>   
>   top -b
>   
>   
>   4:34pm  up  1:05,  1 user,  load average: 0.07, 0.03, 0.01
> 70 processes: 69 sleeping, 1 running, 0 zombie, 0 stopped
> CPU states:  2.0% user,  4.2% system,  0.0% nice, 93.7% idle
> Mem:   87364K av,  85236K used,   2128K free,  92484K shrd,   3892K buff
> Swap: 128512K av,   3340K used, 125172K free                 27808K cached
> 
>   PID USER     PRI  NI  SIZE  RSS SHARE STAT  LIB %CPU %MEM   TIME COMMAND
>   726 root      10   0  4208 4208  2948 S       0  3.7  4.8   2:33 gtop
>   833 root       9   0  1032 1032   816 R       0  3.7  1.1   0:00 top
>   680 root       6   0  3984 3984  1168 S       0  1.8  4.5   0:46 Xvnc
>     1 root       0   0   460  460   388 S       0  0.0  0.5   0:04 init
>     2 root       0   0     0    0     0 SW      0  0.0  0.0   0:00 kflushd
>     3 root       0   0     0    0     0 SW      0  0.0  0.0   0:00 kupdate
>     4 root       0   0     0    0     0 SW      0  0.0  0.0   0:00 kpiod
>     5 root       0   0     0    0     0 SW      0  0.0  0.0   0:00 kswapd
>     6 root     -20 -20     0    0     0 SW<     0  0.0  0.0   0:00 mdrecoveryd
>   291 bin        0   0   308  288   228 S       0  0.0  0.3   0:00 portmap
>   307 root       0   0   392  380   328 S       0  0.0  0.4   0:00 apmd
>   360 root       0   0   516  508   420 S       0  0.0  0.5   0:00 syslogd
>   371 root       0   0   668  656   316 S       0  0.0  0.7   0:00 klogd
>   387 daemon     0   0   312  296   232 S       0  0.0  0.3   0:00 atd
>   403 root       0   0   548  540   452 S       0  0.0  0.6   0:00 crond
>   423 root       0   0   444  436   368 S       0  0.0  0.4   0:00 inetd
>   439 root       0   0   448  436   368 S       0  0.0  0.4   0:00 lpd
>   462 root       0   0   868  868   672 S       0  0.0  0.9   0:00 in.telnetd
>   463 root       0   0  1116 1116   868 S       0  0.0  1.2   0:00 login
>   464 jaimeren   0   0   956  956   768 S       0  0.0  1.0   0:00 bash
>   478 root       0   0  1064 1064   704 S       0  0.0  1.2   0:00 su
>   479 root       5   0   988  988   756 S       0  0.0  1.1   0:00 bash
>   505 root       0   0   808  664   516 S       0  0.0  0.7   0:00 sendmail
>   522 root       0   0   340  312   268 S       0  0.0  0.3   0:00 gpm
>   539 xfs        0   0  1088 1080   584 S       0  0.0  1.2   0:00 xfs
>   590 root       0   0   392  332   252 S       0  0.0  0.3   0:00 S99local
>   592 root       0   0   840  840   688 S       0  0.0  0.9   0:00 safe_mysqld
>   621 root       0   0  2348 2348  1384 S       0  0.0  2.6   0:00 mysqld
>   623 root       0   0   600  516   424 S       0  0.0  0.5   0:00 smbd
>   634 root       0   0   756  708   572 S       0  0.0  0.8   0:00 nmbd
>   639 root       0   0  2348 2348  1384 S       0  0.0  2.6   0:00 mysqld
>   640 root       0   0  2348 2348  1384 S       0  0.0  2.6   0:00 mysqld
>   641 root       0   0  1288  772   564 S       0  0.0  0.8   0:00 named
>   643 root       0   0   384  384   316 S       0  0.0  0.4   0:00 mingetty
>   644 root       0   0   384  384   316 S       0  0.0  0.4   0:00 mingetty
>   645 root       0   0   384  384   316 S       0  0.0  0.4   0:00 mingetty
>   646 root       0   0   384  384   316 S       0  0.0  0.4   0:00 mingetty
>   647 root       0   0   384  384   316 S       0  0.0  0.4   0:00 mingetty
>   648 root       0   0   384  384   316 S       0  0.0  0.4   0:00 mingetty
>   649 root       0   0  1004 1004   944 S       0  0.0  1.1   0:00 gdm
>   657 root       0   0 11016  10M  1812 S       0  0.0 12.6   0:00 X
>   658 root       0   0   776  736   668 S       0  0.0  0.8   0:00 gdm
>   665 gdm        0   0  3156 3156  2400 S       0  0.0  3.6   0:00 gdmlogin
>   683 root       0   0  4116 4116  3004 S       0  0.0  4.7   0:02 kwm
>   684 root       0   0  3736 3736  2712 S       0  0.0  4.2   0:00 kbgndwm
>   685 root       0   0   400  344   264 S       0  0.0  0.3   0:00 startkde
>   690 root       0   0   656  656   512 S       0  0.0  0.7   0:01 autorun
>   711 root       0   0  2116 1068   940 S       0  0.0  1.2   0:01 kfm
>   712 root       0   0  3692 3692  2688 S       0  0.0  4.2   0:00 krootwm
>   713 root       0   0  2812 1952  1612 S       0  0.0  2.2   0:01 kpanel
>   728 root       0   0   436  436   336 S       0  0.0  0.4   0:00 esd
>   764 root       0   0  7472 7472  7312 S       0  0.0  8.5   0:00 httpd
>   765 nobody     0   0  8608 8608  5480 S       0  0.0  9.8   0:00 httpd
>   766 nobody     0   0  8648 8648  5496 S       0  0.0  9.8   0:00 httpd
>   767 nobody     0   0  8448 8448  5512 S       0  0.0  9.6   0:00 httpd
>   768 nobody     0   0  8636 8636  5480 S       0  0.0  9.8   0:00 httpd
>   769 nobody     0   0  8684 8684  5492 S       0  0.0  9.9   0:01 httpd
>   797 root       0   0  2396 2376  2004 S       0  0.0  2.7   0:00 smbd
>   798 root       0   0  2348 2348  1384 S       0  0.0  2.6   0:00 mysqld
>   799 nobody     0   0  8412 8412  5524 S       0  0.0  9.6   0:00 httpd
>   800 nobody     0   0  8392 8392  5512 S       0  0.0  9.6   0:00 httpd
>   801 root       0   0  2348 2348  1384 S       0  0.0  2.6   0:00 mysqld
>   804 root       0   0  2348 2348  1384 S       0  0.0  2.6   0:00 mysqld
>   805 nobody     0   0  8388 8388  5512 S       0  0.0  9.6   0:00 httpd
>   806 root       0   0  2348 2348  1384 S       0  0.0  2.6   0:00 mysqld
>   807 root       0   0  2348 2348  1384 S       0  0.0  2.6   0:00 mysqld
>   808 root       0   0  2348 2348  1384 S       0  0.0  2.6   0:00 mysqld
>   809 root       0   0  2348 2348  1384 S       0  0.0  2.6   0:00 mysqld
>   810 root       0   0  2348 2348  1384 S       0  0.0  2.6   0:00 mysqld
>   822 nobody     0   0  7480 7480  7320 S       0  0.0  8.5   0:00 httpd
> 

Vasily Petrushin
+7 (095) 2508363
http://www.interfax.ru
mailto:[EMAIL PROTECTED]

Reply via email to