|
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.
Benchmarks include serving small static files, PHP scripts and SSL. The method
used our benchmarks is very simple, so the result may not exactly match real
world performance, but will give some good indication of performance.
Configuration
Server 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.
Client software used are ApacheBench (ab) and
httperf. Httperf is used for the SSL benchmarking,
ApacheBench is used for the other benchmarking tests.
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
- Apache 1.3.28
- Apache 2.0.47
- TUX 2.2 ( package tux-2.2.5-1.rpm )
- LiteSpeed 1.1 Standard Edition
- LiteSpeed 1.1 Professional Edition
Results
Requests per second are the results used in
the table. Higher is better.
Small Static File Test
A small html file with a content length of 285 Bytes is used.
When Keep-Alive is turned off:

| 1 |
750 |
830 |
1419 |
2000 |
2493 |
| 10 |
1160 |
1150 |
1987 |
3683 |
4712 |
| 100 |
1120 |
1145 |
1898 |
3630 |
5098 |
| 200 |
65 |
65 |
1990 |
3717 |
4905 |
| 400 |
- |
- |
1850 |
3620 |
4811 |
| 1000 |
- |
- |
- |
3650 |
4750 |
* 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 ):

| 1 |
2035 |
1803 |
3156 |
4069 |
4114 |
| 10 |
1987 |
1850 |
6185 |
13334 |
15500 |
| 100 |
1950 |
1880 |
5762 |
12334 |
12100 |
| 200 |
1236 |
1200 |
5653 |
11941 |
11305 |
| 400 |
- |
- |
5190 |
10143 |
9533 |
| 1000 |
- |
- |
- |
8500 |
8454 |
.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 ;-).
All test are performed with Keep-Alive turned on ( AB with '-k' option ), concurrency
level of 10.
| .htaccess disabled |
1987 |
1850 |
6185 |
13334 |
| .htaccess enabled |
1415 |
1441 |
5973 |
12884 |
| Performance Loss |
28.8% |
22.1% |
0.34% |
0.34% |
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:
| Non-throttling |
6680 |
12360 |
| Throttling |
6650 |
12245 |
| Performance Loss |
0.45% |
0.93% |
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.
| Non Keep-Alive |
526 |
500 |
680 |
770 |
| Keep-Alive |
734 |
600 |
915 |
955 |
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:

| 1 |
1020 |
1040 |
1715 |
2203 |
| 10 |
929 |
973 |
2201 |
3950 |
| 100 |
650 |
670 |
2765 |
2830 |
| 200 |
488 |
500 |
1470 |
2192 |
| 400 |
- |
- |
1147 |
1530 |
| 1000 |
- |
- |
- |
820 |
Conclusion
LiteSpeed 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.
Our study also shows that processor's on-chip cache size has a bigger impact
to LiteSpeed web server than to TUX. Please see our following test:
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:

| 10 |
6050 |
6800 |
| 100 |
5548 |
6210 |
| 200 |
5513 |
6130 |
| 400 |
5424 |
6072 |
| 1000 |
5400 |
5900 |
When Keep-Alive is turned on ( AB with '-k' option ):

| 10 |
22700 |
24620 |
| 100 |
22410 |
21990 |
| 200 |
20750 |
18900 |
| 400 |
18730 |
17230 |
| 1000 |
14720 |
13440 |
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?
|