01-27-2011, 04:20 PM
Join Date: Dec 2004
Location: Brisbane, Australia
Litespeed test.php benchmarks - Part 2 - Apache + Varnish vs Litespeed Cache
Correction: below tests were incorrectly done in that it wasn't actually static test.txt file tests continuance of Part 2 text.txt at http://www.litespeedtech.com/support...ead.php?t=4603 but in fact tested php file test.php.
For Part 2, revisiting test.php for some Apache + Varnish vs Litespeed cache tests. Part 1 tests were at apachebench low requests rate of 1000 where Litespeed cache came out on top with near 2x times Apache + Varnish performance. So for this round will be bumping that up to testing 100,000 and 1 million requests with concurrency levels of 200 to 1000 and 5000.
Both Apache 2.2.3 and Litespeed 4.0.19 are at stock out of the box settings size. Static test.php file used can be found here. ERROR I made a mistake, below tests aren't static test.txt file tests but test.php test as explained here
Only items that have changed are:
header('CurrentTime: '.gmdate('D, d M Y H:i:s', time()).' GMT',true);
echo "time()=" . time() . "<br>";
echo "date()=" . date(DATE_RFC822) ."<br>";
- I have tuned TCP settings to allow better handling of larger connection requests. Settings added to /etc/sysctl.conf can be seen here
- Varnish has been upgraded from 2.1.4 to 2.1.5 and default.vcl has been slightly tuned. default.vcl configuration can be see here (for non-vB test) and here (for vB tests)
- Litespeed cache timeout has been risen from 45 seconds to 300 seconds
RewriteRule test.php - [E=Cache-Control:max-age=300]
- For basic php test.php file apachebench tests both Apache+Varnish and Litespeed Cache had similar cpu usage once Litespeed Cache moved off default settings for max connections and max keep alive connections. Litespeed 4.0.19 Cache memory leak was fixed with updated 4.0.19 downloads so not more excessive disk swapping. Still Litespeed 4.0.19 Cache had slightly higher memory usage than Apache+Varnish but the Litespeed Cache ended up 35% faster than Apache+Varnish combo at 1 million request at 5000 concurrency. While at 100K request at 1000 concurrency, Apache+Varnish was 2.9% faster than Litespeed Cache.
- At 1 million requests and 5,000 concurrency level, Litespeed Cache performance dropped severely compared to Apache+Varnish combo due to disk swapping as it started to eat up alot of memory swapping to disk by as much as 1.57GB with 1GB system tests and swapping to disk by 682MB in 2GB system tests. Litespeed cache would of needed at least 2.8-3GB system memory for the 1 million requests with 5000 concurrency to probably maintain around 20K rps. This was a confirmed Litespeed 4.0.19 Cache memory leak bug which was fixed and re-tested below which eliminated the disk swapping with slight improvement in requests rate. However, Litespeed Cache was bottlenecked by default max connection/max keep alive requests settings and LSPHP5 process limits. Raising those limits pushed Litespeed Cache performance well a head of Apache+Varnish.
Update: Jan 28
Updated table. Ended up with these litespeed settings which pushed out >28k requests per second! Raising the max connection and max keep alive requests limits in litespeed admin console from 2000 to 5000 and 1000 to 5000 resulted in the biggest boost from 13,587 rps to 27,976 rps average. Tuning lsphp5 process limits and children values helped as well to top out at 28,093 rps average. Notice the cpu loads were closer to Apache+Varnish with these tuned changes.
Update: Jan 30
Added Litespeed + Varnish tests results to above table
Last edited by eva2000; 01-29-2011 at 11:20 PM..