| Web Server Performance Comparison: LiteSpeed 1.1 VS |
|
|
The performance of Apache,
TUX, LiteSpeed Standard
Edition and LiteSpeed Professional Edition
are compared in this benchmark test. Apache is the most widely used web server.
TUX is RedHat's Content Accelerator that run inside the Linux kernel. TUX can
serve static content very efficiently from within the Linux kernel, but has
to forward requests for dynamic content to user-space modules or regular user-space
web server daemons. TUX is widely used for static content in web server hardware
performance tests. ConfigurationServer machine is a 750MHz Duron with 128MB RAM,13GB 5400RPM hard drive running
RedHat Linux 7.3. Client machine is a dual Athlon MP 2000+ with 1GB RAM, 40GB
7200PRM hard drive running RedHat Linux 8.0. The network connection is switched
100Mbps Ethernet. In all test cases, 10000 requests were sent sequentially with different concurrency levels and Keep-Alive on or off. Apache is freshly built from the source code without any changes. Without increasing the limit in the header file, Apache only supports 256 concurrent connections by default, so the maximum concurrent level of 200 is measured for Apache. Server Software
Results Requests per second are the results used in the table. Higher is better. Small Static File Test When Keep-Alive is turned off:
* We believe that Apache's severe performance degradation at a concurrency level of 200 is due to a server socket backlog queue overflow. When Keep-Alive is turned on ( AB with '-k' option ):
.htaccess performance This test is used to measure the cost of the per-directory access control file
(.htaccess). A simple .htaccess file is placed under the document root directory,
inside .htaccess, a simple access control rule is specified. Allow Override
is set to "None" for root directory "/", set to "All"
for Apache's document root, (Apache's performance tip is applied ;-).
When .htaccess is enabled, Apache's performance degrades over 20%, while LiteSpeed's performance loss is negligible. The reason is Apache reads or tries to read the access control file for every request which is extremely inefficient, the deeper directory hierarchy the file located, the worse Apache's performance becomes. LiteSpeed is able to cache them efficiently. When .htaccess is enabled, LiteSpeed's performance is up-to 9 times better than Apache's!!! Throttling performance This test is used to measure the cost of throttling, throttle limit is set to a little bit higher than real network bandwidth used in previous tests, all requests are checked but not limited. Keep-Alive is turned on ( AB with '-k' option ), concurrency level is 100:
LiteSpeed web server can throttle network bandwidth very efficiently, the performance loss is well within 1%. PHP performance A simple PHP script, helloworld.php, is used for this test. This test is intended to reveal the best requests per second result for a PHP script. Concurrency level 10 is used for this test as it gives the best results for all servers.
SSL performance Fixed SSL cipher "RC4_SHA" is used in this test. As httperf always sets Keep-Alive to on, the requests-per-connection is set to 1 to simulate Non Keep-Alive requests. The best result for Non Keep-Alive is:
When Keep-Alive is turned on:
ConclusionLiteSpeed web server shows higher performance in all tests when compared to Apache 2.0. LiteSpeed web server is 2 to 5 times faster for static content, 50% faster for PHP script execution and up to 5 times faster for static content over SSL connections. LiteSpeed Professional Edition has roughly twice the performance of Standard Edition. Comparing to TUX, LiteSpeed Professional Edition has similar performance for
static content when keep-alive is turned on. TUX has some edge over LiteSpeed
when keep-alive is off, it is mainly because TUX's smaller code size, in-kernel
shortcuts and simple feature set. We swapped the Duron 750 CPU with an Athlon XP 1600+ and repeated the static file test. We have to use a smaller file with a length of 100 bytes in order not to saturate the 100Mbps LAN. When Keep-Alive is turned off:
When Keep-Alive is turned on ( AB with '-k' option ):
With larger on-chip cache, LiteSpeed Professional will outperform TUX with keep-alive and a high concurrency level. When keep-alive is off, performance differences are about 10%. Both Standard and Professional Editions do not use any fancy system APIs to take advantage of modern operating systems, like zero-copy or high performance IO events dispatching, they are heavily optimized in the user-space and do produce some impressive numbers. However, if you want the fastest web server for your hardware, please keep an eye on our upcoming Enterprise Edition. If you are interested in testing performance on your own machine, please see How to run web server performance testing?
|