Re: Slow speed of tcp connections in a network namespace
From: Eric Dumazet <hidden>
Date: 2012-12-29 20:20:09
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:quoted
On Sat, 2012-12-29 at 19:58 +0100, Eric Dumazet wrote:quoted
Le samedi 29 décembre 2012 à 09:40 -0800, Eric Dumazet a écrit :quoted
Please post your new tcpdump then ;) also post "netstat -s" from root and test ns after your wgetsAlso try following bnx2 patch. It should help GRO / TCP coalesce bnx2 should be the last driver not using skb head_fragI don't have access to the host. I'm going to test your patch tomorrow. Thanks.quoted
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. echo 1 >/proc/irq/*/eth0/../smp_affinity 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 >