Skip to contentSkip to conversation

Extremely slow network with e1000 & ip_conntrack

DISCUSSION Stephen Lee 3 participants 6 messages Nov 26, 2003 – Dec 3, 2003 netfilter

lore
Share & tools
lore
#0 lore raw
Quoted 8 lines · Harald Welte
Quoted 3 lines · Olivier

it seems I have the same problem as reported by other people. But I was wondering if the problem is fixed, and if there is a patch available for testing?

unfortunately there is no fix yet. I seem to be unable to reproduce that effect on my system :(

I'm having the same problem with 2.6.0-test10. Just loading ip_conntrack (no rule in table) slows outbound speed to a crawl. I am using e1000 as well (tried both with or without NAPI), on a 1000/MT Desktop Adaptor.

This seems to only affect traffic out of the host itself, I do not notice slow-down of traffic route through the box, but I didn't really stress test that.

FWIW, I was on 2.5.72 and it had the same behaviour, but ip_conntrack was not compiled as a module so I couldn't check if it is at fault.

Stephen

#1 lore raw
Quoted 10 lines · Stephen Lee
Quoted 3 lines · Harald Welte

unfortunately there is no fix yet. I seem to be unable to reproduce that effect on my system :(

I'm having the same problem with 2.6.0-test10. Just loading ip_conntrack (no rule in table) slows outbound speed to a crawl. I am using e1000 as well (tried both with or without NAPI), on a 1000/MT Desktop Adaptor.

Quoted 6 lines

This seems to only affect traffic out of the host itself, I do not notice slow-down of traffic route through the box, but I didn't really stress test that.

FWIW, I was on 2.5.72 and it had the same behaviour, but ip_conntrack was not compiled as a module so I couldn't check if it is at fault.

I compiled lots of kernels :-( and narrowed it down to between 2.5.26 and 2.5.46. 2.5.26 oopses if I load certain progs like apache, but at least ftp does not slow down in either direction. 2.5.46 has the same problem as 2.6.0-test10 (and -test11, I tested that too).

Moreover, I borrowed an i865 chipset machine (which was running the Fedora kernel) with CSA LAN that uses a different Intel chip (82547EI), but the same e1000 driver, and it doesn't exhibit the problem with 2.6.0-test11. I plugged a Pro1000/MT Desktop Adapter (82540EM chip) into that i865 machine, and it DOES exhibit the problem.

To put it more clearly,

Kernel version Chip Problem?
2.4.22 82540EM N
2.5.26 82540EM N
2.5.46 82540EM Y
2.6.0-test10 82540EM Y
2.6.0-test11 82540EM Y
2.6.0-test11 82547EI N
2.4.22nptlsmp 82547EI N

I'll keep on trying to isolate the problem, but need to get some sleep first :-) Please suggest which patch you think would have caused the problem. I was going by the ChangeLogs but not every kernel version compiled cleanly. Your suggestions would cut down the number of kernels to compile.

Regards,
Stephen

#2 lore raw
Quoted 4 lines · Stephen Lee

I compiled lots of kernels :-( and narrowed it down to between 2.5.26 and 2.5.46.

Quoted 8 lines

Kernel version Chip Problem?
2.4.22 82540EM N
2.5.26 82540EM N
2.5.46 82540EM Y
2.6.0-test10 82540EM Y
2.6.0-test11 82540EM Y
2.6.0-test11 82547EI N
2.4.22nptlsmp 82547EI N

I narrowed it down to patch-2.5.44. e1000 is updated, but I backed out the driver to the 2.5.43 version and it didn't fix the problem. Besides, 2.4.23 has a newer version of the driver and it doesn't have this problem.

As far as I see netfilter was not updated in that patch, was it? I tried insmod -f ip_conntrack.o from 2.5.43 into the 2.5.44 kernel and it didn't stop the problem from happening, either.

Please advice. If you don't think this is a netfilter problem I'll go check with linux-kernel.

Regards,
Stephen

#3 lore raw
Quoted 19 lines · Stephen Lee
Quoted 4 lines · Stephen Lee

I compiled lots of kernels :-( and narrowed it down to between 2.5.26 and 2.5.46.

Quoted 8 lines

Kernel version Chip Problem?
2.4.22 82540EM N
2.5.26 82540EM N
2.5.46 82540EM Y
2.6.0-test10 82540EM Y
2.6.0-test11 82540EM Y
2.6.0-test11 82547EI N
2.4.22nptlsmp 82547EI N

I narrowed it down to patch-2.5.44. e1000 is updated, but I backed out the driver to the 2.5.43 version and it didn't fix the problem. Besides, 2.4.23 has a newer version of the driver and it doesn't have this problem.

Quoted 6 lines

As far as I see netfilter was not updated in that patch, was it? I tried insmod -f ip_conntrack.o from 2.5.43 into the 2.5.44 kernel and it didn't stop the problem from happening, either.

Please advice. If you don't think this is a netfilter problem I'll go check with linux-kernel.

Well, the problem is certainly triggered by connection tracking.

If I understood correctly:

1) stock 2.5.43: OK
2) stock 2.5.44: PROBLEM
3) stock 2.5.44 with the driver from 2.5.43: PROBLEM
4) stock 2.5.44 with ip_conntrack.o from 2.5.43: PROBLEM

So it has to be a change outside of the e1000 driver and outside of the connection tracking code.

Unfortunately I don't have a 2.5.44.patch right here on my notebook atm (travelling to India). I'll download it at the next opportunity and try to review which change could be the culprit.

In the meantime, I think taking the discussion back to lkml seems to be a good idea - since neither e1000 nor ip_conntrack code seem to be the direct cause of the problem.

Quoted 2 lines

Regards,
Stephen

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie
#4 lore raw
Quoted 2 lines · Harald Welte

Well, the problem is certainly triggered by connection tracking.

Thanks for the reply, and for forwarding to lkml.

To recap for lkml (I do not subscribe to lkml, so please CC either me or netfilter-devel):

e1000 becomes extremely slow for traffic generated from the box. I tested by issuing an ftp from another box and doing a "get", but other kind of traffic (scp, samba) are similarly affected. The speed drops to ~40kbps. This happens when ip_conntrack is loaded, even with no rule in the tables. Unloading the module makes the speed recover, but I'd like to make use of state tracking.

There is no change in the "put" direction. I didn't notice any change in speed of traffic routed through the box, though I did not test that case sufficiently.

This bug does not appear on all chips supported by the driver. Please see previous email for the 2 cases I tested.

Quoted 6 lines

If I understood correctly:

1) stock 2.5.43: OK
2) stock 2.5.44: PROBLEM
3) stock 2.5.44 with the driver from 2.5.43: PROBLEM
4) stock 2.5.44 with ip_conntrack.o from 2.5.43: PROBLEM

Correct. The problem exists still on 2.6.0-test11.

Quoted 6 lines

So it has to be a change outside of the e1000 driver and outside of the connection tracking code.

In the meantime, I think taking the discussion back to lkml seems to be a good idea - since neither e1000 nor ip_conntrack code seem to be the direct cause of the problem.

After lots of trial-and-error, I can make the problem disappear by backing these 4 files out from 2.5.44 to their 2.5.43 versions.

net/ipv4/icmp.c
net/ipv4/ip_output.c
net/ipv4/raw.c
net/ipv4/udp.c

Note that in both cases I needed to #include <linux/netfilter_ipv4.h> rather than <linux/netfilter.h> in net/ipv4/raw.c to get it to compile.

I have attached my .config, though note that I have reproduced the problem on another motherboard also (intel P4 on 865G running 2.6.0-test11).

gcc 3.3.2 was used on the P3 box and 3.2.1 was used on the P4 box.

Regards,
Stephen

#5 lore raw
Quoted 7 lines · On Tue, 02 Dec 2003 20:44:06 +0900 Stephen Lee <[email protected]> wrote:

After lots of trial-and-error, I can make the problem disappear by backing these 4 files out from 2.5.44 to their 2.5.43 versions.

net/ipv4/icmp.c
net/ipv4/ip_output.c
net/ipv4/raw.c
net/ipv4/udp.c

Interesting, but not very. This essentially backs out the whole ipv4 packet sending engine rewrite we did to support IPSEC and UDP sendfile support.

Ie. it's a lot of large interrelated changes. We know now what introduced the problem, but this hasn't really narrowed it down much.