The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Memory Problems

Discussion in 'General Discussion' started by dhawton, Jan 12, 2005.

  1. dhawton

    dhawton Member

    Joined:
    Mar 9, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    After hours of running, apache and spamd are taking all my memory... I have 1GB of memory, and on a FreeBSD machine, I shouldn't see something like this (results from top):

    last pid: 9512; load averages: 0.02, 0.01, 0.00 up 0+09:19:10 11:35:57
    71 processes: 1 running, 70 sleeping
    CPU states: 5.2% user, 0.0% nice, 1.0% system, 0.0% interrupt, 93.8% idle
    Mem: 148M Active, 397M Inact, 129M Wired, 3060K Cache, 110M Buf, 304M Free
    Swap: 3072M Total, 3072M Free

    httpd processes are taking 20mb of memory each (resident), and spamd's child processes are doing the same thing...

    What is going on?? How do I cut down the memory bloat of these applications?
     
  2. bullethost696

    bullethost696 Well-Known Member

    Joined:
    Nov 23, 2003
    Messages:
    133
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    England, UK
    Looks fine to me almost No load and very few processes
     
  3. dhawton

    dhawton Member

    Joined:
    Mar 9, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Since my original post:

    last pid: 9832; load averages: 0.10, 0.03, 0.01 up 0+09:38:09 11:54:56
    81 processes: 2 running, 78 sleeping, 1 zombie
    CPU states: 0.4% user, 0.0% nice, 0.4% system, 0.1% interrupt, 99.1% idle
    Mem: 165M Active, 344M Inact, 129M Wired, 3060K Cache, 110M Buf, 340M Free
    Swap: 3072M Total, 3072M Free

    PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
    662 mysql 96 0 53888K 22536K select 0:23 0.00% 0.00% mysqld
    9475 root 4 0 22252K 21100K accept 0:00 0.00% 0.00% perl
    9479 root 4 0 22180K 21048K accept 0:00 0.00% 0.00% perl
    9477 root 4 0 22180K 21048K accept 0:00 0.00% 0.00% perl
    9478 root 4 0 22180K 21048K accept 0:00 0.00% 0.00% perl
    9476 root 4 0 22180K 21048K accept 0:00 0.00% 0.00% perl
    9474 root 20 0 21676K 20636K pause 0:01 0.00% 0.00% perl
    9464 nobody 20 0 25200K 20608K lockf 0:03 0.00% 0.00% httpd
    9468 nobody 20 0 17280K 12704K lockf 0:01 0.00% 0.00% httpd
    9471 nobody 20 0 17428K 12540K lockf 0:01 0.00% 0.00% httpd
    9470 nobody 20 0 17104K 12196K lockf 0:01 0.00% 0.00% httpd
    9466 nobody 20 0 16516K 11616K lockf 0:01 0.00% 0.00% httpd
    9465 nobody 96 0 16104K 11552K select 0:00 0.00% 0.00% httpd
    9467 nobody 20 0 16172K 11280K lockf 0:01 0.00% 0.00% httpd
    9539 nobody 20 0 14068K 9204K lockf 0:00 0.00% 0.00% httpd
    9458 root 96 0 14028K 8812K select 0:00 0.00% 0.00% httpd


    This is fine?? Doesn't look fine to me.
     
  4. dhawton

    dhawton Member

    Joined:
    Mar 9, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Those "perl" processes are:

    9474 ?? Is 0:00.61 /usr/bin/spamd -d --allowed-ips=127.0.0.1 --pidfile=/var/run/spamd.pid --max-children=5 (perl)
    9475 ?? I 0:00.25 spamd child (perl)
    9476 ?? I 0:00.15 spamd child (perl)
    9477 ?? I 0:00.15 spamd child (perl)
    9478 ?? I 0:00.15 spamd child (perl)
    9479 ?? I 0:00.15 spamd child (perl)
     
  5. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    38
    The spamd is normal. The new spamassassin is a memory hungry program, live with it or remove it completely.

    Your mysql config probably needs tweaking. What have you done thus far to tweak it? ( /etc/my.cnf )

    As for httpd / apache. In WHM under the "Security" menu heading select "Modify Apache Memory Usage". That might help out a little ( not sure if that feature is available on bsd installs, though should be ).

    Other than that, your load looks fine from what you've posted, and your not swaping at all so.. not to sure what your panicing about, unless it all goes down hill after its been online for X days.
     
  6. dhawton

    dhawton Member

    Joined:
    Mar 9, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    I am freaking because I've never seen MySQL and HTTPD take so much memory, ever. I haven't tweaked MySQL at all, because I never have.. don't want to fork it up.
     
  7. dhawton

    dhawton Member

    Joined:
    Mar 9, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    top now
    last pid: 13406; load averages: 0.00, 0.00, 0.00 up 0+13:11:51 15:28:38
    77 processes: 2 running, 75 sleeping
    CPU states: 0.0% user, 0.0% nice, 0.3% system, 0.0% interrupt, 99.7% idle
    Mem: 206M Active, 359M Inact, 148M Wired, 3304K Cache, 110M Buf, 265M Free
    Swap: 3072M Total, 3072M Free

    By tomorrow I'll have no free memory at this rate...
     
  8. bullethost696

    bullethost696 Well-Known Member

    Joined:
    Nov 23, 2003
    Messages:
    133
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    England, UK
    Your system will free up memory when it needs to, its most likely caching files to make more popular pages load quicker
     
  9. dhawton

    dhawton Member

    Joined:
    Mar 9, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    No, that can't be...

    last pid: 16639; load averages: 0.10, 0.04, 0.01 up 0+15:59:12 18:15:59
    71 processes: 2 running, 69 sleeping
    CPU states: 0.3% user, 0.0% nice, 0.0% system, 0.3% interrupt, 99.4% idle
    Mem: 196M Active, 562M Inact, 179M Wired, 656K Cache, 110M Buf, 43M Free
    Swap: 3072M Total, 76K Used, 3072M Free

    PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
    662 mysql 96 0 53888K 21896K select 0:42 0.00% 0.00% mysqld
    16551 root 4 0 22172K 20884K accept 0:00 0.00% 0.00% perl
    16548 root 20 0 21668K 20436K pause 0:01 0.00% 0.00% perl
    16555 root 4 0 21668K 20436K accept 0:00 0.00% 0.00% perl
    16552 root 4 0 21668K 20436K accept 0:00 0.00% 0.00% perl
    16553 root 4 0 21668K 20436K accept 0:00 0.00% 0.00% perl
    16554 root 4 0 21668K 20436K accept 0:00 0.00% 0.00% perl
    9464 nobody 20 0 25184K 18364K lockf 0:18 0.00% 0.00% httpd
    9468 nobody 20 0 25164K 18340K lockf 0:25 0.00% 0.00% httpd
    9467 nobody 20 0 25184K 18328K lockf 0:34 0.00% 0.00% httpd
    9470 nobody 20 0 25148K 18248K lockf 0:07 0.00% 0.00% httpd
    9539 nobody 20 0 25068K 18248K lockf 0:50 0.00% 0.00% httpd
    9471 nobody 20 0 20020K 13200K lockf 0:20 0.00% 0.00% httpd
    9465 nobody 20 0 19884K 13056K lockf 0:32 0.00% 0.00% httpd
    9466 nobody 20 0 18464K 11636K lockf 0:13 0.00% 0.00% httpd
    15946 nobody 96 0 14876K 8000K select 0:00 0.00% 0.00% httpd
    9458 root 96 0 14028K 6528K select 0:01 0.00% 0.00% httpd


    Something isn't right...
     
  10. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    38
    If you don't tweak your mysql in hopes of not "farking" it up, your heading for a "fark" up. Your problem is not that of a memory leak but lack of proper controls. Start doing some reading and research, or hire a professional to do the un"fark"ing for you.
     
  11. dave9000

    dave9000 Well-Known Member

    Joined:
    Apr 7, 2003
    Messages:
    891
    Likes Received:
    1
    Trophy Points:
    16
    Location:
    arkansas
    cPanel Access Level:
    Root Administrator
    Evidently your not familier with *nix and memory usage. The stats your showing us are perfectly normal like you were told above.

    according to your stats your only actually using 196 meg of ram
     
  12. s_2_s

    s_2_s Well-Known Member

    Joined:
    Aug 9, 2004
    Messages:
    215
    Likes Received:
    0
    Trophy Points:
    16
    hmmmmm
    MAN YOU ARE SO DAMN DAMN LUCKY
    YOUR SERVER IS SMOOTH AND WORKING SO FINE
    SEE MY DAMNED TOP


    08:06:52 up 1 day, 14:51, 2 users, load average: 2.12, 2.27, 2.43
    105 processes: 104 sleeping, 1 running, 0 zombie, 0 stopped
    CPU states: 0.5% user 0.5% system 0.0% nice 0.0% iowait 98.8% idle
    Mem: 1483316k av, 1463884k used, 19432k free, 0k shrd, 439292k buff
    1114884k actv, 600k in_d, 30804k in_c
    Swap: 0k av, 0k used, 0k free 672880k cached

    thank GOD for your good luck and stable server
     
  13. bullethost696

    bullethost696 Well-Known Member

    Joined:
    Nov 23, 2003
    Messages:
    133
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    England, UK
    Over 2 load from 100 processes, thats very worrying
     
  14. dave9000

    dave9000 Well-Known Member

    Joined:
    Apr 7, 2003
    Messages:
    891
    Likes Received:
    1
    Trophy Points:
    16
    Location:
    arkansas
    cPanel Access Level:
    Root Administrator
    i agree over 2 load with that set of stats something is bad wrong here

    give us a printout of the complete top stats
     
Loading...

Share This Page