I've been looking at upgrading to 910Mbps Fiber and Im worried that I will have to move back to stock firmware to get the speeds I'm paying for.
At the moment I know that the current DSA implementation is limited to 1 core for wan to lan connections which means that speed is limited from wan to lan...
I have an MR8300 which is running OpenWrt 23.05-SNAPSHOT r23263-b7fac1bf8c.
I got about 400Mbps when using iperf3 from wan to my pc, but while doing iperf3 from my pc to the router I got 940mbps
Is there a way to bind the WAN interface to core 0 and eth0 to core 1 in hopes of getting at least 800mbps
After reading the documentation listed I can see that it is possible but I'm not sure OpenWrt can do this o rwhen it could be done
If anyone can share their thoughts on this I would appreciate it as I don't want to be limited to
a) you're expecting more than this hardware can deliver (around one third of your expectations are realistic).
b) this is not an issue for ipq40xx, it physically only has a single CPU port to the switch anyways (even if it were capable of routing at 1 GBit/s wire speed in the first place).
Interesting i didn't realise there was that much data being processed and considering the router is advertised as being able to handle 2.2Gbps I thought it would be able to, heck even the 1.2gbps that iperf gets internally made me believe it.
I can understand now that I was being unrealistic.
My isp is going to supply a mercku m6 when I order and from what I can gather it runs a custom version of OpenWrt.
if it manages to deliver 1gbps would I be better off giving up the "security" of double nat and just using my MR8300 in dumb ap or a switch mode?
@DJMalachite if you try a non DSA firmware for MR8300 (22.03.5) maybe you can reach near 900 Mbps.
Playing with packet steering or irqbalance could help to achive it.
I have a MR8300 but only 300 Mbps.of contracted fiber speed.
The route for data goes Laptop -> ISP Router -> MR8300 -> PC
With this, I did tests to see the speed difference between the snapshot and 23.03.5
While running DSA on OpenWrt 23.05-SNAPSHOT r23263-b7fac1bf8c I managed to get around 481Mbits/s with packet steering, Software flow offloading enabled and irqbalance and CPU governer on performance
Another workaround possibility is hardware NAT. ipq4019 has it, but I think it's not implemented (yet) in OpenWrt.
With 22.03 I remember testing at about 800 Mbit/s (packet steering, software NAT).
I'm currently using 23.05.0-rc2 but with a 22 Mbit/s ADSL WAN. So I have obviously no routing performance issue with such a low bandwith.
interesting, any idea how to go about implementing it into OpenWrt?
I wouldn't mind helping to add it if I can.
After some thought ill probably stick to 22.03.5 once I get my new broadband too get as close to line speed as I can, or just use the isp router for routing and the MR8300 as a dumb ap/switch
hm ... no
This is way beyond my coding abilities. My days of coding hardware related parts goes back to the 8bits era.
Gather any docs about the matter first.
As ipq4019 is a rather popular SoC I guess that someone should have already done it. Apparently it isn't the case, so there may be a trick somehow. Well in any case if someone (you?) could implement this, a lot of people would appreciate.
Ipq4019 target on swconfig openwrt easily routes 1gbit fdx between ports with core load around 60/60/0/0 percent (4 cores/threads, actually two operating).
On DSA though it's another story. There's no way to spread load across the cores (not that I know of any anyway) and one core maxes at around 600 Mbps while others are doing nothing.
So much about the DSA performance in the current state of affairs, compared to old swconfig.
This is the script I got from somewhere else I didn't write it (can't remember where notengobattery or lga1150 maybe) at some time to set the irq affinity:
#!/bin/sh /etc/rc.common
START=99
start() {
local mask=4
for irq in $(grep -F ath10k_ahb /proc/interrupts | cut -d: -f1 | sed 's, *,,')
do
echo "$mask" > "/proc/irq/$irq/smp_affinity"
[ $mask = 4 ] && mask=8
done
mask=1
for irq in $(grep -F c080000.ethernet /proc/interrupts | cut -d: -f1 | sed 's, *,,')
do
echo "$mask" > "/proc/irq/$irq/smp_affinity"
mask=$((mask << 1))
[ $mask = 16 ] && mask=1
done
}
if building
save that as target/linux/ipq40xx/base-files/etc/init.d/set-irq-affinity
then chmod +x target/linux/ipq40xx/base-files/etc/init.d/set-irq-affinity
if putting on an existing device just ssh in make:
/etc/init.d/set-irq-affinity
then chmod +x /etc/init.d/set-irq-affinity
then reboot
I don't use packet steering, tho maybe sometimes it's ok to enable just on eth0 or the first lower bridge device
I'm not sure if the threading is enabled by default either or if it's a benefit
Maybe I'm wrong, but your test seems not to be testing NAT (from 192.168.1.170 to 192.168.1.1).
The problem should be with internet or any other network requiring NAT translations.
ahh, ok, i'll try that tomorrow and see what i get
It does prove that the actual DSA driver is capable of operating at max tho maybe it does use up more cpu cycles and then NAT is effected, though i'm interested to see myself
perhaps it's the bridging performance mainly, are you running with llvm toolchain enabled and the "bridger" daemon chosen in the base section of the menuconfig ?
also looks like it might be better to distrubute across cpus other than 0 as well, only 1-3 probably better
I see what you mean, I seem to get a bit better, turning on packet sterring for the lower bridge device seems to work slightly better.
for me that's echo f > /sys/class/net/dsa-switch/queues/rx-0/rps_cpus
results:
Could you compare values - run those same tests again on the LAN side without setting the IRQ affinity values?
I'm interested to see how much difference there is between vanilla DSA and with your affinity tweak - the Fritzbox 7530 has a capable CPU. I have one that I have not yet installed openwrt on.