LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 05-24-2007, 01:39 PM   #1
TTiZ
LQ Newbie
 
Registered: May 2007
Posts: 1

Rep: Reputation: 0
Strange httpd memory usage


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
 
Old 05-25-2007, 08:19 AM   #2
rumblestrut
LQ Newbie
 
Registered: May 2007
Posts: 3

Rep: Reputation: 0
I have the same thing this morning.

Quote:
apache 4024 0.0 0.5 26872 11788 ? S 07:19 0:00 /usr/sbin/httpd -k start
apache 4025 0.0 0.5 26888 11804 ? S 07:19 0:00 /usr/sbin/httpd -k start
apache 4026 0.0 0.5 26872 11788 ? S 07:19 0:00 /usr/sbin/httpd -k start
apache 4027 0.0 0.5 26872 11800 ? S 07:19 0:00 /usr/sbin/httpd -k start
apache 4028 0.0 0.5 26816 11740 ? S 07:19 0:00 /usr/sbin/httpd -k start
apache 4029 0.0 0.5 26872 11776 ? S 07:19 0:00 /usr/sbin/httpd -k start
apache 4030 0.0 0.5 26824 11708 ? S 07:19 0:00 /usr/sbin/httpd -k start
apache 4031 0.0 0.5 26872 11784 ? S 07:19 0:00 /usr/sbin/httpd -k start
apache 4032 0.0 0.5 26880 11800 ? S 07:19 0:00 /usr/sbin/httpd -k start
My CPU usage was actually being eaten up (killing my web site) by something called a.pl and I had to reboot. Sad thing is, I can't find a.pl on my system. I wonder if they're related?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
X hangs after prolonged usage ... memory usage goes upto 195MB duryodhan Slackware 18 05-10-2007 06:16 PM
100% Server Memory usage; too many httpd procs hansmast Linux - Server 3 09-11-2006 01:08 AM
getting realtime info on memory usage-cpu and harddrive usage steering Linux - Newbie 5 03-03-2005 08:43 PM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM
Controlling CPU usage & memory usage Saravana babu Linux - Software 0 02-18-2004 05:55 AM


All times are GMT -5. The time now is 03:04 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration