From: jamal <hadi@cyberus.ca>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Tom Herbert <therbert@google.com>,
davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH RFC]: soreuseport: Bind multiple sockets to same port
Date: Mon, 19 Apr 2010 08:31:41 -0400 [thread overview]
Message-ID: <1271680301.32453.23.camel@bigi> (raw)
In-Reply-To: <1271662103.16881.7300.camel@edumazet-laptop>
On Mon, 2010-04-19 at 09:28 +0200, Eric Dumazet wrote:
> High perf DNS server on such machine would have 16 threads, and probably
> 64 threads in two years.
if you dont care about x86, 64 SMT threads is already there
yesterday ;->
> I understand you want 16 UDP sockets to avoid lock contention, but
> __udp4_lib_lookup() becomes a nightmare (It may already be ...)
>
> My idea was to add a cpu lookup key.
I like this idea better.
Staring at data i collected over the weekend, I am scratching my head
trying to find some correlation. I see socket flows bouncing around
CPUs other than what RPS directs to. The scheduler seems to have a mind
of its own. What is clear is if i can localize a flow/socket to a single
cpu i get best performance. RPS, when there is enough load, does better
because of this localization (DaveM made this statement earlier
actually).
I was hoping i could do a connect() + sched_setaffinity() and have RPS
direct that flow to me - but alas even RFS still depends on hashing.
Unless there is an easier way to do this, I was planning to look
at the RPS hashing and manually cook flows which end up on a cpu where
I do sched_setaffinity()...
> thread0 would use a new setsockopt() option to bind a socket to a
> virtual cpu0. Then do its normal bind( port=53)
So question: Why not tie to sched_setaffinity? i.e at bind time you
lookup what cpu this socket is affined to?
cheers,
jamal
next prev parent reply other threads:[~2010-04-19 12:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-19 6:33 [PATCH RFC]: soreuseport: Bind multiple sockets to same port Tom Herbert
2010-04-19 7:28 ` Eric Dumazet
2010-04-19 12:31 ` jamal [this message]
2010-04-19 15:38 ` Tom Herbert
2010-04-19 17:16 ` Eric Dumazet
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=1271680301.32453.23.camel@bigi \
--to=hadi@cyberus.ca \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--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