Low load but page load slow

#1
Hi,

I am using ENT trial, overall it has been great. But i still have some problem.

The load is low about 2 to 3 at peak. But the WaitQ in External Application is high ( about 500 at peak).

It maybe under DOS i a not sure)
Would you mind help me to optimize?


Here is my config:

LiteSpeed API App Definition
PHP_LSAPI_MAX_REQUESTS=800
PHP_LSAPI_CHILDREN=80

Initial Request Timeout (secs) 30
Connection Keepalive Timeout 30
Connection
Max Connections 2000
Max SSL Connections 20
Connection Timeout (secs) 30
Max Keep-Alive Requests 1000
Smart Keep-Alive yes
Server config:
Quad core Xeon 5335 - 2GHz each core
4GB RAM
130GB SCSI
RHEL 5
 

mistwang

LiteSpeed Staff
#2
Are you using LiteSpeed with hosting control panel or LSWS along?

First you need to take care of the DDoS if there is any. Take a look at
http://www.litespeedtech.com/how-tos.html#qa_dos

And you need to increase the "PHP_LSAPI_CHILDREN" and "Max Connection" maybe from 80 to 150. The server load will increase a little bit, but it is OK.

Other than that, you still need to somehow improve the performance the performance of your site, using all kinds of cache if you can. Identify the bottle neck of your site and improve it.
 
#3
I have LSWS with Plesk.

I tried to followed qa_dos already.

I also tried to increase PHP_LSAPI_CHILDREN to even 200. The slot are filled quickly and WaitQ still high. Server load does not goes up much.

Another problem is many of my visitors have same IPs because their provider use NAT for internet. This makes it harder to control non-legit connections
 

mistwang

LiteSpeed Staff
#4
Are you using "PHP suEXEC"? If you are, you need to increase "PHP suEXEC Max Conn".

If you can identify those NAT IPs, you can add them to trusted list at server level access control.
 
#5
Yes, i am using PHP suEXEC. What is the right amount number for suEXEC max conn? I just set it to 50. Is that too high?

The other problem is, the DOSer may be on the same network so they may have the same IP with others legit users.

I am using Trial version on a Quad core server. So does that mean the server running quad core licence for now?
 
Last edited:
#6
Yes, i am using PHP suEXEC. What is the right amount number for suEXEC max conn? I just set it to 50. Is that too high?

The other problem is, the DOSer may be on the same network so they may have the same IP with others legit users.

I am using Trial version on a Quad core server. So does that mean the server running quad core licence for now?

Any idea? how to fix it?
 

mistwang

LiteSpeed Staff
#7
The trial version is a 2-CPU license, for PHP/suEXEC powered web sites, 2-CPU license should work very with on Quad core server.

You raise "suEXEC max conn" to 150 see if it helps.

There is no good solution now if the DoSer share the same IP with other users. You may have to sacrifices those users on that IP. :)

You need to try your best to optimize your PHP/SQL code and MySQL configuration. Uses memcache or other cache if you can.

Are you running a torrent tracker? We have a few clients use LiteSpeed to power torrent trackers, those server are hammered very hard by torrent clients, only LiteSpeed can handle this kind of load well.
 
#8
I dont have any torrent or anything related in my server.

I am using 3.3 now as your suggestion see if it better.

The other things is, even when i try to Raise PHP_LSAPI_CHILDREN = 200, when it come to heavy load, WaitQ become very high while In Use connection reduce then litespeed pass out.

So my guess is that PHP_LSAPI_CHILDREN over 100 is not good and litespeed cant handle it?
 

mistwang

LiteSpeed Staff
#9
PHP_LSAPI_CHILDREN will be overridden by "PHP suEXEC max conn". So, it has no effect together with PHP suEXEC.

You can set "PHP suEXEC Max Conn" to anything less than 500, LiteSpeed can handle it fine, but higher value may not result in higher performance, you can experiment with it to find the best value for your application.
 
Top