Comparison of Apache VS Lighttpd VS Nginx (Ngwsx) static files in Windows

Source: Internet
Author: User
Tags zend server

Operating System: winxp sp3

Cpu: i3 ....

Memory: 4 GB

Let's not talk about it more. Go directly:

Software Versions of each WebServer:

Apache 2.2.16.0 uses the Apache2 that comes with the Zend Server.

Lighttpd 1.4.28, cygwin compiled version.

Nginx 1.0.6, officially released.

Ngwsx, supporting branches in iopc mode, https://github.com/zxy050/ngwsx.

For static file output, save the HTML code on the Sina homepage as a txt file and use AB for stress testing.

Run AB on another Ubuntu Server and perform two tests:

AB-t 10 .......

AB-c 100-n 1000 .......

Take the test results of the three software for horizontal comparison.

Conclusion:

Apache

In-t 10 mode, rps is between 14.8x-15.1x.

In-c 100-n 1000 mode, rps is between 15.0x-15.1x.

It is unfortunate that Apache has enabled Gzip compression output, but the results are still poor.

-T 10, rps between 14.6x-14.8x.

-C 100-n 1000, rps is around 14.7x-14.8x.

Official Nginx version

I don't know why worker_processes> 1 is always unavailable. Once> 1, there will be two nginx.exe systems, one is a daemon process and the other is a worker process. The default four threads are started internally. Gzip compression output is enabled by default.

 

In-t 10 mode, the rps is between 15.9x-16.1x.

In-c 100-n 1000 mode, the rps is between 19.7x-19.9x.

Yes, in high concurrency mode, we can see that Nginx works better, And the CPU of the Worker Process fluctuates between % 3-% 5.

Nginx ngwsx Branch

During the test, I was very interested in my colleagues. I suggest you download this version for a comparative test. Iopc is available everywhere in the Events configuration, and the configuration parameters are somewhat different, others are the same as nginx.

This branch can use worker_processes 4, but does not seem to be ready. After the startup, there is only one ngwsx.exe process, with the default thread 1.

The stress test results are similar to the official Nginx version (slightly lower, with an average of 0.1-0.05, negligible ).

However, in high concurrency mode, the CPU usage is as high as 25%, but it is maintained at 25%. Due to the urgent need to test Lighttpd, I did not pay attention to it, does it allocate computing to the core of 4 CPUs.

Lighttpd cygwin compiled version

I have never hoped that lighttpdwill surpass nginx, because it is quite familiar, after the startup, A lighttpd.exe process with 3 threads.

But there are still some surprises:

 

In-t 10 mode, the rps is between 16.5x-16.7x.

In-c 100-n 1000 mode, the rps is between 19.3x-19.5x.

It can be seen that the performance of lighttpd is better under the-t stress test.

In this test, the default configuration of WebServer is basically used, and some configurations are also optimized. For example, the default value of Apache mpm_winnt is 150, and the number of worker threads after startup is 157, then adjust to 500. The number of threads is 507, but it has no effect on the test, and the usage of memory and CPU does not soar.

During the test, the equivalent stress test was performed on another UbuntuServer testing machine. The version number of ApacheServer was not checked, and the CPU was amd x-Dragon 2.4G and 4-core (it is said that I did not verify it ), 4 GB memory. However, the test results are similar to those of Apache in Windows, with no surprises or disappointment. However, on Linux Server, Nginx and Lighttpd are optimized by parameters, performance improvement will be higher than ApacheServer (this Apache is also the MaxClients of my mpm adjustment), but can it be higher than in Windows? Although this is a seemingly obvious problem (based on experience, it should be better for Linux I/O performance), it is hard to say that it is only known after the actual test.

The model for running PHP on the three servers will be tested tomorrow, but it was in Windows. If time permits, nginx, Lighttpd, and PHP will be statically compiled on the Testing Machine for comparison.

Attached. Otherwise, we will talk about nothing in the vernacular. In Windows, Environment packages for Nginx, Lighttpd, and PHP can be customized.

 

The last figure shows the evil ZendServer, which will be shared with you tomorrow.

From Zeng jiankai's blog

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.