Welcome! Log In Create A New Profile

Advanced

RE: [Patch] SO_REUSEPORT support from master process

luy
September 19, 2014 01:34PM
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 system remain active. Thank you very much for your hint!

I will also check the coding style again and resend the patch.

Thanks,
Yingqi

-----Original Message-----
From: nginx-devel-bounces@nginx.org [mailto:nginx-devel-bounces@nginx.org] On Behalf Of Valentin V. Bartenev
Sent: Friday, September 19, 2014 9:48 AM
To: nginx-devel@nginx.org
Subject: Re: [Patch] SO_REUSEPORT support from master process

On Friday 19 September 2014 15:52:35 Lu, Yingqi wrote:
> 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 the Nginx again.
> 5. The new worker process now has 2X listen sockets as the CPU threads
> doubled since the previous reload.
>
> Every time Nginx reloads, my understanding is it will run Ngx_init_cycle. CPU_num_check is > there. Is above testing the correct way to check if reload works? Please let me know if I > missed anything.
[..]

What happens if you shutdown half of your cpus again, and try to reload nginx under high load?

As I understand right, with your patch it will close half of listen sockets, and all the connections that have been waiting to be accepted on these sockets will be lost.

wbr, Valentin V. Bartenev

_______________________________________________
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
Subject Author Views Posted

[Patch] SO_REUSEPORT support from master process Attachments

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

RE: [Patch] SO_REUSEPORT support from master process

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

Re: [Patch] SO_REUSEPORT support from master process

Sepherosa Ziehau 707 August 27, 2014 05:10AM

RE: [Patch] SO_REUSEPORT support from master process

luy 1522 August 27, 2014 12:26PM

Re: [Patch] SO_REUSEPORT support from master process

Sepherosa Ziehau 717 August 28, 2014 05:28AM

RE: [Patch] SO_REUSEPORT support from master process

luy 644 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 593 September 19, 2014 04:38AM

RE: [Patch] SO_REUSEPORT support from master process

luy 666 September 19, 2014 11:54AM

Re: [Patch] SO_REUSEPORT support from master process

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

RE: [Patch] SO_REUSEPORT support from master process

luy 697 September 19, 2014 01:34PM

RE: [Patch] SO_REUSEPORT support from master process

luy 604 September 20, 2014 06:24PM

RE: [Patch] SO_REUSEPORT support from master process

luy 601 September 20, 2014 07:02PM

RE: [Patch] SO_REUSEPORT support from master process

luy 704 September 20, 2014 07:46PM

RE: [Patch] SO_REUSEPORT support from master process

luy 612 September 23, 2014 11:38AM

RE: [Patch] SO_REUSEPORT support from master process

luy 660 September 23, 2014 11:48AM

RE: [Patch] SO_REUSEPORT support from master process

luy 716 September 29, 2014 03:46PM

RE: [Patch] SO_REUSEPORT support from master process

luy 612 October 07, 2014 03:34PM

Re: [Patch] SO_REUSEPORT support from master process

Maxim Dounin 637 October 08, 2014 09:00AM

RE: [Patch] SO_REUSEPORT support from master process

luy 600 October 08, 2014 01:08PM

RE: [Patch] SO_REUSEPORT support from master process

luy 589 October 08, 2014 02:26PM

RE: [Patch] SO_REUSEPORT support from master process

luy 575 October 30, 2014 06:26PM

Re: [Patch] SO_REUSEPORT support from master process

Sepherosa Ziehau 645 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: 312
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