All of lore.kernel.org
 help / color / mirror / Atom feed
From: Flavio Leitner <fbl@redhat.com>
To: Carlos Carvalho <carlos@fisica.ufpr.br>
Cc: "Skidmore, Donald C" <donald.c.skidmore@intel.com>,
	Tom Herbert <therbert@google.com>,
	Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: RSS is not efficient when forwarding (ixgbe)
Date: Wed, 9 Jul 2014 02:22:05 -0300	[thread overview]
Message-ID: <20140709052205.GW2346@t520.home> (raw)
In-Reply-To: <21436.11067.667194.899369@fisica.ufpr.br>

On Tue, Jul 08, 2014 at 02:32:43PM -0300, Carlos Carvalho wrote:
> Flavio Leitner (fbl@redhat.com) wrote on 8 July 2014 14:21:
>  >On Tue, Jul 08, 2014 at 02:09:13PM -0300, Carlos Carvalho wrote:
>  >> Flavio Leitner (fbl@redhat.com) wrote on 7 July 2014 21:28:
>  >>  >On Mon, Jul 07, 2014 at 04:33:24PM +0000, Skidmore, Donald C wrote:
>  >>  >> 
>  >>  >> 
>  >>  >> > 
>  >>  >> > It's a router forwarding traffic from one interface to another, so I guess it's
>  >>  >> > only the kernel. BTW, no firewall.
>  >>  >> > 
>  >>  >> > Flow Director needs to be enabled and I am using defaults.
>  >>  >> 
>  >>  >> Flow Director in ATR mode is on by default for ixgbe.  So like Tom mentioned the driver will create hash buckets for egress packets.  You could try disabling ATR and just use RSS.  Which would probably be the right thing to do any way since Flow Director isn't very useful for routing scenarios.  
>  >>  >
>  >>  >That was it.
>  >> 
>  >> We have a similar setup and similar problem. How do we disable ATR? I
>  >> tried to set ntuple off but this almost zeroed traffic. I also tried
>  >> to change rx-flow-hash but ethtool says it's not possible. The docs
>  >> say that one can disable ATR by setting AtrSampleRate to 0 but this
>  >> parameter doesn't exist in 3.14.10.
>  >> 
>  >> So, how do we disable ATR and keep RSS?
>  > 
>  >Keep in mind that this is actually 2 problems. One is enabling the
>  >NIC to receive the streams in all queues for this scenario (setting
>  >ntuple off and restarting the traffic works for me). The second problem
>  >is having all the queue interrupts spread among the CPUs. That's what
>  >does irqbalance, tuna, etc...
> 
> Spreading the interrupts among the cpus is not the issue for us. The
> problem is that the number of interrupts is *very* different among the
> irq's, so no matter how I distribute them among cores there will
> always be a few that get saturated while 70% of the machine capacity
> remains idle. Your case seems to be the extreme of ours, where all
> the flux goes to a single irq.
> 
> The problem is in how the NIC distributes traffic among the irq's in
> the router. Traffic comes almost only from a single machine and
> spreads through several thousand destinations in the internet. That's
> why I tried to set the receiving hash mode to the destination IP, but
> the NIC or driver refuses. So how do I even out the frequency of irq's?

So you see the traffic going to a few queues only and the rest is
idle, is that correct?  If so, then RSS seems to be working, but
since all the traffic comes from one server and likely one port,
maybe the hash is not good enough to distribute among all queues.
I'd try using software hashing instead of hw hashing to see if it
helps:
# ethtool -K <iface> rxhash off

or using Perfect Filters, but then it depends on the traffic's specifics.

BTW, there was a typo in my previous post, I had to turn on ntuple to
disable ATR.

fbl

  reply	other threads:[~2014-07-09  5:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-03 22:44 RSS is not efficient when forwarding Flavio Leitner
2014-07-04 19:36 ` RSS is not efficient when forwarding (ixgbe) Flavio Leitner
2014-07-05 16:09   ` Tom Herbert
2014-07-07 10:55     ` Flavio Leitner
2014-07-07 16:33       ` Skidmore, Donald C
2014-07-08  0:28         ` Flavio Leitner
2014-07-08 17:09           ` Carlos Carvalho
2014-07-08 17:21             ` Flavio Leitner
2014-07-08 17:32               ` Carlos Carvalho
2014-07-09  5:22                 ` Flavio Leitner [this message]
2014-07-10  0:08                   ` Carlos Carvalho
2014-07-10  1:14                     ` Flavio Leitner
2014-07-11  0:11                       ` Carlos Carvalho
2014-07-11 14:11                         ` Skidmore, Donald C

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=20140709052205.GW2346@t520.home \
    --to=fbl@redhat.com \
    --cc=carlos@fisica.ufpr.br \
    --cc=donald.c.skidmore@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.