mysql query is fast on apache not litespeed ?

Discussion in 'General' started by bhanuprasad1981, Mar 3, 2010.

  1. bhanuprasad1981

    bhanuprasad1981 New Member

    hi something is really puzzling me, i am using litespeed past 1 month , after switching to litespeed with suexec enabled i saw that mysql queries are very slow, i thought it is io issue or something and was planning to upgrade hdd to ssd or other 15k ones, but strange thing happened i had to switch to apache, for some reason ,while server was running on apache i was surprised to see my vbulletin sites are really loading fast :eek: , what may be the issue ?
  2. mistwang

    mistwang LiteSpeed Staff

  3. bhanuprasad1981

    bhanuprasad1981 New Member

  4. mistwang

    mistwang LiteSpeed Staff

    150 is too high, you should try something like 10 or 20 at most for shared hosting server.
    check the number of PHP processes running. Check real time status report see if WaitQ stay at zero at peak hours.
    It is completely between PHP and MySQL, make sure you use the same PHP mysql client library for LiteSpeed and Apache PHP.
  5. bhanuprasad1981

    bhanuprasad1981 New Member

    ok as you said i switched back to litespeed, reduced connections to 30,where can i see how many php process are running ?

    and sir what you mean by "make sure you use the same PHP mysql client library for LiteSpeed and Apache PHP. "
  6. NiteWave

    NiteWave Administrator

    comparing output of phpinfo() under apache and litespeed, check mysql related info, if they are same, then it's sure "you use the same PHP mysql client library for LiteSpeed and Apache PHP".
  7. bhanuprasad1981

    bhanuprasad1981 New Member

    details

    sorry sir can you please cehck ifference , i am nota professional sysadmin :(
    mysql settings in apache :-

    Code:
    MySQL Support	enabled
    Active Persistent Links 	0
    Active Links 	0
    Client API version 	5.0.89
    MYSQL_MODULE_TYPE 	external
    MYSQL_SOCKET 	/var/lib/mysql/mysql.sock
    MYSQL_INCLUDE 	-I/usr/include/mysql
    MYSQL_LIBS 	-L/usr/lib64 -lmysqlclient
    
    Directive	Local Value	Master Value
    mysql.allow_persistent	On	On
    mysql.connect_timeout	60	60
    mysql.default_host	no value	no value
    mysql.default_password	no value	no value
    mysql.default_port	no value	no value
    mysql.default_socket	no value	no value
    mysql.default_user	no value	no value
    mysql.max_links	Unlimited	Unlimited
    mysql.max_persistent	Unlimited	Unlimited
    mysql.trace_mode	Off	Off
    
    mysqli settings in apache

    Code:
    MysqlI Support	enabled
    Client API library version 	5.0.89
    Client API header version 	5.0.89
    MYSQLI_SOCKET 	/var/lib/mysql/mysql.sock
    
    Directive	Local Value	Master Value
    mysqli.default_host	no value	no value
    mysqli.default_port	3306	3306
    mysqli.default_pw	no value	no value
    mysqli.default_socket	no value	no value
    mysqli.default_user	no value	no value
    mysqli.max_links	Unlimited	Unlimited
    mysqli.reconnect	Off	Off
    
    
    mysql settings in litespeed :-

    Code:
    MySQL Support	enabled
    Active Persistent Links 	0
    Active Links 	0
    Client API version 	5.0.89
    MYSQL_MODULE_TYPE 	external
    MYSQL_SOCKET 	/var/lib/mysql/mysql.sock
    MYSQL_INCLUDE 	-I/usr/include/mysql
    MYSQL_LIBS 	-L/usr/lib64 -lmysqlclient
    
    Directive	Local Value	Master Value
    mysql.allow_persistent	On	On
    mysql.connect_timeout	60	60
    mysql.default_host	no value	no value
    mysql.default_password	no value	no value
    mysql.default_port	no value	no value
    mysql.default_socket	no value	no value
    mysql.default_user	no value	no value
    mysql.max_links	Unlimited	Unlimited
    mysql.max_persistent	Unlimited	Unlimited
    mysql.trace_mode	Off	Off
    

    mysqli settings in litespeed :-

    Code:
    MysqlI Support	enabled
    Client API library version 	5.0.89
    Client API header version 	5.0.89
    MYSQLI_SOCKET 	/var/lib/mysql/mysql.sock
    
    Directive	Local Value	Master Value
    mysqli.default_host	no value	no value
    mysqli.default_port	3306	3306
    mysqli.default_pw	no value	no value
    mysqli.default_socket	no value	no value
    mysqli.default_user	no value	no value
    mysqli.max_links	Unlimited	Unlimited
    mysqli.reconnect	Off	Off
    
    
  8. NiteWave

    NiteWave Administrator

    OK for MySQL --- litespeed and apache are matching
    pd -ef or pstree -p
    can see how many lsphp5 processes are running

    you may try eAccelerator to speed up php code execution.

    the main difference of your site may be apache running on mod_php(not suEXEC or mod_suphp) while litespeed running in suEXEX mode?
  9. bhanuprasad1981

    bhanuprasad1981 New Member

    i dont see much difference if i disable suexec in litespeed :(, what may be other possible issues?
  10. NiteWave

    NiteWave Administrator

    disable suEXEC, then build opcode cache, like eAccelerator, should improve a lot for a busy php site.
  11. bhanuprasad1981

    bhanuprasad1981 New Member

    i have xcache , but it is not working in litespeed :(, manual build of php is not working with my requirements, i am using whm plugin option to copy apache modules.
  12. mistwang

    mistwang LiteSpeed Staff

    xcache works with LiteSpeed, if you do not use PHP suEXEC, it is just not friendly with PHP suEXEC.

Share This Page