Closed hexchain closed 5 years ago
Could you please post the output of "tc -s qdisc" from before and after running the IPv6 speedtest with sqm enabled?
Sure.
Does it help if you turn offloads off?
ethtool -K eth1 gso off gro off tso off
Yes!
Haochen Tong notifications@github.com writes:
Yes!
Right. There is some issue with offloads and 6in4 tunnelling; I've run into this as well. It's weird that it's only triggered when you enable sqm-scripts, though... Does it make any difference (with offloads enabled) whether you run cake or fq_codel as the sqm-scripts qdisc?
With fq_codel, simplest.qos and offload enabled, I don't see any problem. Seems it's only about cake?
Haochen Tong notifications@github.com writes:
With fq_codel, simplest.qos and offload enabled, I don't see any problem. Seems it's only about cake?
Hmm, what about if you add 'no-split-gso' as a parameter to cake? There's a field to add arbitrary parameters to cake in the advanced settings somewhere...
There are two fields for custom options; one for egress and one for ingress. But no matter how I put no-split-gso
into them, the output of tc qdisc
always has split-gso
.
Which OpenWrt version? (cat /etc/os-release)
What is the output of: tc qdisc add root cake help
The options can be added into the following fields in /etc/config/sqm: option iqdisc_opts 'no-split-gso' option eqdisc_opts 'no-split-gso'
OpenWrt version is 18.06.1, kernel 4.14.63.
Output:
# tc qdisc add root cake help
Usage: ... cake [ bandwidth RATE | unlimited* | autorate-ingress ]
[ rtt TIME | datacentre | lan | metro | regional |
internet* | oceanic | satellite | interplanetary ]
[ besteffort | diffserv8 | diffserv4 | diffserv3* ]
[ flowblind | srchost | dsthost | hosts | flows |
dual-srchost | dual-dsthost | triple-isolate* ]
[ nat | nonat* ]
[ wash | nowash* ]
[ ack-filter | ack-filter-aggressive | no-ack-filter* ]
[ memlimit LIMIT ]
[ ptm | atm | noatm* ] [ overhead N | conservative | raw* ]
[ mpu N ] [ ingress | egress* ]
(* marks defaults)
Interestingly there's no split-gso
either...
Haochen Tong notifications@github.com writes:
OpenWrt version is 18.06.1, kernel 4.14.63.
Output:
# tc qdisc add root cake help Usage: ... cake [ bandwidth RATE | unlimited* | autorate-ingress ] [ rtt TIME | datacentre | lan | metro | regional | internet* | oceanic | satellite | interplanetary ] [ besteffort | diffserv8 | diffserv4 | diffserv3* ] [ flowblind | srchost | dsthost | hosts | flows | dual-srchost | dual-dsthost | triple-isolate* ] [ nat | nonat* ] [ wash | nowash* ] [ ack-filter | ack-filter-aggressive | no-ack-filter* ] [ memlimit LIMIT ] [ ptm | atm | noatm* ] [ overhead N | conservative | raw* ] [ mpu N ] [ ingress | egress* ] (* marks defaults)
Interestingly there's no
split-gso
either...
Yeah, don't think that made it into 18.06...
Hi Haochen Tong, hi Toke,
On Sep 7, 2018, at 16:17, Toke Høiland-Jørgensen notifications@github.com wrote:
Haochen Tong notifications@github.com writes:
OpenWrt version is 18.06.1, kernel 4.14.63.
Output:
# tc qdisc add root cake help Usage: ... cake [ bandwidth RATE | unlimited* | autorate-ingress ] [ rtt TIME | datacentre | lan | metro | regional | internet* | oceanic | satellite | interplanetary ] [ besteffort | diffserv8 | diffserv4 | diffserv3* ] [ flowblind | srchost | dsthost | hosts | flows | dual-srchost | dual-dsthost | triple-isolate* ] [ nat | nonat* ] [ wash | nowash* ] [ ack-filter | ack-filter-aggressive | no-ack-filter* ] [ memlimit LIMIT ] [ ptm | atm | noatm* ] [ overhead N | conservative | raw* ] [ mpu N ] [ ingress | egress* ] (* marks defaults)
Interestingly there's no
split-gso
either...Yeah, don't think that made it into 18.06...
That is what I feared, it is odd though that this only seems to affect the 6in4 tunnel, no?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
moeller0 notifications@github.com writes:
Hi Haochen Tong, hi Toke,
On Sep 7, 2018, at 16:17, Toke Høiland-Jørgensen notifications@github.com wrote:
Haochen Tong notifications@github.com writes:
OpenWrt version is 18.06.1, kernel 4.14.63.
Output:
# tc qdisc add root cake help Usage: ... cake [ bandwidth RATE | unlimited* | autorate-ingress ] [ rtt TIME | datacentre | lan | metro | regional | internet* | oceanic | satellite | interplanetary ] [ besteffort | diffserv8 | diffserv4 | diffserv3* ] [ flowblind | srchost | dsthost | hosts | flows | dual-srchost | dual-dsthost | triple-isolate* ] [ nat | nonat* ] [ wash | nowash* ] [ ack-filter | ack-filter-aggressive | no-ack-filter* ] [ memlimit LIMIT ] [ ptm | atm | noatm* ] [ overhead N | conservative | raw* ] [ mpu N ] [ ingress | egress* ] (* marks defaults)
Interestingly there's no
split-gso
either...Yeah, don't think that made it into 18.06...
That is what I feared, it is odd though that this only seems to affect the 6in4 tunnel, no?
Well, there's definitely something broken in the interaction between GSO and 6in4.
Since the option is not there, another option is to set the cake bandwidth to something higher than 1Gbps; that will turn off split-gso...
Haochen, could you try that? :)
Sounds interesting. Now I have set both bandwidth value to 1024000 and there's no split-gso
in tc-qdisc
, and the transfer rate through the 6in4 tunnel looks fairly good - 100Mbps.
Haochen Tong notifications@github.com writes:
Sounds interesting. Now I have set both bandwidth value to 1024000 and there's no
split-gso
intc-qdisc
, and the transfer rate through the 6in4 tunnel looks fairly good - 100Mbps.
Right. So definitely something to do with the GSO splitting, then. I'll see if I can reproduce it and try to figure out what's going on...
Right, so did a bit more investigating on this.
It appears the drop in throughput only happens when the split-gso-enabled cake is on the IFB interface (i.e., downstream). Does that fit with your setup?
tbf also splits gso. you could try that + fq_codel on ifb
@tohojo: It seems it's on both eth1
and ifb4eth1
.
Output of tc qdisc
:
qdisc noqueue 0: dev lo root refcnt 2
qdisc mq 0: dev eth0 root
qdisc fq_codel 0: dev eth0 parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
qdisc fq_codel 0: dev eth0 parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
qdisc fq_codel 0: dev eth0 parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
qdisc fq_codel 0: dev eth0 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
qdisc cake 8006: dev eth1 root refcnt 5 bandwidth 102400Kbit besteffort triple-isolate split-gso rtt 100.0ms raw overhead 0
qdisc ingress ffff: dev eth1 parent ffff:fff1 ----------------
qdisc noqueue 0: dev br-lan root refcnt 2
qdisc noqueue 0: dev 6in4-wan6 root refcnt 2
qdisc noqueue 0: dev wlan0 root refcnt 2
qdisc noqueue 0: dev wlan1 root refcnt 2
qdisc cake 8007: dev ifb4eth1 root refcnt 2 bandwidth 102400Kbit besteffort triple-isolate wash split-gso rtt 100.0ms raw overhead 0
@dtaht: This is what it looks like with fq_codel + simplest_tbf:
# tc qdisc
qdisc noqueue 0: dev lo root refcnt 2
qdisc mq 0: dev eth0 root
qdisc fq_codel 0: dev eth0 parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
qdisc fq_codel 0: dev eth0 parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
qdisc fq_codel 0: dev eth0 parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
qdisc fq_codel 0: dev eth0 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
qdisc tbf 1: dev eth1 root refcnt 5 rate 102400Kbit burst 7488b lat 300.0ms
qdisc fq_codel 110: dev eth1 parent 1: limit 1001p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
qdisc ingress ffff: dev eth1 parent ffff:fff1 ----------------
qdisc noqueue 0: dev br-lan root refcnt 2
qdisc noqueue 0: dev 6in4-wan6 root refcnt 2
qdisc noqueue 0: dev wlan0 root refcnt 2
qdisc noqueue 0: dev wlan1 root refcnt 2
qdisc tbf 1: dev ifb4eth1 root refcnt 2 rate 102400Kbit burst 7488b lat 300.0ms
qdisc fq_codel 110: dev ifb4eth1 parent 1: limit 1001p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
I get about 600KB/s in this setting. Not optimal but better than the original cake + piece_of_cake.
Yeah, sqm-scripts will set it up on both. But which direction did you try changing to >1Gbps?
I changed both.
Could you try them one at a time and see which one helps, please? :)
Changing download
to >1Gbps helps, while the other one doesn't.
# tc qdisc
qdisc noqueue 0: dev lo root refcnt 2
qdisc mq 0: dev eth0 root
qdisc fq_codel 0: dev eth0 parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
qdisc fq_codel 0: dev eth0 parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
qdisc fq_codel 0: dev eth0 parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
qdisc fq_codel 0: dev eth0 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
qdisc cake 801b: dev eth1 root refcnt 5 bandwidth 102400Kbit besteffort triple-isolate split-gso rtt 100.0ms raw overhead 0
qdisc ingress ffff: dev eth1 parent ffff:fff1 ----------------
qdisc noqueue 0: dev br-lan root refcnt 2
qdisc noqueue 0: dev 6in4-wan6 root refcnt 2
qdisc noqueue 0: dev wlan0 root refcnt 2
qdisc noqueue 0: dev wlan1 root refcnt 2
qdisc cake 801c: dev ifb4eth1 root refcnt 2 bandwidth 1048Mbit besteffort triple-isolate wash rtt 100.0ms raw overhead 0
And what does that do to the actual download speed?
I don't have a very stable measure of bandwidth, because it's evening here and probably people are streaming video to make the ISP crowded - so I'll just turn off SQM, run a download, note the speed, turn on SQM and mess with the parameters to see what happens. And here are the records:
upload
/download
both set to 102400: 60KB/s to 80KB/sdownload
set to 1048576: 7MB/s to 8MB/supload
set to 1048576: around 60KB/sHope that's useful! :-)
Yup, that fits with my observations. Thanks for testing!
Right, so I think I tracked down the cause of this (with a little help from Eric Dumazet). There's a workaround in the latest git cake (https://github.com/dtaht/sch_cake/commit/42e87f12ea5c390bf5eeb658c942bc810046160a) and a patch submitted to upstream...
Closing this in the hope that the fix has made it into stable by now...
I have set up an OpenWrt box, with HE.net TunnelBroker as a 6in4 tunnel. When SQM is disabled, the IPv6 speed test reports that the bandwidth of my IPv6 connection is on par with IPv4 (in my case, 100Mbps). But if I enabled SQM, the speed of IPv6 suddenly drops to a few hundred kbps.
My SQM settings (eth1 is the WAN interface, connected directly to an ISP home ethernet port and gets its IP address directly through DHCP):
Relevant network interfaces: