Welcome! Log In Create A New Profile

Advanced

Re: [Patch] SO_REUSEPORT support from master process

Sepherosa Ziehau
November 16, 2014 04:08AM
Heh, I never made that patch for Linux and I don't use Linux ;). And
since Linux does not inherit sockets, once SO_REUSEPORT listen socket
is closed you should have seen the strange timeout as you have
described (as I had told you linux missing the socket inheritance
feature). On DFLY, we could max out all CPUs w/o problem and have no
strange timeout or connection drops when doing binary upgrading.

Well, at least your test result suggests for SO_REUSEPORT, different
OSes may need OS-specific implementation eventually to achieve better
performance or keep binary upgrading works. You probably could keep
your patch as Linux specific patch as what we do for the dports.

Best Regards,
sephe


On Fri, Oct 31, 2014 at 6:24 AM, Lu, Yingqi <yingqi.lu@intel.com> wrote:
> Hi All,
>
> We tested the dragonfly approach on Linux (RHEL 6.5 with kernel 3.13.9). We used the same testing environment for both our patch and the dragonfly patch. Here is what we found:
>
> 1. Our patch has 36% better performance (operations/sec) comparing to dragonfly patch.
> 2. Our patch has 53% lower response time comparing to dragonfly approach even at 36% higher throughput level.
> 3. Our patch can scale the CPU utilization and frequency to the max capacity while dragonfly patch cannot.
> 4. Our patch does not have any issues with "upgrade binary on the fly". However, dragonfly patch creates a spike in the response time during the upgrade. It also has lots of connection timeouts/losses with high load.
>
> Above findings are based on Linux OS.
>
> Thanks,
> Yingqi
>
> -----Original Message-----
> From: nginx-devel-bounces@nginx.org [mailto:nginx-devel-bounces@nginx.org] On Behalf Of Lu, Yingqi
> Sent: Wednesday, October 08, 2014 11:24 AM
> To: nginx-devel@nginx.org
> Subject: RE: [Patch] SO_REUSEPORT support from master process
>
> One more comment from me: duplicate listen sockets in kernel is not a trivia thing to do and it may take long time before people can see it. Addressing it Nginx may not be as ideal as in kernel, but at least user can see the performance improvement sooner. In fact, we see up to 48% performance improvement on modern Intel system. Just my two cents.
>
> Again, thanks very much for everyone for helping us review this.
>
> Thanks,
> Yingqi
>
> -----Original Message-----
> From: nginx-devel-bounces@nginx.org [mailto:nginx-devel-bounces@nginx.org] On Behalf Of Lu, Yingqi
> Sent: Wednesday, October 08, 2014 10:05 AM
> To: nginx-devel@nginx.org
> Subject: RE: [Patch] SO_REUSEPORT support from master process
>
> Hi Maxim,
>
> Thanks for letting us know.
>
> Our updated patch is located at http://forum.nginx.org/read.php?29,253446,253446#msg-253446
>
> It supposes to address all the style issues and fixes the restart and binary upgrade issues. This is just a FYI in case you are not aware of.
>
> Thanks,
> Yingqi
>
> -----Original Message-----
> From: nginx-devel-bounces@nginx.org [mailto:nginx-devel-bounces@nginx.org] On Behalf Of Maxim Dounin
> Sent: Wednesday, October 08, 2014 5:59 AM
> To: nginx-devel@nginx.org
> Subject: Re: [Patch] SO_REUSEPORT support from master process
>
> Hello!
>
> On Tue, Oct 07, 2014 at 07:32:08PM +0000, Lu, Yingqi wrote:
>
>> Dear All,
>>
>> It has been quiet for a while on this patch. I am checking to see if
>> there is any questions/feedbacks/concerns we need to address?
>>
>> Please let me know. Thanks very much for your help!
>
> Apart from style/coding issues, I disagree with the whole approach.
>
> As far as I understand the patch idea, it tries to introduce multiple listening sockets to avoid in-kernel lock contention.
> This is something that can be done completely in kernel though, and I see no reason to introduce any changes to nginx here.
>
> The approach previously discussed with Sepherosa Ziehau looks much more interesting.
>
> --
> Maxim Dounin
> http://nginx.org/
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel



--
Tomorrow Will Never Die

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[Patch] SO_REUSEPORT support from master process Attachments

Lu, Yingqi 1449 August 22, 2014 12:56PM

RE: [Patch] SO_REUSEPORT support from master process

Lu, Yingqi 667 August 22, 2014 01:00PM

Re: [Patch] SO_REUSEPORT support from master process

Sepherosa Ziehau 702 August 27, 2014 05:10AM

RE: [Patch] SO_REUSEPORT support from master process

luy 1519 August 27, 2014 12:26PM

Re: [Patch] SO_REUSEPORT support from master process

Sepherosa Ziehau 712 August 28, 2014 05:28AM

RE: [Patch] SO_REUSEPORT support from master process

luy 640 August 27, 2014 01:36PM

RE: [Patch] SO_REUSEPORT support from master process

luy 1496 September 18, 2014 04:08PM

Re: [Patch] SO_REUSEPORT support from master process

Valentin V. Bartenev 590 September 19, 2014 04:38AM

RE: [Patch] SO_REUSEPORT support from master process

luy 663 September 19, 2014 11:54AM

Re: [Patch] SO_REUSEPORT support from master process

Valentin V. Bartenev 603 September 19, 2014 12:50PM

RE: [Patch] SO_REUSEPORT support from master process

luy 694 September 19, 2014 01:34PM

RE: [Patch] SO_REUSEPORT support from master process

luy 601 September 20, 2014 06:24PM

RE: [Patch] SO_REUSEPORT support from master process

luy 597 September 20, 2014 07:02PM

RE: [Patch] SO_REUSEPORT support from master process

luy 701 September 20, 2014 07:46PM

RE: [Patch] SO_REUSEPORT support from master process

luy 607 September 23, 2014 11:38AM

RE: [Patch] SO_REUSEPORT support from master process

luy 656 September 23, 2014 11:48AM

RE: [Patch] SO_REUSEPORT support from master process

luy 713 September 29, 2014 03:46PM

RE: [Patch] SO_REUSEPORT support from master process

luy 609 October 07, 2014 03:34PM

Re: [Patch] SO_REUSEPORT support from master process

Maxim Dounin 634 October 08, 2014 09:00AM

RE: [Patch] SO_REUSEPORT support from master process

luy 596 October 08, 2014 01:08PM

RE: [Patch] SO_REUSEPORT support from master process

luy 585 October 08, 2014 02:26PM

RE: [Patch] SO_REUSEPORT support from master process

luy 571 October 30, 2014 06:26PM

Re: [Patch] SO_REUSEPORT support from master process

Sepherosa Ziehau 641 November 16, 2014 04:08AM

Re: [Patch] SO_REUSEPORT support from master process

Maxim Dounin 836 November 16, 2014 06:52AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 295
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready