nginx SO_REUSEPORT patch

Sepherosa Ziehau sepherosa at
Thu Aug 29 06:21:21 PDT 2013

Hi all,

The nginx httperf result w/ SO_REUSEPORT: 49852 reqs/s
There are still 35%~40% idle time on each hyperthread (it probably could do
more, however, I can't find more boxes to run httperf on :P).

The nginx httperf result w/o SO_REUSEPORT: 37386 reqs/s

SO_REUSEPORT gives ~33% performance improvement!

One thing needs to note:
The "Send the TERM signal to the new master process. ..." binary upgrade
reverting method as mentioned in:
will cause glitch w/ so_reuseport global option.
However, the "Send the HUP signal to the old master process. ..." binary
upgrade reverting method works smoothly w/ so_reuseport global option.

For folks compile their own nginx,
nginx-1.5.3+ and nginx development branch:
The above patches introduce one global option: so_reuseport [on|off];
It is off by default.
I have talked to jmarino@ about import these patches to dports.

I submitted these patches to nginx one month ago (well, the accepting
progress is slow :).

Best Regards,

Tomorrow Will Never Die
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Users mailing list