Results 1 to 4 of 4
  1. #1

    Too much httpd and load

    I have 3.0 pentium with 2Gb RAM... It's the first time I use plesk and this is strange...

    top - 23:20:00 up 2:42, 1 user, load average: 9.87, 13.60, 10.29
    Tasks: 149 total, 29 running, 120 sleeping, 0 stopped, 0 zombie
    Cpu(s): 93.9% us, 6.1% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi, 0.0% si
    Mem: 2064724k total, 1208656k used, 856068k free, 46252k buffers
    Swap: 522104k total, 0k used, 522104k free, 354784k cached

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    2354 mysql 20 0 290m 90m 4500 S 12.6 4.5 21:08.10 mysqld
    29098 apache 20 0 44140 23m 4352 R 8.0 1.2 0:02.20 httpd
    28621 apache 20 0 41560 23m 4360 R 7.3 1.1 0:06.38 httpd
    28855 apache 20 0 43992 23m 4356 R 7.3 1.2 0:06.28 httpd
    29252 apache 20 0 34672 15m 3344 R 7.3 0.8 0:00.22 httpd
    27117 apache 20 0 44632 24m 4692 S 6.6 1.2 0:19.58 httpd
    28517 apache 20 0 44196 23m 4500 R 6.6 1.2 0:10.76 httpd
    28930 apache 20 0 44272 23m 4504 R 6.6 1.2 0:06.16 httpd
    28994 apache 20 0 42756 22m 4396 R 6.6 1.1 0:03.12 httpd
    29026 apache 20 0 43584 23m 4700 R 6.6 1.1 0:04.04 httpd
    29173 apache 20 0 41212 22m 3708 R 6.6 1.1 0:01.86 httpd
    29194 apache 20 0 41056 21m 3756 R 6.6 1.1 0:01.08 httpd
    29229 apache 20 0 38132 18m 3668 R 6.6 0.9 0:01.04 httpd
    29232 apache 20 0 42876 22m 4344 R 6.6 1.1 0:01.08 httpd
    29236 apache 20 0 36708 17m 3728 R 6.6 0.9 0:00.74 httpd
    28564 apache 20 0 44300 23m 4712 R 6.0 1.2 0:08.96 httpd
    28926 apache 20 0 44228 23m 4408 R 6.0 1.2 0:04.44 httpd
    29063 apache 20 0 43588 22m 4336 R 6.0 1.1 0:03.40 httpd
    29073 apache 20 0 43944 23m 4388 R 6.0 1.2 0:03.94 httpd
    29172 apache 20 0 41056 21m 3752 R 6.0 1.1 0:01.50 httpd
    29192 apache 20 0 44704 24m 4408 R 6.0 1.2 0:03.20 httpd
    29237 apache 20 0 37100 18m 3660 R 6.0 0.9 0:00.64 httpd
    29254 apache 20 0 33432 14m 3340 R 6.0 0.7 0:00.18 httpd
    29228 apache 20 0 35056 16m 3656 S 5.3 0.8 0:00.36 httpd
    29105 apache 20 0 44744 24m 4452 R 4.7 1.2 0:04.74 httpd
    29106 apache 20 0 43908 23m 4548 R 4.7 1.2 0:05.36 httpd
    29193 apache 20 0 35124 16m 3652 R 4.7 0.8 0:00.68 httpd
    29195 apache 20 0 43324 22m 4332 S 4.7 1.1 0:01.36 httpd
    28551 apache 20 0 44240 23m 4596 R 4.0 1.2 0:10.64 httpd
    28727 apache 20 0 44012 23m 4492 S 4.0 1.2 0:08.70 httpd
    29223 apache 20 0 44048 23m 4428 S 3.3 1.2 0:01.26 httpd
    29224 apache 20 0 43236 22m 4328 S 2.0 1.1 0:01.06 httpd
    29219 apache 20 0 35108 16m 3648 S 1.3 0.8 0:00.70 httpd
    29259 apache 20 0 28860 9816 3296 R 1.3 0.5 0:00.04 httpd
    29260 apache 20 0 28464 9476 3284 R 1.3 0.5 0:00.04 httpd

    I have some webs with 30K/40K visits each day (it's not too much)... A smaller CPU with 1Gb RAM with cPanel and Apache 1.3 worked perfectly, and now with a bigger computer and plesk I see this...

    More info on server-status

    Server Version: Apache/2.0.54 (Fedora)
    Server Built: Jul 26 2006 11:00:19

    Current Time: Monday, 28-Apr-2008 23:40:53 CEST
    Restart Time: Monday, 28-Apr-2008 23:25:38 CEST
    Parent Server Generation: 0
    Server uptime: 15 minutes 14 seconds
    Total accesses: 13025 - Total Traffic: 44.9 MB
    CPU Usage: u1183.04 s50.79 cu.01 cs0 - 135% CPU load
    14.3 requests/sec - 50.3 kB/second - 3616 B/request
    34 requests currently being processed, 67 idle workers

    C_C_C_____W__C_WC__WCW_W_R______C____W_W_W._W.___W W____WC.CC___W
    ___W__WC_W__W_________W__..WW_W.___W____._.__..... ..............
    .................................................. ..............
    .................................................. ........


    Any help, PLEASE ?

  2. #2
    Join Date
    Mar 2008
    Posts
    47
    Try to find out whether your server is being attacked on port 80. The below command will show how many connections were established on port 80 from each IP address:

    Code:
    for i in `netstat -nape | grep :80 | awk {'print$5'} | cut -d ':' -f1 | sort -n | uniq| grep -v 0.0.0.0`; do echo $i" "`netstat -nape | grep :80 | awk {'print$5'} | cut -d ':' -f1| grep $i|wc -l`; done;
    If the results look good, try to find out which website is most active:

    Code:
    service httpd fullstatus
    GlowHost.com - Your fully managed, dedicated server specialists.
    >> FFmpeg Web Hosting - Video Sharing and Social Networking web sites
    >>> SHOUTcast Servers - 128k - Unlimited Users - Radio Control Panel
    >>>> 99.9% Uptime Guarantee - 60 day risk free money back - 24/7/365 Support

  3. #3
    There's norma results for netstat command... a lot of IP's but the bigger visitor has about 10 connections opened.

    About the server-status info it's part of the info posted originally. I see web URL's petitions normally.

    The thing is that "the same webs" in a lower CPU/memory computer with Apache 1.3 had no problems at all... 1 or 2 of load average.

    In this case, the computer is bigger and running apache 2 (i though it was better) and load average is too high.

    I have been playing with httpd.conf... with this config the server is now a little better:

    StartServers 2
    MinSpareServers 2
    MaxSpareServers 5
    ServerLimit 250
    MaxClients 200
    MaxRequestsPerChild 2000

    But now it's around 5 - 7 of load average... I think it's possible to get it better... but i do not know how.

    thank you in advance

  4. #4
    Join Date
    Mar 2008
    Posts
    47
    Try to find out which processes are taking a lot of resources (CPU/memory) with help of "top -c".

    When you have PID's of those processes, you can find the files which are opened by it:

    Code:
    lsof -p PID
    GlowHost.com - Your fully managed, dedicated server specialists.
    >> FFmpeg Web Hosting - Video Sharing and Social Networking web sites
    >>> SHOUTcast Servers - 128k - Unlimited Users - Radio Control Panel
    >>>> 99.9% Uptime Guarantee - 60 day risk free money back - 24/7/365 Support

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •