High traffic website / high server load

muiruri

Well-Known Member
#1
We have a high traffic website, with about 5+ million hits per day.

What's the most recommended settings / parameters for;

http://www.litespeedtech.com/php-litespeed-sapi.html

Currently we have;

PHP_LSAPI_MAX_REQUESTS=50000
PHP_LSAPI_CHILDREN=50
LSAPI_MAX_IDLE_CHILDREN=60

And also;

Max Connections = 50

MySQL is optimized via my.cnf and using LSWS cache.

The server load is very high and website keeps on hanging.

When we change;

PHP_LSAPI_CHILDREN=200

website works, but server load gets worse.

When we check under our WHM/Cpanel -> Show MySQL Processes

We notice database connections for this site are so many and in sleep mode, then under time column appears to stay there for long.

This started last week therefore believe it's a PHP scripting issue on this site.

However, I'm wondering from the server side what settings above can we use to help database connections not stay open endlessly? And also best figures for parameters above that handle high traffic sites well?

Or is there anyone with high traffic sites? What parameters are you using?
 

mistwang

LiteSpeed Staff
#2
I think you need to work on the MySQL DB side, the bad performance is usually caused by bad SQL query or missing table index in the DB.

When the site is slow, in addition to slow query log, you can check "mysqladmin processlist" output, it will show which query blocks all other requests. Then find a way to optimize those SQL queries.
 

muiruri

Well-Known Member
#3
At LSWS setup, at Server -> Cache -> Cache Storage Settings

The box for "Storage Path" uses a directory entry.

If we wanted to use hard drive space of our second cpanel server (a much faster 15k RPM drive) do we need to find a way to map space on that drive as one of the partitions for the first cpanel server where we have LSWS?
 
Top