From: Andrew Vagin <avagin@parallels•com>
To: Eric Dumazet <eric.dumazet@gmail•com>
Cc: netdev@vger•kernel.org, vvs@parallels•com,
"Michał Mirosław" <mirq-linux@rere•qmqm.pl>
Subject: Re: Slow speed of tcp connections in a network namespace
Date: Sun, 30 Dec 2012 01:07:14 +0400 [thread overview]
Message-ID: <20121229210713.GA4350@paralelels.com> (raw)
In-Reply-To: <1356812407.21409.5116.camel@edumazet-glaptop>
On Sat, Dec 29, 2012 at 12:20:07PM -0800, Eric Dumazet wrote:
> On Sun, 2012-12-30 at 00:08 +0400, Andrew Vagin wrote:
> > On Sat, Dec 29, 2012 at 11:41:02AM -0800, Eric Dumazet wrote:
> > > On Sat, 2012-12-29 at 19:58 +0100, Eric Dumazet wrote:
> > > > Le samedi 29 décembre 2012 à 09:40 -0800, Eric Dumazet a écrit :
> > > >
> > > > >
> > > > > Please post your new tcpdump then ;)
> > > > >
> > > > > also post "netstat -s" from root and test ns after your wgets
> > > >
> > > > Also try following bnx2 patch.
> > > >
> > > > It should help GRO / TCP coalesce
> > > >
> > > > bnx2 should be the last driver not using skb head_frag
> >
> > I don't have access to the host. I'm going to test your patch tomorrow.
> > Thanks.
> >
> > >
> > > And of course, you should make sure all your bnx2 interrupts are handled
> > > by the same cpu.
> > All bnx interrupts are handled on all cpus. They are handled on the same
> > cpu, if a kernel is booted with msi_disable=1.
> >
> > Is it right, that a received window will be less, if packets are not sorted?
> > Looks like a bug.
> >
> > I want to say, that probably it works correctly, if packets are sorted.
> > But I think if packets are not sorted, it should work with the same
> > speed, cpu load and memory consumption may be a bit more.
>
> Without veth, it doesnt really matter that IRQ are spread on multiple
> cpus, because packets are handled in NAPI, and only one cpu runs the
> eth0 NAPI handler at one time.
>
> But as soon as packets are queued (by netif_rx()) for 'later'
> processing, you can have dramatic performance decrease.
>
> Thats why you really should make sure IRQ on your eth0 device
> are handled by a single cpu.
>
> It will help to get better performance in most cases.
I understand this fact, but so big difference looks strange for me.
Default configuration (with the bug):
# cat /proc/interrupts | grep eth0
68: 10187 10188 10187 10023 10190 10185
10187 10019 PCI-MSI-edge eth0
>
> echo 1 >/proc/irq/*/eth0/../smp_affinity
This doesn't help.
I tryed echo 0 > /proc/irq/68/smp_affinity_list. This doesn't help too.
>
> If it doesnt work, you might try instead :
>
> echo 1 >/proc/irq/default_smp_affinity
> <you might need to reload bnx2 module, or ifdown/ifup eth0 >
This helps, and the bug are not reproduced in this case.
# cat /proc/interrupts | grep eth0
68: 60777 0 0 0 0 0
0 0 PCI-MSI-edge eth0
Thanks.
next prev parent reply other threads:[~2012-12-29 21:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-29 9:24 Slow speed of tcp connections in a network namespace Andrew Vagin
2012-12-29 13:53 ` Eric Dumazet
2012-12-29 14:50 ` Andrew Vagin
2012-12-29 17:40 ` Eric Dumazet
2012-12-29 18:29 ` Andrew Vagin
2012-12-29 18:58 ` Eric Dumazet
2012-12-29 19:41 ` Eric Dumazet
2012-12-29 20:08 ` Andrew Vagin
2012-12-29 20:20 ` Eric Dumazet
2012-12-29 21:07 ` Andrew Vagin [this message]
2012-12-29 21:12 ` Eric Dumazet
2012-12-29 21:19 ` Andrew Vagin
2012-12-29 21:15 ` Andrew Vagin
2012-12-29 16:01 ` Michał Mirosław
2012-12-30 2:26 ` [PATCH] veth: extend device features Eric Dumazet
2012-12-30 10:32 ` David Miller
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=20121229210713.GA4350@paralelels.com \
--to=avagin@parallels$(echo .)com \
--cc=eric.dumazet@gmail$(echo .)com \
--cc=mirq-linux@rere$(echo .)qmqm.pl \
--cc=netdev@vger$(echo .)kernel.org \
--cc=vvs@parallels$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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