Welcome! Log In Create A New Profile

Advanced

Re: Very odd epoll_ctl calls in mail proxy

Robert Mueller
November 08, 2011 05:56PM
> It seems you have about 170 listen directives.

Indeed we do! Add together ipv4 + ipv6 + a failover ips + a number of
alternative ports and configurations, and it does add up!

> This is probably caused by accept_mutex. Try
>
> events {
> accept_mutex off;
> ...
> }
>
> Probably it's better to disable accept_mutex by default.

Ah right, makes sense, I've gone and added that.

Not sure if it's an issue, but an alternative would be to create a
separate "accepting" fd, add all the listening fd's to that one, and
only add/remove that fd from the main polling set when you have the
mutex.

That at least should work for epoll, which says:

Q3 Is the epoll file descriptor itself poll/epoll/selectable?
A3 Yes. If an epoll file descriptor has events waiting then it will
indicate as being readable.

Not sure if it's worth it though, given you can just turn off the accept
mutex, and apparently linux no longer has a thundering herd issue:

http://stackoverflow.com/questions/2213779/does-the-thundering-herd-problem-exist-on-linux-anymore

I'd like to see an LKML post about that though...

Rob

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

Very odd epoll_ctl calls in mail proxy

Robert Mueller 1734 November 07, 2011 08:06PM

Re: Very odd epoll_ctl calls in mail proxy

Igor Sysoev 957 November 08, 2011 04:56AM

Re: Very odd epoll_ctl calls in mail proxy

Robert Mueller 561 November 08, 2011 05:56PM

Re: Very odd epoll_ctl calls in mail proxy

Igor Sysoev 810 November 09, 2011 05:48AM

Re: Very odd epoll_ctl calls in mail proxy

Igor Sysoev 915 November 10, 2011 05:36AM



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