lsphp5 high load cpu

Discussion in 'General' started by jazz1611, Oct 1, 2013.

  1. jazz1611

    jazz1611 New Member

    Hi,

    I installed Litespeed Enterprise 1 CPU for my server.

    Load Averages: 4.44 4.25 4.31

    There is top on my server:
    [​IMG]

    How can i make lsphp5 (Lsws) use low cpu?

    Regards,
  2. NiteWave

    NiteWave Administrator

    the "Process Manager" looks interesting, what platform are lsws running on ?

    actually, this is typical on a busy shared hosting server, which mainly run php/mysql applications.

    to reduce the load of php (or lsphp):
    1. install and enable eAccelerator opcode cache;
    2. monitor and identify high CPU usage accounts(like this Process Manager), trace the process, and ask the user to improve the php code, to remove low performance plugin etc ...

    you can show the real-time stat at busy time(high load), see if we can give some suggestion for you.
  3. jazz1611

    jazz1611 New Member

    Hi,

    cPanel (not opcode cache) + Litespeed
    Thank you for support. Can you teamviewer to me? Then you can see real-time my server working. If can, i gived id and password of teamvewer 8 to your inbox.

    Regards,
    Last edited: Oct 1, 2013
  4. NiteWave

    NiteWave Administrator

    please run EasyApache to include eAccelerator(disable XCache), since eAccelerator is suitable for shared hosting environment.

    then build matching php in WHM/litespeed plugin

    after you've done above 2 steps, I can ssh to your server to monitor the load and help tune setting of eAccelerator.
  5. jazz1611

    jazz1611 New Member

    Hi,

    I installed eAccelerator for my server. Can you teamviewer again with password: 3088

    Regards,
  6. NiteWave

    NiteWave Administrator

    Please PM me ssh root access and litespeed admin console's access.

    will notify you what's changed and the reason.
  7. jazz1611

    jazz1611 New Member

    Hi,

    I send information. please check your inbox.

    Regards,
  8. NiteWave

    NiteWave Administrator

    checked, eAccelerator is enabled now. I changed
    eaccelerator.shm_size="16" to
    eaccelerator.shm_size="1"
    and comment out
    zend_extension="/usr/local/Zend/lib/Guard-5.5.0/php-5.3.x/ZendGuardLoader.so"
    in /usr/local/lib/php.ini

    #top -c
    top - 14:44:25 up 1 day, 13:48, 2 users, load average: 4.10, 4.46, 5.04
    Tasks: 317 total, 6 running, 310 sleeping, 0 stopped, 1 zombie
    Cpu(s): 15.9%us, 2.3%sy, 0.0%ni, 75.9%id, 5.7%wa, 0.1%hi, 0.2%si, 0.0%st
    Mem: 7022024k total, 5943692k used, 1078332k free, 417232k buffers
    Swap: 16383992k total, 526148k used, 15857844k free, 2612352k cached

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    9041 phimgcco 20 0 261m 45m 9680 R 28.5 0.7 0:00.88 lsphp5:/home/phimgcco/public_html/index.php
    8870 phimgcco 20 0 235m 25m 9496 S 18.6 0.4 0:05.69 lsphp5
    9019 lxwap 20 0 233m 23m 9472 S 18.6 0.3 0:01.20 lsphp5
    8718 waplxmob 20 0 252m 41m 9396 S 17.2 0.6 0:05.71 lsphp5
    9050 phimgcco 20 0 235m 25m 9468 S 15.9 0.4 0:00.48 lsphp5

    the load is 5+ when I did ssh login, the response was slow from time to time. now the response became faster on command line and load dropped a bit.

    please monitor a bit longer ... the eAccelerator should have done some good for your server.
  9. jazz1611

    jazz1611 New Member

    I see my server still high load. What exactly make high load?
  10. NiteWave

    NiteWave Administrator

    first, the load is not high -- the server has 12 cores(or hyper-threads), load below 12 is normal. if it goes to 20+/30+/.., then load is high.

    2nd, please note "13.9%wa", this is also a factor of high load, and Swap "528784k used", if you have more memory and/or faster disk like SSD, the total load will drop;

    3rd, you have hosted a few busy/active php websites, it's normal the load will become high. if you switch to apache, the load may be more higher.

    4th, should pay more attention to every website's response time than the number of server load. if server load is a bit high, but response fast, it's not a real problem.
  11. jazz1611

    jazz1611 New Member

    Hi,

    12 Core CPUs x 1.0 Ghz (6 Core CPUs x 2.0 Ghz)
    i think company provider set I/O wait low. not high. that is reason make high load.
    anyway, i thank you so much help tune litespeed.

    Regards,
  12. jazz1611

    jazz1611 New Member

    Hi,

    Now my all website load slow. Server load low. Can you check my config litespeed? I think i wrong config then for all sites are loading slow. Help me.

    Regards,
  13. NiteWave

    NiteWave Administrator

    the load drop to from 23+ to 12- now

    when watching with "top -c", iowait keeps high, so finally I decided to disable eAccelerator, since it use disk as opcode storage:/tmp/eaccelerator. looks like it's the main reason to drop the load(not 100% sure though)
    if you have a lot of memory, can use /dev/shm/eaccelerator as opcode storage which actually in memory. you can enable eAccelerator again in this case.

    also I disabled module ZendGuardLoader.so again.

    still there are following .so in php.ini:
    /usr/local/lib>grep extension php.ini
    extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20090626"
    extension="suhosin.so"
    ;;extension="eaccelerator.so"
    zend_extension="/usr/local/IonCube/ioncube_loader_lin_5.3.so"
    extension = "pdo.so"
    extension = "pdo_sqlite.so"
    extension = "sqlite.so"
    extension = "pdo_mysql.so"
    ;zend_extension="/usr/local/Zend/lib/Guard-5.5.0/php-5.3.x/ZendGuardLoader.so"
    extension="ixed.5.3.lin"

    if possible, load .so modules as less as possible in php, this may drop the load as well.

    another change I made:
    Server->External App->lsphp5->Priority:0 ==> 1

    now still can see iowait up to 30% from time to time, but the server's total load is low.
  14. jazz1611

    jazz1611 New Member

    Hi,

    My server have 12vCPU x 1.0Ghz (like as 6 Core x 2.0Ghz). Then what i choose license? 1 CPU or 2, 4 or 8 CPU?

    Regards,
  15. NiteWave

    NiteWave Administrator

  16. jazz1611

    jazz1611 New Member

    Hi,

    My current server response for a long time. but the server load is low, not high.

    And some have error
    I dont know why that.
  17. NiteWave

    NiteWave Administrator

    can you summary the changes you made since I tuned your server last time?
  18. jazz1611

    jazz1611 New Member

    Hi,

    I just disabled EAccelerator, set some value config litespeed. Just that.

    Regards,
  19. NiteWave

    NiteWave Administrator

    the default value has been optimized, usually you needn't change anything unless you've done enough tests on your particular server and pretty sure.

    please memo down what you've changed over the default value, it'll help you much to trouble shoot new issues.

    I took a quick look at lsws admin console setting, 2 default value changed:
    Server->Tuning->
    Connection Timeout (secs): 30 (default is 300)
    Smart Keep-Alive:Yes (default is No)

    most likely "500 Internal Server Error" is related to the above timeout change.
  20. jazz1611

    jazz1611 New Member

    Hi,

    I use http://tools.pingdom.com/fpt/ for check time response of website. I see Wait and Receive take a long time. I dont know why my server take a long time for response or request.

    Regards,

Share This Page