Thread (12 messages) flat view 12 messages, 5 authors, 2008-08-15

Re: [Bugme-new] [Bug 11316] New: severe performance regression for iptables nat routing

From: Patrick McHardy <hidden>
Date: 2008-08-14 11:04:28

Possibly related (same subject, not in this thread)

David Miller wrote:
From: Alex Williamson <redacted>
Date: Wed, 13 Aug 2008 20:08:20 -0600
quoted
git bisect traced the problem back to this changeset:

        commit e5a4a72d4f88f4389e9340d383ca67031d1b8536
        Author: Lennert Buytenhek [off-list ref]
        Date:   Sun Aug 3 01:23:10 2008 -0700
        
            net: use software GSO for SG+CSUM capable netdevices

I've verified that I can toggle the slowness by reverting this patch on
top of 8d0968ab (current head).  The problem is readily reproducible
using Ubuntu Hardy in a KVM VM with upstream, defconfig kernel.
Patrick I wonder if there a case where iptables NAT will COW the packet
when it really doesn't need to.
I don't think so, its using skb_make_writable everywhere, which checks
for skb_clone_writable, which should usually avoid COWing local TCP
packets. It would also be unlikely to have that much of a performance
impact (1MB/s -> 34kb/s).
It seems, if anything, using GSO should make things go a little bit
faster not slower... Hmmm...
Alex, could you post a tcpdump from both loopback and the outgoing
device from the machine you're doing NAT on?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help