[Need Help] Slow after upgrade to LSWS 4.2.2

Discussion in 'Install/Configuration' started by webhostnix, Feb 27, 2013.

  1. webhostnix

    webhostnix New Member

    Hi,

    After upgrading to LSWS 4.2.2, the server is very slow. I have checked phpinfo is also very slow.

    I have tried force reinstall LSWS 4.2.1 but it is still slow.

    php version 5.3.21, mysql 5.1.x

    Please help....

    Thanks
  2. webizen

    webizen New Member

    Are you saying you had 4.2.1 running and it was OK. After 4.2.2 upgrade, php serving becomes slow and even you rollback to 4.2.1, php still slow? Maybe something outside of LSWS hold things up like db or disk.

    run 'top -c' and paste here.
  3. webhostnix

    webhostnix New Member

    Yes.. after back to LSWS 4.2.1.. phpinfo output is very slow loading.. and also all websites are very slow

    here top -c :

    ----------------------------------------

    top - 14:37:17 up 35 days, 4:53, 2 users, load average: 13.39, 12.21, 9.83
    Tasks: 971 total, 11 running, 960 sleeping, 0 stopped, 0 zombie
    Cpu(s): 30.4%us, 3.3%sy, 14.6%ni, 50.9%id, 0.6%wa, 0.0%hi, 0.2%si, 0.0%st
    Mem: 65680976k total, 45236872k used, 20444104k free, 3492380k buffers
    Swap: 6291440k total, 0k used, 6291440k free, 28033896k cached

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    20575 mysql 35 15 13.8g 2.7g 6204 S 511.4 4.3 11:35.99 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var/lib/mysql/bima.webhost
    18529 ajkgileu 20 0 307m 52m 12m R 81.6 0.1 0:30.79 lsphp5:eek:me/ajkgileu/public_html/bookmark/wp-cron.php
    21731 auzrevco 20 0 305m 52m 12m S 56.0 0.1 0:14.72 lsphp5:/auzrevco/public_html/beghiluak.com/index.php
    18999 auzrevco 20 0 306m 53m 12m R 49.5 0.1 0:46.74 lsphp5:/auzrevco/public_html/beghiluak.com/index.php
    22402 weqanpiq 20 0 306m 53m 12m R 44.2 0.1 0:03.88 lsphp5:/home/weqanpiq/public_html/index.php
    22240 auzrevco 20 0 301m 49m 12m S 37.7 0.1 0:06.93 lsphp5
    21548 auzrevco 20 0 301m 49m 12m S 36.0 0.1 0:12.68 lsphp5
    21550 auzrevco 20 0 301m 48m 12m S 35.7 0.1 0:25.79 lsphp5
    22417 edcnegnd 20 0 301m 47m 12m S 35.4 0.1 0:02.51 lsphp5:/home/edcnegnd/public_html/file/index.php
    21281 auzrevco 20 0 301m 48m 12m S 33.7 0.1 0:20.60 lsphp5
    22489 edcnegnd 20 0 298m 43m 12m R 32.1 0.1 0:01.89 lsphp5:/home/edcnegnd/public_html/file/index.php
    22097 edcnegnd 20 0 302m 47m 12m S 28.2 0.1 0:06.21 lsphp5:/home/edcnegnd/public_html/file/index.php
    22561 adorpcom 20 0 383m 34m 11m R 27.8 0.1 0:00.85 lsphp5:home/adorpcom/public_html/grosir/category.php
    17572 autorep1 20 0 320m 66m 12m S 27.5 0.1 0:35.52 lsphp5
    21948 ajkgileu 20 0 298m 42m 12m S 27.5 0.1 0:07.52 lsphp5
    21836 jwvccipy 20 0 310m 56m 12m S 21.0 0.1 0:03.40 lsphp5
    22050 lpxpvsxg 20 0 299m 45m 12m S 20.3 0.1 0:08.27 lsphp5
    21469 auzrevco 20 0 301m 48m 12m S 17.0 0.1 0:17.64 lsphp5
    22057 pdfrepai 20 0 296m 43m 12m S 16.4 0.1 0:04.34 lsphp5:/home/pdfrepai/public_html/index.php
    19707 dsyukkbm 20 0 300m 47m 13m S 15.4 0.1 0:15.33 lsphp5
    21847 vani 20 0 302m 47m 12m S 15.1 0.1 0:01.71 lsphp5
    21927 szjwsrtd 20 0 302m 47m 12m S 15.1 0.1 0:03.21 lsphp5
    16246 bodiwebi 20 0 301m 46m 12m S 14.7 0.1 0:15.12 lsphp5
    21930 vutesmpd 20 0 300m 46m 12m S 14.4 0.1 0:05.63 lsphp5
    19672 dsyukkbm 20 0 309m 55m 13m S 13.8 0.1 0:13.35 lsphp5
    21557 zhlgjirg 20 0 306m 51m 12m S 13.8 0.1 0:01.77 lsphp5
    16194 autorep1 20 0 311m 59m 12m S 13.4 0.1 1:00.65 lsphp5
    22121 zkeixym3 20 0 302m 48m 12m S 12.8 0.1 0:02.17 lsphp5
    22175 dxohbllr 20 0 300m 45m 12m S 12.4 0.1 0:02.73 lsphp5
    22571 bsysgrcz 20 0 314m 60m 11m R 12.1 0.1 0:00.37 lsphp5:/home/bsysgrcz/public_html/index.php
    20887 auto 20 0 327m 75m 12m R 11.5 0.1 0:26.63 lsphp5:/home/auto/public_html/index.php
    15339 nobody 19 -1 317m 157m 18m R 11.1 0.2 0:56.34 litespeed (lshttpd)
    22512 zkeixym3 20 0 300m 45m 12m S 11.1 0.1 0:00.88 lsphp5
    22570 vfrzngcb 20 0 303m 49m 11m S 11.1 0.1 0:00.34 lsphp5:gcb/public_html/HighHeelsShoes.info/index.php
    22563 jwvccipy 20 0 309m 54m 12m S 10.8 0.1 0:00.33 lsphp5:ccipy/public_html/wordsads.com/free/index.php
    20661 zkeixym3 20 0 302m 48m 12m S 10.2 0.1 0:10.45 lsphp5
    15364 jwvccipy 20 0 306m 51m 12m R 9.8 0.1 0:40.59 lsphp5:/home/jwvccipy/public_html/index.php
  4. webizen

    webizen New Member

    also check real-time stats (Admin Console => Actions => Real-Time Stats), see the column of 'EAProc WaitQ'. are they all zero (0) ?
  5. webhostnix

    webhostnix New Member

    yes... all EAProc WaitQ is zero (0)
  6. webizen

    webizen New Member

    If WaitQ is all zero, then php isn't piling up. iow, all php processes complete within the page refresh interval (10 sec by default) and no delay.

    if you feel slow, strace one of the lsphp5 processes (when run phpinfo) and see how much it finish.
  7. webhostnix

    webhostnix New Member

    I run strace 3 times when accessing phpinfo

    root@bima [~]# strace -c -p 18858
    Process 18858 attached - interrupt to quit
    Process 18858 detached
    % time seconds usecs/call calls errors syscall
    ------ ----------- ----------- --------- --------- ----------------
    -nan 0.000000 0 20 read
    -nan 0.000000 0 12 write
    -nan 0.000000 0 41 14 open
    -nan 0.000000 0 30 close
    -nan 0.000000 0 22 stat
    -nan 0.000000 0 44 fstat
    -nan 0.000000 0 12 poll
    -nan 0.000000 0 22 lseek
    -nan 0.000000 0 29 mmap
    -nan 0.000000 0 2 mprotect
    -nan 0.000000 0 27 munmap
    -nan 0.000000 0 3 rt_sigaction
    -nan 0.000000 0 1 rt_sigprocmask
    -nan 0.000000 0 1 ioctl
    -nan 0.000000 0 1 pread
    -nan 0.000000 0 1 pwrite
    -nan 0.000000 0 1 writev
    -nan 0.000000 0 8 5 access
    -nan 0.000000 0 35 1 select
    -nan 0.000000 0 7 setitimer
    -nan 0.000000 0 2 socket
    -nan 0.000000 0 2 connect
    -nan 0.000000 0 1 sendto
    -nan 0.000000 0 1 recvfrom
    -nan 0.000000 0 1 shutdown
    -nan 0.000000 0 4 1 setsockopt
    -nan 0.000000 0 13 fcntl
    -nan 0.000000 0 1 flock
    -nan 0.000000 0 4 getdents
    -nan 0.000000 0 4 getcwd
    -nan 0.000000 0 2 chdir
    -nan 0.000000 0 32 getppid
    ------ ----------- ----------- --------- --------- ----------------
    100.00 0.000000 386 21 total


    root@bima [~]# strace -c -p 22742
    Process 22742 attached - interrupt to quit
    Process 22742 detached
    % time seconds usecs/call calls errors syscall
    ------ ----------- ----------- --------- --------- ----------------
    100.00 0.000029 1 28 19 open
    0.00 0.000000 0 10 read
    0.00 0.000000 0 3 write
    0.00 0.000000 0 10 close
    0.00 0.000000 0 2 stat
    0.00 0.000000 0 11 fstat
    0.00 0.000000 0 1 lstat
    0.00 0.000000 0 4 lseek
    0.00 0.000000 0 11 mmap
    0.00 0.000000 0 2 mprotect
    0.00 0.000000 0 8 munmap
    0.00 0.000000 0 3 rt_sigaction
    0.00 0.000000 0 3 rt_sigprocmask
    0.00 0.000000 0 10 writev
    0.00 0.000000 0 40 1 select
    0.00 0.000000 0 7 setitimer
    0.00 0.000000 0 2 uname
    0.00 0.000000 0 1 fcntl
    0.00 0.000000 0 2 getdents
    0.00 0.000000 0 1 getcwd
    0.00 0.000000 0 2 chdir
    0.00 0.000000 0 1 getuid
    0.00 0.000000 0 35 getppid
    0.00 0.000000 0 1 futex
    ------ ----------- ----------- --------- --------- ----------------
    100.00 0.000029 198 20 total


    root@bima [~]# strace -c -p 25843
    Process 25843 attached - interrupt to quit
    Process 25843 detached
    % time seconds usecs/call calls errors syscall
    ------ ----------- ----------- --------- --------- ----------------
    -nan 0.000000 0 3 read
    -nan 0.000000 0 1 write
    -nan 0.000000 0 2 close
    -nan 0.000000 0 1 rt_sigaction
    -nan 0.000000 0 1 rt_sigprocmask
    -nan 0.000000 0 1 writev
    -nan 0.000000 0 53 1 select
    -nan 0.000000 0 2 setitimer
    -nan 0.000000 0 1 accept
    -nan 0.000000 0 1 fcntl
    -nan 0.000000 0 48 getppid
    ------ ----------- ----------- --------- --------- ----------------
    100.00 0.000000 114 1 total
  8. webizen

    webizen New Member

    These straces show process takes ~0 sec to complete. Not backing up what you experienced.

    If this server is serving traffic, it may be difficult to pick a right lsphp5 process for the testing since many lsphp5 processing running. If that's the case, I would suggest you switch to Apache during the test period and have LSWS run in parallel on a different port (say 2080 when set Apache offset port to 2000). then you can strace lsphp5 process for testing (if it is still slow).

    strace -ttT -p pid
  9. webhostnix

    webhostnix New Member

    yes.. this is very strange..

    After I disable CSF, the server run smoothly again.. page loading is fast.
    Before I upgraded to LSWS 4.2.2, I didn't change anything in CSF

    How to fix this issue ?

Share This Page