From: Rick Jones <rick.jones2@hp.com>
To: Tom Herbert <therbert@google.com>
Cc: Stephen Hemminger <stephen.hemminger@vyatta.com>, netdev@vger.kernel.org
Subject: Re: SO_REUSEPORT?
Date: Thu, 07 Aug 2008 13:14:02 -0700 [thread overview]
Message-ID: <489B578A.9030505@hp.com> (raw)
In-Reply-To: <65634d660808071243yd7de635i7e780f526161b445@mail.gmail.com>
> I'm not sure that's applicable for us since the server application and
> networking will max out all the CPUs on host anyway; one way or
> another we need to dispatch the work of incoming connections to
> threads on different CPUs. If we do this in user space and do all
> accepts in one thread, the CPU of that thread becomes the bottleneck
> (we're accepting about 40,000 connections per second). If we have
> multiple accept threads running on different CPUs, this helps some,
> but the load is spread unevenly across the CPUs and we still can't get
> the highest connection rate. So it seems we're looking for a method
> that distributes the incoming connection load across CPUs pretty
> evenly.
Well, if you _really_ want the load spread, you may need to use a
multiqueue (at least inbound if not also later outbound) interface,
"know" how the NIC will hash and then have N distinct port numbers each
assigned to a LISTEN endpoint. The old song and dance about making an N
CPU system look as much like N single-CPU systems and all that...
Unless there are NICs you can "tell" where to send the interrupts, which
IMO is preferable - I have a preference for the application/scheduler
telling "networking" where to work rather than networking (or the NIC)
telling the scheduler where to run a thread - the archives of either
here or netnews will probalby pull-up stuff were I've talked about
Inbound Packet Scheduling (IPS) vs Thread Optimized Packet Scheduling
(TOPS) and limitations of simplistic address hashing to pick a
queue/processor/whatnot :)
rick jones
next prev parent reply other threads:[~2008-08-07 20:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-07 16:57 SO_REUSEPORT? Tom Herbert
2008-08-07 17:09 ` SO_REUSEPORT? Rémi Denis-Courmont
2008-08-07 17:58 ` SO_REUSEPORT? Tom Herbert
2008-08-07 18:17 ` SO_REUSEPORT? Rick Jones
2008-08-07 19:03 ` SO_REUSEPORT? Stephen Hemminger
2008-08-07 19:43 ` SO_REUSEPORT? Tom Herbert
2008-08-07 20:14 ` Rick Jones [this message]
2008-08-07 23:05 ` SO_REUSEPORT? Tom Herbert
2008-08-07 23:28 ` SO_REUSEPORT? Rick Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=489B578A.9030505@hp.com \
--to=rick.jones2@hp.com \
--cc=netdev@vger.kernel.org \
--cc=stephen.hemminger@vyatta.com \
--cc=therbert@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).