![]() |
Configuring and testing litespeed cache Part 2
Part 1 tests were flawed in that I tested Apache 2.2.3 with keepalives OFF. So this is round 2 tests with Apache 2.2.3 keepalives On thrown into compare with Litespeed 4.0.18 inbuilt caching feature. The Litespeed 4.0.18 cache feature might have a bug in not observing mod rewrite urls to cache only specified files which upgrading to 4.0.19 may fix. I'll update to Litespeed 4.0.19 and rerun tests as well.
Update: Upgraded from Litespeed 4.0.18 to 4.0.19 and fixed the cache feature bug see http://www.litespeedtech.com/support...4&postcount=11 Configurations tested
Results Part 1 tests illustrated a slightly different picture to what these updated tests had showed. The end result though was still the same though, Litespeed + inbuilt cache was up to 2x times faster than Apache + Varnish for simple test.php file apachebench runs.
http://vbtechsupport.com/litespeed/b...21_2011_01.png http://vbtechsupport.com/litespeed/b...21_2011_02.png http://vbtechsupport.com/litespeed/b...21_2011_03.png The test.php file used contains Code:
<?phpCode:
#disk cacheCode:
Enable Cache:Not setCode:
RewriteEngine on:for non-varnish tests: Code:
ab -k -n 1000 -c 200 192.168.56.101/test.phpCode:
ab -k -n 1000 -c 200 192.168.56.101:8888/test.phpCode:
/etc/sysconfig/varnish
References: |
mistwang and NiteWave just a question. In above tests, Litespeed 4.0.18 had smart keep alives enabled. Looking up the function it doesn't mention specifically how it treats php files ?
Quote:
Update: Looks like Litespeed with Smart Keep-Alive OFF (which is default) is better than with it On. http://vbtechsupport.com/litespeed/b..._skaoff_01.png http://vbtechsupport.com/litespeed/b..._skaoff_02.png http://vbtechsupport.com/litespeed/b..._skaoff_03.png http://vbtechsupport.com/litespeed/b..._skaoff_04.png And the interesting results, Apache + Varnish vs Litespeed Cache with Smart Keep Alives On vs Off http://vbtechsupport.com/litespeed/b..._skaoff_05.png http://vbtechsupport.com/litespeed/b..._skaoff_06.png |
smart keepalive will close connection after serving a response with MIME type text/* regardless it is from PHP or static file. So, "Smart Keepalive" should be off when you did the benchmark tests.
|
add environment
LSAPI_ACCEPT_NOTIFY=1 LSAPI_AVOID_FORK=1 to lsphp5 external app should boost Litespeed no-cache results. |
I wonder if you use mod_php or suPHP with Apache?
If uses mod_php, make sure "PHP suEXEC" is off to match Apache security model. |
hmmm you should enable multi-quote feature in vB so i can quote you properly :)
Quote:
Quote:
Quote:
|
Tried these 2 suggested values but getting slower performance as opposed to the defaults as per http://www.litespeedtech.com/php-litespeed-sapi.html
only benched the no cache config http://vbtechsupport.com/litespeed/b..._phptwk_01.png Code:
LSAPI_ACCEPT_NOTIFY=1Quote:
http://vbtechsupport.com/litespeed/b...figuration.png |
I'll upgrade to Litespeed 4.0.19 now to see if can fix the cache options issues. Will also update LSAPI PHP from PHP 5.3.4 to 5.3.5 to match Apache's PHP 5.3.5 version. Seem to have run into an error building PHP 5.3.5 http://www.litespeedtech.com/support...3014#post23014
|
It is about the same, you can also change
"Max connections", "PHP_LSAPI_CHILDREN", to 10 and 100, see which one does better. PHP_LSAPI_MAX_REQUESTS can be increased to a larger number. How many total requests served for each run? I think it should be >1000. There is likely some factor affect the consecutive run of the benchmark tests, there should not be huge differences between them. Maybe the time you wait between each run has impact on this as kernel takes some time to recover from massive amount of sockets created from previous run? I may try to reproduce this in our lab to figure out why if I get a chance. |
How many total requests served for each run, i have the raw ab numbers for latest runs here
i.e for litespeed cached + smart keep alive off Code:
ab -k -n 1000 -c 200 192.168.56.101/test.phpWill try the other php settings once i can fix PHP 5.3.5 build errors http://www.litespeedtech.com/support...3014#post23014 phpize not where it's suppose to be heh. |
| All times are GMT -7. The time now is 05:01 PM. |