Welcome! Log In Create A New Profile

Advanced

Re: multiple worker processes (problem or normal?)

June 07, 2011 11:30PM
On Wed, Jun 08, 2011 at 11:07:05AM +0800, tegrof wrote:
> i think you could see the key word "[debug]", can't you ? that means it is NOT an error, just a normal case.
> u can configure nginx to use the accept mutex lock.
> these may be the case :
> worker proccess 1:
> 1. try to get accept mutex lock, let's assume it success to get lock, it will add the listen fd to epoll
> 2. epoll_wait with max 500ms timer, then deal with events return from epoll_wait.
> worker proccess 2:
> 1. try to get accept mutex lock, let's assume it does NOT success to get lock, it will NOT add the listen fd to epoll
> 2. epoll_wait with max 500ms timer, then deal with events return from epoll_wait.
>
> accept mutex lock is useful in some system that still have thunder-herd problems, and it is said that linux does NOT have this problem now.

The thunder-herd problem is resolved at least for a case when several
processes or threads wait in accept() syscall like Apache does. Apache
has AcceptMutex for a case when it listens on several ports and has to
use select() on the ports. I'm not sure that this problem is resolved for
select/epoll. You can test in nginx debug mode using

events {
accept_mutex off;
...
}


--
Igor Sysoev

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

multiple worker processes (problem or normal?) Attachments

Zhu Qun-Ying 6821 June 07, 2011 01:50PM

Re: multiple worker processes (problem or normal?)

Igor Sysoev 2612 June 07, 2011 01:54PM

Re: multiple worker processes (problem or normal?)

tegrof 2235 June 07, 2011 11:06PM

Re: multiple worker processes (problem or normal?)

Igor Sysoev 1917 June 07, 2011 11:30PM



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

Online Users

Guests: 96
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready