3.4.1 and 3.5-rc1 Packet lost at 250Mb/s
Subsystems (3)
W dniu 06.07.2012 12:13, Eric Dumazet napisał(a):
Quoted 43 lines · Nieścierowicz Adam
Quoted 13 lines
Hello, Can I send something that will help determine the cause of the problem? W dniu 08.06.2012 11:41, Eric Dumazet napisał(a):
Quoted 9 lines · Nieścierowicz Adam
Quoted 5 lines
Hello, recently we changed on the router kernel from 2.6.38.1 to 3.4.1 and noticed 30% packet loss when traffic increases up to 250MB / s. Similar is for kernel 3.5-rc1 Here a link to ifstat
http://wklej.org/id/767577/ [1] [2]You should give as much as possible delails on your setup (hardware, software) lspci cat
/proc/cpuinfocat/proc/interruptsifconfig -a tc -s -d qdisc dmesg netstat -sQuoted 9 lines
currently running on 2.6.38.1 and traffic is 100Mb / s lspci:
http://wklej.org/id/769102/ [2]/proc/cpuinfo:
http://wklej.org/id/769104/ [3]/proc/interrupts:
http://wklej.org/id/769106/ [4] ifconfig -a:
http://wklej.org/id/769108/ [5] tc -s -d qdisc:
http://wklej.org/id/769109/ [6] dmesg: here are some logs from iptables netstat -s: http://wklej.org/id/769110/ [7] lsmod:
http://wklej.org/id/769117/ [8]/proc/net/softnet_stat:
http://wklej.org/id/769116/ [9]Same infos of 3.5-rcX kernel would be nice.
What NIC is eth0 ? (dmesg please)
It seems all network traffic on 2.6.38 is handled by a single cpu (cpu0)
(seen in
/proc/interrupts)I suspect that with 3.4 or 3.5 kernels, traffic is handled by many cpus and they hit false sharing and contention.
You probably get better performance doing some affinity tuning :
For example,
eth0 serviced by cpu0
eth2 serviced by cpu1
eth3 serviced by cpu2
eth5 serviced by cpu3
Quoted 3 lines
and so on...
check and/or set
/proc/irq/${NUM}/smp_affinity
hello
I would go back to an earlier thread.
Currently is installed kernel 3.6.0 and symptoms are the same
about configuration:
- affinity on
- lspci: http://wklej.org/id/843156/ [10]
- /proc/cpuinfo: http://wklej.org/id/843158/ [11]
- /proc/interrupts: http://wklej.org/id/843161/ [12]
- ifconfig -a: http://wklej.org/id/843162/ [13]
- tc -s -d qdisc: http://wklej.org/id/843164/ [14]
- dmesg: http://wklej.org/id/843166/ [15]
- lsmod: http://wklej.org/id/843167/ [16]
- /proc/net/softnet_stat: /proc/net/softnet_stat
attach something else?
Thanks
Quoted 76 lines · Nieścierowicz Adam
W dniu 06.07.2012 12:13, Eric Dumazet napisał(a):
Quoted 49 lines · Nieścierowicz Adam
Quoted 16 lines
Hello, Can I send something that will help determine the cause of the
problem? W dniu 08.06.2012 11:41, Eric Dumazet napisał(a):Quoted 11 lines · Nieścierowicz Adam
Quoted 5 lines
Hello, recently we changed on the router kernel from 2.6.38.1 to 3.4.1 and noticed 30% packet loss when traffic increases up to 250MB / s. Similar is for kernel 3.5-rc1 Here a link to ifstat
http://wklej.org/id/767577/ [1] [2]You should give as much as possible delails on your setup (hardware,
software) lspci cat/proc/cpuinfocat/proc/interruptsifconfig -a tc
-s -d qdisc dmesg netstat -sQuoted 10 lines
currently running on 2.6.38.1 and traffic is 100Mb / s lspci:
http://wklej.org/id/769102/ [2]/proc/cpuinfo:
http://wklej.org/id/769104/ [3]/proc/interrupts:
http://wklej.org/id/769106/ [4] ifconfig -a:
http://wklej.org/id/769108/ [5] tc -s -d qdisc:
http://wklej.org/id/769109/ [6] dmesg: here are some logs from iptables
netstat -s: http://wklej.org/id/769110/ [7] lsmod:
http://wklej.org/id/769117/ [8]/proc/net/softnet_stat:
http://wklej.org/id/769116/ [9]Same infos of 3.5-rcX kernel would be nice.
What NIC is eth0 ? (dmesg please)
It seems all network traffic on 2.6.38 is handled by a single cpu (cpu0)
(seen in
/proc/interrupts)I suspect that with 3.4 or 3.5 kernels, traffic is handled by many cpus
and they hit false sharing and contention.You probably get better performance doing some affinity tuning :
For example,
eth0 serviced by cpu0
eth2 serviced by cpu1
eth3 serviced by cpu2
eth5 serviced by cpu3Quoted 3 lines
and so on...
check and/or set
/proc/irq/${NUM}/smp_affinityhello
I would go back to an earlier thread.Currently is installed kernel 3.6.0 and symptoms are the same
about configuration:
- affinity on
- lspci: http://wklej.org/id/843156/ [10]
-
/proc/cpuinfo: http://wklej.org/id/843158/ [11]-
/proc/interrupts: http://wklej.org/id/843161/ [12]- ifconfig -a: http://wklej.org/id/843162/ [13]
- tc -s -d qdisc: http://wklej.org/id/843164/ [14]
- dmesg: http://wklej.org/id/843166/ [15]
Quoted 7 lines
- lsmod: http://wklej.org/id/843167/ [16]
-
/proc/net/softnet_stat:/proc/net/softnet_statattach something else?
Thanks
You should use RPS on eth2/eth3 because they are non multi queue.
Documentation/networking/scaling.txt should give you all the needed info
Quoted 4 lines
You should use RPS on eth2/eth3 because they are non multi queue.
Documentation/networking/scaling.txtshould give you all the needed info
I set processors for rps such as affinity, unfortunately it did not help
---
cat /sys/class/net/eth{2,3,4,5}/queues/rx-0/rps_cpus 0040
0080
0100
0200
---
CPU affinity http://wklej.org/id/843161/
Quoted 9 lines · Nieścierowicz Adam
Quoted 5 lines
You should use RPS on eth2/eth3 because they are non multi queue.
Documentation/networking/scaling.txtshould give you all the needed infoI set processors for rps such as affinity, unfortunately it did not help
Quoted 10 lines
---
cat/sys/class/net/eth{2,3,4,5}/queues/rx-0/rps_cpus0040
0080
0100
0200
---
CPU affinity http://wklej.org/id/843161/
I said eth2 and eth3
And you should use cpu11->cpu15 instead of cpu6->cpu9 since they are in use...
Anyway you dont say where are drops, (ifconfig give us very few drops)
Also your eth0 seems to have a strange balance :
RX interrupts seems to be well balanced on 4 queues :
76: 503 0 169271690 0 0 0 PCI-MSI-edge eth0-rx-0 77: 405 0 0 164532538 0 0 PCI-MSI-edge eth0-rx-1 78: 408 0 0 0 152778723 0 PCI-MSI-edge eth0-rx-2 79: 349 0 0 0 0 155011301 PCI-MSI-edge eth0-rx-3 80: 144 0 443432394 0 0 0 PCI-MSI-edge eth0-tx-0 81: 18 0 0 2043311 0 0 PCI-MSI-edge eth0-tx-1 82: 30 0 0 0 1934537 0 PCI-MSI-edge eth0-tx-2 83: 137 0 0 0 0 1968272 PCI-MSI-edge eth0-tx-3
But TX seems to mostly use queue 0
Packets sent to eth0 are coming from where ?
W dniu 08.10.2012 11:47, Eric Dumazet napisał(a):
Quoted 11 lines · Nieścierowicz Adam
Quoted 7 lines
Quoted 4 lines
You should use RPS on eth2/eth3 because they are non multi queue.
Documentation/networking/scaling.txtshould give you all the needed infoI set processors for rps such as affinity, unfortunately it did not help --- cat
/sys/class/net/eth{2,3,4,5}/queues/rx-0/rps_cpus0040 0080 0100 0200 --- CPU affinity http://wklej.org/id/843161/ [1]I said eth2 and eth3
eth2,eth3 and eth4,eth5 is the same card so I changed them as well, or made a mistake?
Quoted 3 lines
And you should use
cpu11->cpu15instead ofcpu6->cpu9since they are in use...
I read in the file Documentation/networking/scaling.txt
---
if the rps_cpus for each queue are the ones that
share the same memory domain as the interrupting CPU for that queue
---
so i used the same CPU, I misunderstood?
Quoted 1 line
Anyway you dont say where are drops, (ifconfig give us very few drops)
you can see no losses(drop), but a temporary decline in traffic on the interface to 0kb/s
Quoted 14 lines
Also your eth0 seems to have a strange balance :
RX interrupts seems to be well balanced on 4 queues :
76: 503 0 169271690 0 0 0 PCI-MSI-edge eth0-rx-0 77: 405 0 0 164532538 0 0 PCI-MSI-edge eth0-rx-1 78: 408 0 0 0 152778723 0 PCI-MSI-edge eth0-rx-2 79: 349 0 0 0 0 155011301 PCI-MSI-edge eth0-rx-3 80: 144 0 443432394 0 0 0 PCI-MSI-edge eth0-tx-0 81: 18 0 0 2043311 0 0 PCI-MSI-edge eth0-tx-1 82: 30 0 0 0 1934537 0 PCI-MSI-edge eth0-tx-2 83: 137 0 0 0 0 1968272 PCI-MSI-edge eth0-tx-3
Quoted 3 lines
But TX seems to mostly use queue 0
Packets sent to eth0 are coming from where ?
Packets come mainly from two routers(Edge BGP and local NAT)
W dniu 08.10.2012 14:00, Andre Tomt napisał(a):
Quoted 6 lines · Nieścierowicz Adam
Quoted 5 lines
W dniu 08.10.2012 11:47, Eric Dumazet napisał(a):
Quoted 2 lines
Anyway you dont say where are drops, (ifconfig give us very few drops)
Quoted 7 lines
Quoted 2 lines
you can see no losses(drop), but a temporary decline in traffic on the interface to 0kb/s
This sounds very familiar, could it be something similar to:
http://marc.info/?l=linux-netdev&m=134594936016796&w=3 [1]The chip seems to be of the same family (though not model)
In fact it looks similarly.
Here the problem has performed in kernel 3.4.1, 3.5-rcX, and 3.6
Quoted 5 lines · Nieścierowicz Adam
W dniu 08.10.2012 11:47, Eric Dumazet napisał(a):
Quoted 1 line
Anyway you dont say where are drops, (ifconfig give us very few drops)
you can see no losses(drop), but a temporary decline in traffic on the interface to 0kb/s
This sounds very familiar, could it be something similar to:
http://marc.info/?l=linux-netdev&m=134594936016796&w=3
The chip seems to be of the same family (though not model)
Quoted 11 lines · Andre Tomt
Quoted 5 lines · Nieścierowicz Adam
W dniu 08.10.2012 11:47, Eric Dumazet napisał(a):
Quoted 1 line
Anyway you dont say where are drops, (ifconfig give us very few drops)
you can see no losses(drop), but a temporary decline in traffic on the interface to 0kb/s
This sounds very familiar, could it be something similar to:
http://marc.info/?l=linux-netdev&m=134594936016796&w=3The chip seems to be of the same family (though not model)
Yes, but Adam says 3.4.1 already has a problem, while commit 2cb7a9cc008c25dc03314de563c00c107b3e5432 is in 3.5 only.
Since Adam uses Intel e1000e, it could be the BQL related problem.
(Not sure if Intel guys finally fixed the problem, if not, its really insane)
Quoted 11 lines · Eric Dumazet
Quoted 10 lines · Andre Tomt
Quoted 5 lines · Nieścierowicz Adam
W dniu 08.10.2012 11:47, Eric Dumazet napisał(a):
Quoted 1 line
Anyway you dont say where are drops, (ifconfig give us very few drops)
you can see no losses(drop), but a temporary decline in traffic on the interface to 0kb/s
This sounds very familiar, could it be something similar to:
http://marc.info/?l=linux-netdev&m=134594936016796&w=3
Quoted 6 lines
Quoted 1 line
The chip seems to be of the same family (though not model)
Yes, but Adam says 3.4.1 already has a problem, while commit
2cb7a9cc008c25dc03314de563c00c107b3e5432is in 3.5 only.Since Adam uses Intel e1000e, it could be the BQL related problem.
The other chips have had DMA burst flag enabled for longer, so that he sees the same problem in 3.4 while I'm not makes sense. Hmm, as 3.4 is when BQL went in (IIRC) it seems very likely that this BQL issue is the problem for both of us.
Quoted 4 lines
(Not sure if Intel guys finally fixed the problem, if not, its really insane)
Ugh. :)
Quoted 17 lines · Andre Tomt
Quoted 16 lines · Eric Dumazet
Quoted 11 lines · Andre Tomt
Quoted 5 lines · Nieścierowicz Adam
W dniu 08.10.2012 11:47, Eric Dumazet napisał(a):
Quoted 1 line
Anyway you dont say where are drops, (ifconfig give us very few drops)
you can see no losses(drop), but a temporary decline in traffic on the interface to 0kb/s
This sounds very familiar, could it be something similar to:
http://marc.info/?l=linux-netdev&m=134594936016796&w=3The chip seems to be of the same family (though not model)
Yes, but Adam says 3.4.1 already has a problem, while commit
2cb7a9cc008c25dc03314de563c00c107b3e5432is in 3.5 only.
Quoted 6 lines
Quoted 1 line
Since Adam uses Intel e1000e, it could be the BQL related problem.
The other chips have had DMA burst flag enabled for longer, so that he sees the same problem in 3.4 while I'm not makes sense. Hmm, as 3.4 is when BQL went in (IIRC) it seems very likely that this BQL issue is the problem for both of us.
To clarify; I think the DMA burst flag in the driver triggers the BQL related issue. Judging by the patchwork link for wthresh=1 this seems very related indeed.
Removing the FLAG2_DMA_BURST flag for 82574 in the driver works for me. Adam, it might be worth testing out a build on your system too with the flag removed. If you try the attached patch (for 3.6, probably OK for 3.5) and the problem dissapears, we are probably at least talking about the same bug.
drivers/net/ethernet/intel/e1000e/82571.c +3 -6
@@ -2031,8 +2031,7 @@ | FLAG_RESET_OVERWRITES_LAA /* errata */ |FLAG_TARC_SPEED_MODE_BIT /* errata */ | FLAG_APME_CHECK_PORT_B, - .flags2 =FLAG2_DISABLE_ASPM_L1 /* errata 13 */ - | FLAG2_DMA_BURST, + .flags2 = FLAG2_DISABLE_ASPM_L1, /* errata 13 */ .pba = 38, .max_hw_frame_size = DEFAULT_JUMBO, .get_variants = e1000_get_variants_82571,
@@ -2049,8 +2048,7 @@ | FLAG_APME_IN_CTRL3 |FLAG_HAS_CTRLEXT_ON_LOAD | FLAG_TARC_SPEED_MODE_BIT, /* errata */ - .flags2 =FLAG2_DISABLE_ASPM_L1 /* errata 13 */ - | FLAG2_DMA_BURST, + .flags2 = FLAG2_DISABLE_ASPM_L1, /* errata 13 */ .pba = 38, .max_hw_frame_size = DEFAULT_JUMBO, .get_variants = e1000_get_variants_82571,
@@ -2090,8 +2088,7 @@ .flags2 = FLAG2_CHECK_PHY_HANG |FLAG2_DISABLE_ASPM_L0S |FLAG2_DISABLE_ASPM_L1 - |FLAG2_NO_DISABLE_RX - | FLAG2_DMA_BURST, + | FLAG2_NO_DISABLE_RX, .pba = 32, .max_hw_frame_size = DEFAULT_JUMBO, .get_variants = e1000_get_variants_82571,
W dniu 08.10.2012 14:59, Andre Tomt napisał(a):
Quoted 29 lines · Andre Tomt
Quoted 16 lines · Eric Dumazet
Quoted 14 lines · Andre Tomt
Quoted 12 lines · Nieścierowicz Adam
Quoted 7 lines
W dniu 08.10.2012 11:47, Eric Dumazet napisał(a):
Quoted 2 lines
Anyway you dont say where are drops, (ifconfig give us very few drops)
you can see no losses(drop), but a temporary decline in traffic on the interface to 0kb/s
This sounds very familiar, could it be something similar to:
http://marc.info/?l=linux-netdev&m=134594936016796&w=3 [1] The chip seems to be of the same family (though not model)Quoted 7 lines
Quoted 3 lines
Yes, but Adam says 3.4.1 already has a problem, while commit
2cb7a9cc008c25dc03314de563c00c107b3e5432is in 3.5 only. Since Adam uses Intel e1000e, it could be the BQL related problem.The other chips have had DMA burst flag enabled for longer, so that he sees the same problem in 3.4 while I'm not makes sense. Hmm, as 3.4 is when BQL went in (IIRC) it seems very likely that this BQL issue is the problem for both of us.
To clarify; I think the DMA burst flag in the driver triggers the BQL related issue. Judging by the patchwork link for wthresh=1 this seems very related indeed.
Quoted 5 lines
Removing the
FLAG2_DMA_BURSTflag for 82574 in the driver works for me. Adam, it might be worth testing out a build on your system too with the flag removed. If you try the attached patch (for 3.6, probably OK for 3.5) and the problem dissapears, we are probably at least talking about the same bug.
after applying the patch everything looks good, no visible loss
Do you expect to correct the bug in mainline?
Quoted 37 lines · Nieścierowicz Adam
W dniu 08.10.2012 14:59, Andre Tomt napisał(a):
Quoted 29 lines · Andre Tomt
Quoted 16 lines · Eric Dumazet
Quoted 14 lines · Andre Tomt
Quoted 12 lines · Nieścierowicz Adam
Quoted 7 lines
W dniu 08.10.2012 11:47, Eric Dumazet napisał(a):
Quoted 2 lines
Anyway you dont say where are drops, (ifconfig give us very few drops)
you can see no losses(drop), but a temporary decline in traffic on the interface to 0kb/s
This sounds very familiar, could it be something similar to:
http://marc.info/?l=linux-netdev&m=134594936016796&w=3 [1] The chip seems to be of the same family (though not model)Quoted 7 lines
Quoted 3 lines
Yes, but Adam says 3.4.1 already has a problem, while commit
2cb7a9cc008c25dc03314de563c00c107b3e5432is in 3.5 only. Since Adam uses Intel e1000e, it could be the BQL related problem.The other chips have had DMA burst flag enabled for longer, so that he sees the same problem in 3.4 while I'm not makes sense. Hmm, as 3.4 is when BQL went in (IIRC) it seems very likely that this BQL issue is the problem for both of us.
To clarify; I think the DMA burst flag in the driver triggers the BQL related issue. Judging by the patchwork link for wthresh=1 this seems very related indeed.
Quoted 5 lines
Removing the
FLAG2_DMA_BURSTflag for 82574 in the driver works for me. Adam, it might be worth testing out a build on your system too with the flag removed. If you try the attached patch (for 3.6, probably OK for 3.5) and the problem dissapears, we are probably at least talking about the same bug.
Quoted 3 lines
after applying the patch everything looks good, no visible loss
Do you expect to correct the bug in mainline?
Jesse Brandenburg is working on a patch for upstream currently to fix the issue.