High CPU load with Litespeed 4.0.3

Discussion in 'General' started by lamnk, May 18, 2009.

  1. lamnk

    lamnk New Member

    After an update to Litespeed 4.0.3 and a server reboot (kernel update) the CPU load is occasionally stay at 100% for no reason making the server unresponsive. Before the reboot everything was fine, load stayed from 0.xx to 1.xx

    Does anyone have the same problem ?

    Server's info: CentOS 5.3, kernel 2.6.18, php 5.2.8, mysql 5.0.45

    Here is my top output:
    Code:
    top - 14:03:46 up 3 days,  2:16,  1 user,  load average: 7.28, 6.96, 6.94
    Tasks:  30 total,   5 running,  25 sleeping,   0 stopped,   0 zombie
    Cpu(s): 79.3%us, 20.7%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
    Mem:   2097152k total,   357172k used,  1739980k free,        0k buffers
    Swap:        0k total,        0k used,        0k free,        0k cached
    
      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                       
    30096 lamnk     16   0  112m  34m 6460 R 22.8  1.7   8:26.36 lsphp                                                                                                          
    14119 lamnk     16   0  106m  27m 6572 R 22.2  1.4   8:56.85 lsphp                                                                                                          
    12047 lamnk     16   0  111m  33m 6440 R 21.5  1.6   9:11.53 lsphp                                                                                                          
    11313 mysql     15   0  241m  28m 5136 S 15.2  1.4   6:21.12 mysqld                                                                                                         
    21583 lamnk     16   0  115m  37m 6600 S 10.9  1.8  12:01.96 lsphp                                                                                                          
    28207 lamnk     16   0  111m  32m 6432 S  6.0  1.6   5:10.75 lsphp                                                                                                          
    13396 nobody    15   0  9768 6556 1388 S  1.0  0.3  14:02.02 lshttpd                                                                                                        
     7197 lamnk     15   0 21140 2932  740 R  0.3  0.1   0:15.26 screen                                                                                                         
        1 root      15   0 10348  724  604 S  0.0  0.0   0:29.24 init                                                                                                           
     1334 lamnk     15   0 84772 3464 1648 S  0.0  0.2   0:00.62 zsh                                                                                                            
     3682 lamnk     15   0 90880  11m 5764 S  0.0  0.6   0:00.40 lsphp                                                                                                          
     5166 lamnk     15   0  102m  25m 5768 S  0.0  1.2   0:00.28 lsphp                                                                                                          
     5221 lamnk     15   0 12608 1188  924 R  0.0  0.1   0:00.01 top                                                                                                            
     7198 lamnk     15   0 84120 2776 1596 S  0.0  0.1   0:00.06 zsh                                                                                                                                                                                                                   
     7415 lamnk     15   0 84204 2876 1596 S  0.0  0.1   0:00.12 zsh                                                                                                            
    10107 root      15   0 86020 3252 2544 S  0.0  0.2   0:00.02 sshd                                                                                                           
    10231 root      22   0 63812 1300 1076 S  0.0  0.1   0:00.01 mysqld_safe                                                                                                    
    11346 lamnk     15   0 86160 1816 1100 S  0.0  0.1   0:00.08 sshd                                                                                                           
    11366 lamnk     18   0 83796 2376 1480 S  0.0  0.1   0:00.04 zsh                                                                                                            
    11840 lamnk     18   0 74464 1164  892 S  0.0  0.1   0:00.00 screen                                                                                                         
    13388 root      15   0  5364 1940 1248 S  0.0  0.1   0:40.88 lshttpd                                                                                                        
    19753 lamnk     15   0 85564 4332 1668 S  0.0  0.2   0:01.39 zsh                                                                                                            
    28002 root      15   0  1588  328  272 S  0.0  0.0   0:00.11 httpd                                                                                                          
    28057 root      15   0  5908  636  516 S  0.0  0.0   0:00.98 syslogd                                                                                                        
    28060 root      25   0  3800  424  340 S  0.0  0.0   0:00.00 klogd                                                                                                          
    28100 root      15   0 60672 1184  632 S  0.0  0.1   0:00.02 sshd                                                                                                           
    28194 root      18   0 19704 1132  564 S  0.0  0.1   0:02.15 crond                                                                                                          
    28211 root      18   0 71808 8796 1528 S  0.0  0.4   0:09.47 miniserv.pl
  2. mistwang

    mistwang LiteSpeed Staff

    You can "strace" the lsphp process keep using a lot of CPU cycles.

    strace -tt -T -p <pid_of_lsphp>
  3. lamnk

    lamnk New Member

    Thanks, i ran the command, but i don't read its outputs, they read me ...

    Anyway i installed APC cache for PHP, and the situation is now improved a bit. Look like APC trades off some memory for CPU time.

    The problem seemed to be authentic load caused by badly programmed wordpress and its plugins. But i'm not really sure about that.

Share This Page