Hello everyone,
I've noticed a very strange problem with apache, at the startup of each child, httpd grows to ~140mb and then comes back down to ~3m to 7m each.
Code:
# ps -U www -o user,pid,ppid,rss,vsize,pcpu,pmem,cmd -ww --sort=rss
USER PID PPID RSS VSZ %CPU %MEM CMD
www 13093 12270 1532 2848 0.0 0.0 -su
www 9442 9439 2996 139080 0.0 0.0 /usr/local/sbin/httpd
www 9493 9439 3020 139084 0.0 0.0 /usr/local/sbin/httpd
www 9443 9439 3036 139100 0.0 0.0 /usr/local/sbin/httpd
www 9441 9439 3100 139072 0.0 0.0 /usr/local/sbin/httpd
www 9447 9439 3152 139112 0.0 0.0 /usr/local/sbin/httpd
www 9446 9439 3384 139332 0.0 0.0 /usr/local/sbin/httpd
www 9444 9439 3428 139300 0.0 0.0 /usr/local/sbin/httpd
www 9440 9439 3444 139340 0.0 0.0 /usr/local/sbin/httpd
www 9448 9439 7200 142744 0.0 0.1 /usr/local/sbin/httpd
www 9449 9439 7220 142748 0.0 0.1 /usr/local/sbin/httpd
I ran a pmap on one of the childs and noticed an entry to /dev/zero (deleted) for 131072K.
Code:
# pmap 9449
9449: /usr/local/sbin/httpd
08048000 3328K r-x-- /usr/local/sbin/httpd
08388000 412K rw--- /usr/local/sbin/httpd
083ef000 4708K rw--- [ anon ]
afc2b000 184K rw-s- [ shmid=0x43842 ]
afc59000 131072K rw-s- /dev/zero (deleted)
b7c59000 132K r-x-- /usr/local/lib/php/extensions/no-debug-non-zts-20020429/eaccelerator.so
b7c7a000 4K rw--- /usr/local/lib/php/extensions/no-debug-non-zts-20020429/eaccelerator.so
b7c7b000 44K rw--- [ anon ]
b7c86000 36K r-x-- /lib/libnss_files-2.3.6.so
b7c8f000 8K rw--- /lib/libnss_files-2.3.6.so
b7c91000 20K rw--- [ anon ]
b7c96000 1132K r-x-- /lib/libc-2.3.6.so
b7db1000 4K r---- /lib/libc-2.3.6.so
b7db2000 12K rw--- /lib/libc-2.3.6.so
b7db5000 8K rw--- [ anon ]
b7db7000 120K r-x-- /usr/lib/libexpat.so.1.5.0
b7dd5000 8K rw--- /usr/lib/libexpat.so.1.5.0
b7dd7000 72K r-x-- /lib/libnsl-2.3.6.so
b7de9000 8K rw--- /lib/libnsl-2.3.6.so
b7deb000 8K rw--- [ anon ]
b7ded000 8K r-x-- /lib/libdl-2.3.6.so
b7def000 8K rw--- /lib/libdl-2.3.6.so
b7df1000 140K r-x-- /lib/libm-2.3.6.so
b7e14000 8K rw--- /lib/libm-2.3.6.so
b7e16000 4K rw--- [ anon ]
b7e17000 56K r-x-- /lib/libresolv-2.3.6.so
b7e25000 8K rw--- /lib/libresolv-2.3.6.so
b7e27000 8K rw--- [ anon ]
b7e29000 124K r-x-- /usr/lib/libjpeg.so.62.0.0
b7e48000 4K rw--- /usr/lib/libjpeg.so.62.0.0
b7e49000 76K r-x-- /lib/libz.so.1.2.3
b7e5c000 4K rw--- /lib/libz.so.1.2.3
b7e5d000 136K r-x-- /usr/lib/libpng12.so.0.12.0
b7e7f000 4K rw--- /usr/lib/libpng12.so.0.12.0
b7e80000 424K r-x-- /usr/lib/libfreetype.so.6.3.8
b7eea000 12K rw--- /usr/lib/libfreetype.so.6.3.8
b7eed000 20K r-x-- /lib/libcrypt-2.3.6.so
b7ef2000 8K rw--- /lib/libcrypt-2.3.6.so
b7ef4000 172K rw--- [ anon ]
b7f1f000 88K r-x-- /lib/ld-2.3.6.so
b7f35000 8K rw--- /lib/ld-2.3.6.so
bfeba000 108K rw--- [ stack ]
ffffe000 4K r-x-- [ anon ]
total 142752K
I've never seen this behavior before, I was wondering if anyone could help me figure out whats acutally happening here. The hardware is Dell 2950 (2 x 2.65Ghz quad core + 4Gb Mem). Its an LFS 6.2 install, below is a list of things I could think of to include:
Code:
# /usr/local/sbin/httpd -v
Server version: Apache/1.3.37 (Unix)
Server built: May 24 2007 10:47:16
Code:
# /usr/local/sbin/httpd -l
Compiled-in modules:
http_core.c
mod_env.c
mod_log_config.c
mod_mime.c
mod_negotiation.c
mod_status.c
mod_include.c
mod_autoindex.c
mod_dir.c
mod_cgi.c
mod_asis.c
mod_imap.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_rewrite.c
mod_access.c
mod_auth.c
mod_setenvif.c
mod_php4.c
Code:
# php -v
PHP 4.4.7 (cli) (built: May 24 2007 10:46:58)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
with eAccelerator v0.9.5.1, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
Code:
# php -m
[PHP Modules]
ctype
eAccelerator
gd
mbstring
mysql
overload
pcre
posix
session
sockets
standard
tokenizer
xml
zlib
[Zend Modules]
eAccelerator
Code:
# uname -a
Linux prime 2.6.21 #1 SMP Mon May 21 16:37:28 GMT 2007 i686 i686 i386 GNU/Linux
Code:
# gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.0.3/configure --prefix=/usr --libexecdir=/usr/lib --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++
Thread model: posix
gcc version 4.0.3