Re: [Exim] Multiple exim processes accept()ing connections?

Top Page
Delete this message
Reply to this message
Author: Gary Palmer
Date:  
To: Philip Hazel
CC: michael, exim-users
Subject: Re: [Exim] Multiple exim processes accept()ing connections?
Philip Hazel wrote in message ID
<Pine.SOL.4.21.0010310819450.4380-100000@???>:
> On 30 Oct 2000 michael@??? wrote:


> > did anybody ever try multiple exim processes that accept() connections
> > from the same socket?


> AFAIK, this is not possible. How would the operating system's TCP/IP
> stack know which process to hand an incoming call to?


It wakes all processes that are actively select()ing on that socket.
The first process to be scheduled by the scheduler is the one that
gets the connection(s), and the rest have to wake up and get nothing
returned from accept and have to go back to sleep. This tends to
create a "thundering herd" problem, and unless properly managed can
lead to reduced performance. The only systems that I've seen it used
for are ones which pre-fork a number of long-lived processes to handle
requests (i.e. apache).

Given exim's model of doing a fork quickly after the accept(), there
shouldn't be a bottleneck in there. If there is, I haven't run into
it, and the systems I run handle multiple millions of messages a day.