SO_REUSEPORT: strange kernel balancer behaviour
Adrian Chadd
adrian at freebsd.org
Tue Jul 23 14:39:42 UTC 2013
On 23 July 2013 00:09, trafdev <trafdev at mail.ru> wrote:
> It's like shared acceptor FD and N processes:
[snip] looks like mine, but I use threads.
> Accept conn callback is called in N processes on each connection, only one
> wins,
> others exit by errno == EAGAIN case. Overhead is almost zero.
> Problem is that "wins" distribution is far from equal.
Right. I'm not at that stage yet, but I can totally see that happening.
Ok. Time to hit up the TCP stack people to weigh in on the recent lkml
posts about this:
http://lwn.net/Articles/542629/
With SO_REUSEPORT, we should create one listen FD per thread, and let
the OS balance how that gets distributed. Rather than one listen
socket that is shared between all processes/threads. I'll try that
locally and see if that works right. Would you mind trying it locally
and see if it improves the distribution of work?
Thanks,
-adrian
More information about the freebsd-net
mailing list