Webhosts are always looking for ways to serve their sites faster. With a little bit of tweaking and testing, you can get amazing results from Apache, the current leader of the pack. But more often, people are looking for ways to improve the performance of their sites without having to get their hands dirty. For those of you running Apache that is installed along with your Control Panel, LiteSpeed is an alternative you should definitely check out.
LiteSpeed Web Server has superior performance in terms of both raw speed and scalability. Our benchmarks demonstrate that it is more than 6 times faster than Apache. When serving static content, LiteSpeed surpasses well-respected content accelerators including thttpd, boa and TUX. When it comes to dynamic content, LiteSpeed is more than 50% faster in PHP content delivery than Apache with mod_php. — LiteSpeedTech.com
LiteSpeed can act as a drop in replacement for Apache. They have worked hard to make it completely Apache interchangeable, so you won’t have to worry about asking your customers to rework their sites. They probably won’t even notice a difference, except of course when their sites start loading faster! If you find that LiteSpeed does not support some of the features Apache does, you could run Apache on another port, just to handle those pages. They have described the work around on this page
LiteSpeed is currently compatible with all of the popular Control Panels available today, including cPanel, Plesk, DirectAdmin etc. So if you are using one of these control panels, you can find the steps to install LiteSpeed on these servers in their Wiki here.
I decided not to take their word for it and tested it on one of our cPanel servers. I followed the steps here. The installation went smooth and I rebuilt the LiteSpeed PHP binary to match the current one on the server. The LiteSpeed WHM plugin allows for easy switching between Apache and LiteSpeed, so I was able to do a bit of benchmarking. I used “ab” to run requests on a simple phpinfo page, and the results were quite apparent:
With Apache:
Concurrency Level: 150
Time taken for tests: 122.802873 seconds
Complete requests: 5000
Failed requests: 0
Write errors: 0
Total transferred: 217621032 bytes
HTML transferred: 216280000 bytes
Requests per second: 40.72 [#/sec] (mean)
Time per request: 3684.086 [ms] (mean)
Time per request: 24.561 [ms] (mean, across all concurrent requests)
Transfer rate: 1730.58 [Kbytes/sec] received
With LiteSpeed:
Concurrency Level: 150
Time taken for tests: 5.439277 seconds
Complete requests: 5000
Failed requests: 0
Write errors: 0
Total transferred: 192875000 bytes
HTML transferred: 192155000 bytes
Requests per second: 919.24 [#/sec] (mean)
Time per request: 163.178 [ms] (mean)
Time per request: 1.088 [ms] (mean, across all concurrent requests)
Transfer rate: 34628.50 [Kbytes/sec] received
I guess the numbers speak for themselves 🙂
The catch of-course, is that LiteSpeed is not free. Well, the Standard(free) Edition does allow a maximum of 5 virtual hosts in the httpd.conf file(yes, it uses the same httpd.conf you use for Apache), but thats way too low. If you have more than 5 sites you will have to purchase an Enterprise Edition license, either on a leased or owned basis. You can find out more about the differences here. So if slow load times are whats bothering your customers the most, LiteSpeed is definitely the solution for you.
About the Author:
Hamish works as a Senior Software Engineer in Bobcares. He joined Bobcares in July 2004, and is an expert in Control panels and Operating systems used in the Web Hosting industry. He is highly passionate about Linux and is a great evangelist of open-source. When he is not on his xbox, he is an avid movie lover and critic.
0 Comments