Because the machine is hard to find, the advantage of the comparison is that the system switching is fast, saving a lot of time. The second is that the hardware difference is close to none, therefore, the results are relatively objective. In addition, you can also look at the system response capabilities under limited hardware conditions. The content of this test is to test the processing capability of IIS and nginx for pure static files. The dynamic processing capability will be known in the next round.
I. hardware environment
This test is performed on a dual-core 64-bit amd athlon5400 + desktop machine with 2 GB memory.
Ii. System Environment
The host system is ubuntu10.04. The virtual machine environment is ubunaul box, and there are two virtual machines with 2 CPUs and 1 GB memory.
Nginx runs on the Ubuntu 10.04 server version, IIS is the 6.0 version, and runs on Windows 2003 r2. Apache and nginx as control groups are on the same virtual machine.
Nginx is the ext4 file system, and IIS6 is in the NTFS file system.
Iii. Test Tools
Apache AB, some may say how it works, but no other stress testing tools have been found. It is fair for all servers to use the same tool, if you think some features of AB may cause test differences or you have better tools, contact me and I will update the test results in time.
Iv. Test Methods
Each server is tested in five rounds. The AB parameters are
- -N 10000-C 200
- -N 50000-C 200
- -N 50000-C 400
- -N 100000-C 400
- -N 100000-C 800
Each round of testing increases the concurrency and the total number of requests, In order to compress the final Capacity of the server.
Before the test, I used apache as the control group result.
V. Test Results
Control group result (APACHE)
1 2 3 4
Request/sec 651.39 634.99 675.26 652.5
Time taken 15.352 15.748 14.787 15.326
Time per request 1.535 1.575 1.479 1.533
Request/sec 522.58 489.75 496.18 493.49
Time taken 95.679 102.094 100.769 101.32
Time per request 1.924 2.042 2.015 2.026
I tested each group four times. I should have taken an average value, but I saved the control group because the results are basically clear at a glance and do not need to be compared with the control group, here we can see that Apache has been defeated in the third round. In fact, I have executed several times in the third round, but it cannot be executed once, so I gave up.
Next is the IIS data
1 2 3 4
Request/sec 2006.2 1731.44 1719.33 1735.58
Time taken 4.98 5.776 5.816 5.762
Time per request 0.498 0.578 0.582 0.576
Request/sec 1971.89 2031.24 1965.61 1928.97
Time taken 25.356 24.615 25.437 25.921
Time per request 0.507 0.492 0.509 0.518
Request/sec 2013.22
Time taken: 24.836
Time per request 0.497
IIS succeeded in the third round, but it failed. In fact, there was a request timeout in the second round, but it was still possible to continue running. The third round was successfully completed, that is, there is data. This time, it will not be able to run any more. From the data point of view, IIS is much faster than Apache, with at least two times of performance improvement. It seems that the progress from iis5 to IIS6 is not small.
Finally, nginx data:
1 2 3 4
Request/sec 2538.52 2403.67 2269.01 2587.13
Time taken 3.939 4.16 4.407 3.865
Time per request 0.394 0.416 0.441 0.387
Request/sec 2609.65 2773.08 2808.05 2854.92
Time taken 19.16 18.031 17.806 17.514
Time per request 0.383 0.361 0.356 0.35
Request/sec 2792.14 2886.61 2832.07 2837.92
Time taken 17.907 17.321 17.655 17.619
Time per request 0.358 0.346 0.353 0.352
Request/sec 2857.75 2880.57 2881.52 2919.46
Time taken 34.993 34.715 34.704 34.253
Time per request 0.35 0.347 0.347 0.343
Request/sec 2733.6
Time taken: 36.582
Time per request 0.366
The successful completion of nginx won't go down until 5th rounds. Please note that the performance of nginx is quite stable for each round of data, and the stability and performance are very good, static file processing capability is improved by an order of magnitude than Apache, and IIS6 is also an absolute overwhelming advantage. Both processing speed and concurrency are the absolute champions of this test.
Next episode notice:
In the next test, we will compare the dynamic processing capabilities of nginx, tornado, IIS6, and ASP. NET. You must never miss out
If you disagree with the test process and results, please leave a message indicating that you do not leave a meaningless reply, such as "comparing static files without significance". We look forward to your wonderful response.