Reduced throughput with mt7621 and DSA
Hello, I am currently performing some performance measurements, comparing the (wired) routing throughput (WAN <-> LAN) of 19.07, 21.02 and master on mt7621 (ZBT WG-3526). I have connected one client to my LAN and one to the WAN, and use iperf3 to measure. I create parallel flows (in order to take advantage of the multiple CPU cores), use TCP and let iperf3 run for 30 sec. per test. Based on my measurements, the throughput is reduced by ~50% going from 19.07 and to 21.02/master (~450Mbit/s vs. ~900Mbit/s). I do not have a particular commit I can point to, but I believe the regressions is caused by the introduction of DSA. Restoring the old swconfig driver, brings my 21.02/master throughput up to roughly the same level as 19.07. I am able to alleviate the reduction in throughput by enabling flow offloading, but there are several cases where flow offloading does not have an effect. When performing a similar measurement to the one above over a Wireguard-tunnel, I see a similar reduction in performance (and no help from flow offloading). Does anyone know what could be the reason and if there is anything that can be done to improve the performance when using DSA? Are there for example any out of tree/not yet accepted patches that I should try? Thanks in advance for any help, Kristian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: Reduced throughput with mt7621 and DSA
I generalize, but this is a problem which affects a few devices in the DSA bring-up. Some platforms require some tinkering and tweaking, and perhaps input from the chip-set manufacturer (or information from a datasheet of the chip-set) if things are to improve. DSA brings advantages and is the future: everyone is already committed. OEMs have been laying low tho and just used older 2.x kernels which the mfrs provided with the chip-sets originally to avoid this maintenance themselves if at all possible. You can have a look at PRs for other platforms and their protracted DSA bring-ups on github. e.g. for the qca8k switch chip, some of the lads have been moving mountains: https://github.com/openwrt/openwrt/pull/4036 https://github.com/openwrt/openwrt/pull/4622 https://github.com/openwrt/openwrt/pull/4828 This will give you an idea of the amount of work which may be necessary to return performance to 19.x swconfig levels. I don't dabble in mt7621, so cannot be of help there as to whether there is something ongoing for those. On 2021-12-19 12:29, Kristian Evensen wrote: Hello, I am currently performing some performance measurements, comparing the (wired) routing throughput (WAN <-> LAN) of 19.07, 21.02 and master on mt7621 (ZBT WG-3526). I have connected one client to my LAN and one to the WAN, and use iperf3 to measure. I create parallel flows (in order to take advantage of the multiple CPU cores), use TCP and let iperf3 run for 30 sec. per test. Based on my measurements, the throughput is reduced by ~50% going from 19.07 and to 21.02/master (~450Mbit/s vs. ~900Mbit/s). I do not have a particular commit I can point to, but I believe the regressions is caused by the introduction of DSA. Restoring the old swconfig driver, brings my 21.02/master throughput up to roughly the same level as 19.07. I am able to alleviate the reduction in throughput by enabling flow offloading, but there are several cases where flow offloading does not have an effect. When performing a similar measurement to the one above over a Wireguard-tunnel, I see a similar reduction in performance (and no help from flow offloading). Does anyone know what could be the reason and if there is anything that can be done to improve the performance when using DSA? Are there for example any out of tree/not yet accepted patches that I should try? Thanks in advance for any help, Kristian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: Reduced throughput with mt7621 and DSA
Hello again, On Sun, Dec 19, 2021 at 12:29 PM Kristian Evensen wrote: > Based on my measurements, the throughput is reduced by ~50% going from > 19.07 and to 21.02/master (~450Mbit/s vs. ~900Mbit/s). I do not have a > particular commit I can point to, but I believe the regressions is > caused by the introduction of DSA. Restoring the old swconfig driver, > brings my 21.02/master throughput up to roughly the same level as > 19.07. I kept working on this issue today and went through my previous setup and results. It turns out that I had mixed my 21.02 and master results, leading to an incorrect observation. After cleaning up my mess and repeating my tests, I get roughly the same result for master (with DSA) as with 19.07.8. With an adequate number of parallel connections (eight seems to be a good number), I am able to reach 900Mbit/s-1Gbit/s. 21.02.1 peaks at around 500 Mbit/s. Since the only change between my sets of tests is the software, something has clearly improved in either the kernel or OpenWrt (as would be expected :)). Are there any particular commits/patches that would be worthwhile trying to backport to 21.02/5.4, or is the difference to master/5.10 so big that there is no point and the best is to wait for the next release? I guess one thing that hopefully shouldn't be too hard is be to combine 21.02 userspace with the 5.10 kernel. That will be on the top of my todo-list for tomorrow. Kristian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: Reduced throughput with mt7621 and DSA
Hi, On Tue, Dec 21, 2021 at 6:34 PM Kristian Evensen wrote: > Since the only change between my sets of tests is the software, > something has clearly improved in either the kernel or OpenWrt (as > would be expected :)). Are there any particular commits/patches that > would be worthwhile trying to backport to 21.02/5.4, or is the > difference to master/5.10 so big that there is no point and the best > is to wait for the next release? I guess one thing that hopefully > shouldn't be too hard is be to combine 21.02 userspace with the 5.10 > kernel. That will be on the top of my todo-list for tomorrow. Backporting 5.10 to 21.02 was straight forward and restored performance to 19.07-levels. Since I anyway compile and run my own images, backporting 5.10 works for me and performance issue is resolved :) Thanks for all the hard work. Kristian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: Reduced throughput with mt7621 and DSA
Sounds like the intended efforts for DSA bringup for 21.x and beyond have been fruitful. :) On 2021-12-22 08:45, Kristian Evensen wrote: Hi, On Tue, Dec 21, 2021 at 6:34 PM Kristian Evensen wrote: Since the only change between my sets of tests is the software, something has clearly improved in either the kernel or OpenWrt (as would be expected :)). Are there any particular commits/patches that would be worthwhile trying to backport to 21.02/5.4, or is the difference to master/5.10 so big that there is no point and the best is to wait for the next release? I guess one thing that hopefully shouldn't be too hard is be to combine 21.02 userspace with the 5.10 kernel. That will be on the top of my todo-list for tomorrow. Backporting 5.10 to 21.02 was straight forward and restored performance to 19.07-levels. Since I anyway compile and run my own images, backporting 5.10 works for me and performance issue is resolved :) Thanks for all the hard work. Kristian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel