Load averages very high, while the CPU usage is low

Discussion in 'Site & Server Administration' started by fantozzi, Jul 16, 2008.

  1. #1
    I have a dedicated server (WHM/Cpanel, with Linux/Apache/MySQL/PHP) and I noticed recently that the load averages are very high, all the time. When running "uptime" in the console, I get something like

     16:09:38 up 9 days,  2:41,  1 user,  load average: 9.18, 8.19, 7.11
    Code (markup):
    Nevertheless, when running "top", I see that the percentage of CPU usage is usually less than 10% and almost always under 20%.

    I tried various things, including stopping the log analyzing software (Webalizer, Analog), but nothing changed.

    Any idea what could be the problem?
     
    fantozzi, Jul 16, 2008 IP
  2. wattie

    wattie Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Can you put the entire "top" output? Maybe your server is "swapping", eg it's out of RAM.

    P.S. Do you have more httpd processes than usual? It may be a weak DoS attack
     
    wattie, Jul 16, 2008 IP
  3. fantozzi

    fantozzi Member

    Messages:
    42
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #3
    
    top - 18:21:56 up 9 days,  4:54,  1 user,  load average: 6.97, 7.33, 7.92
    Tasks: 210 total,   2 running, 193 sleeping,  15 stopped,   0 zombie
    Cpu(s): 10.3% us,  1.3% sy,  0.0% ni,  0.0% id, 88.4% wa,  0.0% hi,  0.0% si
    Mem:    507736k total,   492396k used,    15340k free,     5820k buffers
    Swap:  1052248k total,   365024k used,   687224k free,   165672k cached
    
      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                                                     
    32230 nobody    15   0 32576  20m 2316 S  6.0  4.2  26:19.11 httpd                                                                                                                                       
     1837 mysql     16   0  132m  25m 3272 S  3.3  5.1 656:53.82 mysqld                                                                                                                                      
     6900 root      16   0  7452 2320 1848 R  0.3  0.5   0:00.61 sshd                                                                                                                                        
    28994 nobody    15   0 20924  11m 1772 D  0.3  2.3   0:00.69 httpd                                                                                                                                       
    30269 nobody    16   0 16284 6344 1272 S  0.3  1.2   0:00.42 httpd                                                                                                                                       
    30378 nobody    15   0 13312 2832 1024 S  0.3  0.6   0:00.02 httpd                                                                                                                                       
    30654 root      16   0  2152 1108  800 R  0.3  0.2   0:00.15 top                                                                                                                                         
        1 root      16   0  1740  456  428 S  0.0  0.1   0:05.61 init                                                                                                                                        
        2 root      34  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/0                                                                                                                                 
        3 root      10  -5     0    0    0 S  0.0  0.0   0:00.97 events/0                                                                                                                                    
    
    Code (markup):
     
    fantozzi, Jul 16, 2008 IP
  4. gate2vn

    gate2vn Peon

    Messages:
    809
    Likes Received:
    33
    Best Answers:
    1
    Trophy Points:
    0
    #4
    can you view httpd status to see what the httpd id 32230 is? I don't usually see a connection keeps such long time
     
    gate2vn, Jul 16, 2008 IP
  5. argothiusz

    argothiusz Well-Known Member

    Messages:
    1,500
    Likes Received:
    79
    Best Answers:
    0
    Trophy Points:
    140
    #5
    I thought your CPU usage is the the percentage of your current load/your total CPU. So if your load average is 7, and let just say you have 4 CPU then the CPU usage should be 180-190% UNLESS you meant Memory Usage.
     
    argothiusz, Jul 16, 2008 IP
  6. fantozzi

    fantozzi Member

    Messages:
    42
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #6
    
       Scoreboard Key:
       "_" Waiting for Connection, "S" Starting up, "R" Reading Request,
       "W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
       "L" Logging, "G" Gracefully finishing, "." Open slot with no current process
    
       Srv   PID   Acc           M CPU     SS     Req    Conn  Child  Slot    Host            VHost                     Request
    ...
       7-2   32230 3/45894/66964 K 1581.87 14     0      6.0  903.09 1328.32 88.230.224.172  www.--domain--.com        GET /favicon.ico HTTP/1.1
    
    
    Code (markup):
     
    fantozzi, Jul 16, 2008 IP
  7. wattie

    wattie Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    you are out of Ram - it's time for upgrade... sorry :)
     
    wattie, Jul 16, 2008 IP
  8. fantozzi

    fantozzi Member

    Messages:
    42
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #8
    Okay, thanks. :)
     
    fantozzi, Jul 16, 2008 IP
  9. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #9
    You could also try a lighter web server - like Lighttpd or LiteSpeed.

    Jay
     
    jayshah, Jul 16, 2008 IP