Measuring nginx's efficiency

lists at lists at
Thu Jun 29 19:02:40 UTC 2017

Simply to reduce the attack surface, I would not use PHP if all that is served is static pages. 

If you are just serving static pages, you may be able to reduce your verbs to "head" and "get". That is avoid "post." Again attack surface reduction.

I put PHP in a "map" search and it is a favorite hacker target. It may seem like overkill to look for attacks on something I don't use, but all those IP addresses get logged and if a datacenter is used, then I block the entire IP space in the firewall. I call it a preemptive strike. Harmless today doesn't mean harmless forever. 

  Original Message  
From: Lucas Rolff
Sent: Thursday, June 29, 2017 10:44 AM
To: nginx at
Reply To: nginx at
Subject: Re: Measuring nginx's efficiency

If your current apache configuration serves static files via the php engine, then you're doing something very wrong.

You might or might not see any speed gain depending on your apache configuration, but you should see a big difference in the amount of resources used to serve traffic.
As Valentin mentioned, it's about scalability majority of the time - and that in itself will decrease your costs in hardware or resources that is required to be able to serve your static traffic, and I'm sure whomever you have to prove to, why you should switch from Apache to nginx, would love to see that the cost of running your current setup might decrease to some or to huge extend.

If you run wrk as suggested below, you will get a bunch of useful data that will help you chose whichever software solution is the best to use.

On 29/06/2017, 19.38, "nginx on behalf of ST" <nginx-bounces at on behalf of smntov at> wrote:

>On Thu, 2017-06-29 at 16:16 +0300, Valentin V. Bartenev wrote:
>> On Thursday 29 June 2017 15:32:21 ST wrote:
>> > On Thu, 2017-06-29 at 15:09 +0300, Valentin V. Bartenev wrote:
>> > > On Thursday 29 June 2017 14:00:37 ST wrote:
>> > > > Hello,
>> > > > 
>> > > > with your help I managed to configure nginx and our website now can be
>> > > > accessed both - through apache and nginx.
>> > > > 
>> > > > Now, how can I prove to my boss that nginx is more efficient than apache
>> > > > to switch to it? How do I measure its performance and compare it to that
>> > > > of apache? Which tools would you recommend?
>> > > > 
>> > > > Thank you in advance!
>> > > > 
>> > > 
>> > > I suggest wrk.
>> > > 
>> > >
>> > > 
>> > 
>> > Should I stress our production system with this tool? Our system blocks
>> > users that make to many requests in a given amount of time...
>> > Also, how do I prove that static content is now served faster?
>> > 
>> > Thank you.
>> > 
>> Switching from Apache to nginx usually isn't about speed, but about scalability.
>> It's all about how many users/connections you can serve from the same hardware.
>Shouldn't it be also about speed, at least for static content, that no
>longer needs to be served through php-engine? And thus overall loading
>speed should be higher?
>nginx mailing list
>nginx at
nginx mailing list
nginx at

More information about the nginx mailing list