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 canby luy - Nginx Development
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 helpingby luy - Nginx Development
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 On Behalf Of Maxim Dounin Sent: Wednesday,by luy - Nginx Development
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! Yingqi -----Original Message----- From: nginx-devel-bounces@nginx.org On Behalf Of Lu, Yingqi Sent: Wednesday, August 27, 2014 10:33 AM To: nginx-devel@nginx.org Subject: RE: SO_REUSEPORT support fromby luy - Nginx Development
Hi All, I just want to check if there are any more feedback on the patch? Is there anything additional we need to provide to help the review process? Thanks, Yingqi -----Original Message----- From: nginx-devel-bounces@nginx.org On Behalf Of Lu, Yingqi Sent: Tuesday, September 23, 2014 8:47 AM To: nginx-devel@nginx.org Subject: RE: SO_REUSEPORT support from master process Forgot to ask in myby luy - Nginx Development
Forgot to ask in my last email: can anyone please help to move the patch from http://forum.nginx.org/read.php?29,253446 to this main thread? Thanks very much for your help! Yingqi -----Original Message----- From: nginx-devel-bounces@nginx.org On Behalf Of Lu, Yingqi Sent: Tuesday, September 23, 2014 8:36 AM To: nginx-devel@nginx.org Subject: RE: SO_REUSEPORT support from master process I amby luy - Nginx Development
I am wondering if there are any more feedback/comments/concerns? Also, does the format look OK to all of you? Thanks, Yingqi -----Original Message----- From: nginx-devel-bounces@nginx.org On Behalf Of Lu, Yingqi Sent: Saturday, September 20, 2014 4:45 PM To: nginx-devel@nginx.org Subject: RE: SO_REUSEPORT support from master process Dear All, I just sent the new patch directly from ToriseHby luy - Nginx Development
Dear All, I just sent the new patch directly from ToriseHg. Thanks again very much to Valentin Bartenev for his valuable feedback! The 2 changes from last version are: 1. We use "total CPU threads" instead of "active CPU threads" to calculate the number of duplicated listeners. 2. We modify some of the code to meet the style requirements listed at http://nginx.org/en/docs/coby luy - Nginx Development
src/core/ngx_connection.c | 21 ++++++++++++++- src/core/ngx_cycle.c | 52 +++++++++++++++++++++++++++++++++---- src/core/ngx_cycle.h | 2 + src/http/ngx_http.c | 64 ++++++++++++++++++++++++---------------------- 4 files changed, 101 insertions(+), 38 deletions(-) # HG changeset patch # User Yingqi Lu <Yingqi.Lu@intel.com> # Date 1411255543 25200 # Sat Sep 20 16:by luy - Nginx Development
Dear All, Here is the newer version of the patch sent from ToriseHg directly. Sorry for the duplications. Please let me know if the format you see is correct and if you can apply the patch without issues. I tested here locally and it works fine. However, I am concerned about the format changes during the email delivery. Please let me know. Thanks very much to Valentin Bartenev for his valuable fby luy - Nginx Development
src/core/ngx_connection.c | 21 ++++++++++++++- src/core/ngx_cycle.c | 52 +++++++++++++++++++++++++++++++++---- src/core/ngx_cycle.h | 2 + src/http/ngx_http.c | 64 ++++++++++++++++++++++++---------------------- 4 files changed, 101 insertions(+), 38 deletions(-) # HG changeset patch # User Yingqi Lu <Yingqi.Lu@intel.com> # Date 1411248953 25200 # Sat Sep 20 14:by luy - Nginx Development
Dear All, After I sent out the patch, I noticed that the patch inserted in the email is actually with different format than the original one generated by TortoiseHg. What I did is just copying it and pasting in the email. Did I missed anything? I guess this is not the correct way to send the patch. I will try to find a way to send directly from ToriseHg. Thanks, Yingqi -----Original Message---by luy - Nginx Development
Dear All, Here is another updated version of the patch. Thanks very much to Valentin Bartenev for his valuable feedback! Here are the changes in this version: 1. We use "total CPU threads" instead of "active CPU threads" to calculate the number of duplicated listeners. 2. We modify some of the code to meet the style requirements listed at http://nginx.org/en/docs/contributinby luy - Nginx Development
Hi Valentin, I just tested the exact case you mentioned and you are right! There is a connection drop, but it got recovered really quickly. The new connections will only go to the remaining listen sockets on a round robin fashion after the reload. I will change the check of "active cpu" to "all cpu". This will make the number of listen sockets a constant as long as the systemby luy - Nginx Development
Hi Valentin, Thanks very much for your email. Regarding to your first question, I did following test: 1. Start Nginx 2. Offline half of the CPU threads by "echo 0 > /sys/devices/system/cpu/"cpu#"/online 3. Reload Nginx and check the worker process, the number of listen sockets is actually reduced to half. 4. Then, I put back the offlined CPU threads back online, and reload theby luy - Nginx Development
Dear All, Here is the updated patch for SO_REUSEPORT support enablement on Linux OS (attached below). The changes in this version are: 1. Solve the issue with "binary upgrade on the fly" feature. Thanks to Sepherosa Ziehau for his feedback! With this version of patch, there is no issue or connection loss during the binary upgrade. I tested on RHEL 6.5 (with kernel 3.13.9) and CentOS 7.by luy - Nginx Development
Dear All, I am resending this patch with plain text instead of HTML format. I will also post the patch at the end of this email. Hope this will be easier for all of you to review. Please let me know if you have trouble viewing the message or the patch itself. This is our first time submitting the patch here. Your feedback and suggestions are highly appreciated. The "SO_REUSEPORT support forby luy - Nginx Development
Thanks very much for your suggestion. I will repost. Thanks, Yingqi -----Original Message----- From: nginx-devel-bounces@nginx.org On Behalf Of Maxim Dounin Sent: Wednesday, August 27, 2014 9:51 AM To: nginx-devel@nginx.org Subject: Re: submitting patch Hello! On Wed, Aug 27, 2014 at 04:30:58PM +0000, Lu, Yingqi wrote: > Dear All, > > I have a general question regarding to patch suby luy - Nginx Development
Dear All, I have a general question regarding to patch submission. Last Friday, I submitted a patch to nginx-devel@nginx.org<mailto:nginx-devel@nginx.org> with the patch as an attachment ( SO_REUSEPORT support from master process). Later, I found the email itself is listed at http://forum.nginx.org/read.php?29,252762,252762#msg-252762. However, I do not see the patch attachment any more.by luy - Nginx Development
Hi Sephe, Thanks for your email. The main difference between your patch and this prototype is that we create certain number of duplicated listen sockets in the master process instead of child processes. All the child processes have access to the same set of the duplicated listen sockets. In this case, all the child processes are the same, there is no special child needed. I think this addresby luy - Nginx Development