netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Rapoport <mike.rapoport@ravellosystems.com>
To: Or Gerlitz <ogerlitz@mellanox.com>
Cc: Or Gerlitz <or.gerlitz@gmail.com>,
	Joseph Gasparakis <joseph.gasparakis@intel.com>,
	Pravin B Shelar <pshelar@nicira.com>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	Jerry Chu <hkchu@google.com>, Eric Dumazet <edumazet@google.com>,
	Alexei Starovoitov <ast@plumgrid.com>,
	David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>,
	John Fastabend <john.fastabend@gmail.com>
Subject: Re: vxlan/veth performance issues on net.git + latest kernels
Date: Sun, 8 Dec 2013 16:30:55 +0200	[thread overview]
Message-ID: <20131208143054.GA6984@zed.ravello.local> (raw)
In-Reply-To: <52A46F2A.40101@mellanox.com>

On Sun, Dec 08, 2013 at 03:07:54PM +0200, Or Gerlitz wrote:
> On 08/12/2013 14:43, Mike Rapoport wrote:
> > On Fri, Dec 06, 2013 at 11:30:37AM +0200, Or Gerlitz wrote:
> >>> On 04/12/2013 11:41, Or Gerlitz wrote:
> >> BTW guys, I saw the issues with both bridge/openvswitch configuration
> >> - seems that we might have here somehow large breakage of the system
> >> w.r.t vxlan traffic for rates that go over few Gbs -- so would love to
> >> get feedback of any kind from the people that were involved with vxlan
> >> over the last months/year.
> > I've seen similar problems with vxlan traffic. In our scenario I had two VMs running on the same host and both VMs having the { veth --> bridge --> vlxan --> IP stack --> NIC } chain.
> 
> How the VMs were connected to the veth NICs? what kernel were you using?
> 
> 
> > Running iperf on veth showed rate ~6 times slower than direct NIC <-> NIC. With a hack that forces large gso_size in vxlan's handle_offloads, I've got veth performing only slightly slower than NICs ... The explanation I thought of is that performing the split of the packet as late as possible reduces processing overhead and allows more data to be processed.
> 
> thanks for the tip! few quick clarifications -- so you artificially 
> enlarged the gso_size of the skb? can you provide the line you added here
 
It was something *very* hacky:

static int handle_offloads(struct sk_buff *skb)
{
	if (skb_is_gso(skb)) {
		int err = skb_unclone(skb, GFP_ATOMIC);
		if (unlikely(err))
			return err;
 
		skb_shinfo(skb)->gso_type |= SKB_GSO_UDP_TUNNEL;

		if (skb->len < 64000)
			skb_shinfo(skb)->gso_size = skb->len;
		else
			skb_shinfo(skb)->gso_size = 64000;

	} else if (skb->ip_summed != CHECKSUM_PARTIAL)
		skb->ip_summed = CHECKSUM_NONE;
 
	return 0;
}
 
> also, why enlarging the gso size for skb's cause the actual segmentation 
> to come into play lower in the stack?
> 
> Or.
> 

  reply	other threads:[~2013-12-08 14:31 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-03 15:05 vxlan/veth performance issues on net.git + latest kernels Or Gerlitz
2013-12-03 15:30 ` Eric Dumazet
2013-12-03 19:55   ` Or Gerlitz
2013-12-03 21:11     ` Joseph Gasparakis
2013-12-03 21:09       ` Or Gerlitz
2013-12-03 21:24         ` Eric Dumazet
2013-12-03 21:36           ` Or Gerlitz
2013-12-03 21:50             ` David Miller
2013-12-03 21:55               ` Eric Dumazet
2013-12-03 22:15                 ` Or Gerlitz
2013-12-03 22:22                 ` Or Gerlitz
2013-12-03 22:30                   ` Hannes Frederic Sowa
2013-12-03 22:35                     ` Or Gerlitz
2013-12-03 22:39                       ` Hannes Frederic Sowa
2013-12-03 23:10                 ` Or Gerlitz
2013-12-03 23:30                   ` Or Gerlitz
2013-12-03 23:49                     ` Hannes Frederic Sowa
2013-12-03 23:59                   ` Eric Dumazet
2013-12-04  0:26                     ` Alexei Starovoitov
2013-12-04  0:36                       ` Eric Dumazet
2013-12-04  0:55                         ` Alexei Starovoitov
2013-12-04  1:23                           ` Eric Dumazet
2013-12-04  1:59                             ` Alexei Starovoitov
2013-12-06  9:06                             ` Or Gerlitz
2013-12-06 13:36                               ` Eric Dumazet
2013-12-07 21:20                                 ` Or Gerlitz
2013-12-08 12:09                                 ` Or Gerlitz
2013-12-04  6:39                     ` David Miller
2013-12-04 17:40                       ` Eric Dumazet
2013-12-05 12:45                     ` [PATCH net-next] net: introduce dev_consume_skb_any() Eric Dumazet
2013-12-05 14:13                       ` Hannes Frederic Sowa
2013-12-05 14:45                         ` Eric Dumazet
2013-12-05 15:05                           ` Eric Dumazet
2013-12-05 15:44                             ` Hannes Frederic Sowa
2013-12-05 16:38                               ` Eric Dumazet
2013-12-05 16:54                                 ` Hannes Frederic Sowa
2013-12-06 20:24                       ` David Miller
2013-12-03 23:13         ` vxlan/veth performance issues on net.git + latest kernels Joseph Gasparakis
2013-12-03 23:09           ` Or Gerlitz
2013-12-04  0:35             ` Joseph Gasparakis
2013-12-04  0:34               ` Alexei Starovoitov
2013-12-04  1:29                 ` Joseph Gasparakis
2013-12-04  1:18                   ` Eric Dumazet
2013-12-04  0:44               ` Joseph Gasparakis
2013-12-04  8:35               ` Or Gerlitz
2013-12-04  9:24                 ` Joseph Gasparakis
2013-12-04  9:41                   ` Or Gerlitz
2013-12-04 15:20                     ` Or Gerlitz
     [not found]                     ` <52A197DF.5010806@mellanox.com>
2013-12-06  9:30                       ` Or Gerlitz
2013-12-08 12:43                         ` Mike Rapoport
2013-12-08 13:07                           ` Or Gerlitz
2013-12-08 14:30                             ` Mike Rapoport [this message]
2013-12-08 20:50                               ` Eric Dumazet
2013-12-08 21:36                                 ` Eric Dumazet
2013-12-06 10:30                       ` Joseph Gasparakis
2013-12-07 21:27                         ` Or Gerlitz
2013-12-08 18:08                           ` Joseph Gasparakis
2013-12-08 20:12                             ` Or Gerlitz
2013-12-08 15:21                         ` Or Gerlitz
2013-12-03 17:12 ` Eric Dumazet
2013-12-03 19:50   ` Or Gerlitz
2013-12-03 20:19     ` John Fastabend
2013-12-03 21:12     ` 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=20131208143054.GA6984@zed.ravello.local \
    --to=mike.rapoport@ravellosystems.com \
    --cc=ast@plumgrid.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=hkchu@google.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=john.fastabend@gmail.com \
    --cc=joseph.gasparakis@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=or.gerlitz@gmail.com \
    --cc=pshelar@nicira.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).