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: David Miller <davem@davemloft.net>
Date: 2008-08-14 22:00:54

Possibly related (same subject, not in this thread)

From: Patrick McHardy <redacted>
Date: Thu, 14 Aug 2008 13:04:25 +0200
David Miller wrote:
quoted
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).
I think he is NAT'ing locally generated traffic, look at the bugzilla
entry.

He has two cases of the same wget transfer, one is direct and another
uses a 127.0.0.1:XXXX URL that does the transfer over an SSH tunnel.
Normally they go roughly at the same rate.

Then he adds iptables NAT entries that redirect the first transfer
case over the SSH tunnel addr/port.  And it is this case that degrades
in performance with the GSO changeset.

So it is locally generated TCP traffic, NAT'd to another port and IP
address (specifically, redirected to 127.0.0.1:8888).

Perhaps the problem has something to do with the fact that as far as
TCP is concerned, the destination device can do SG and CSUM and thus
GSO.  But then iptables NATs this traffic to loopback.  I think that
is what leads to some kind of slowpath.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help