Reading the forums, I was led to believe that the Seeed ReRouter CM4 would be plenty enough to route and saturate my gigabit Internet link... Spoiler, right now, it does not!
I am new to OpenWRT and have played around with it only for a dozen hours yet...
Firmware
OpenWrt 22.03.5 r20134-5f15225c1e
Setup (had the same result without the dumb switch)
I tried using software offloading... it improved, but still not what I was expecting, and I read that it disables many other useful functions on the device. Speedtest:
As for the post cited, I read it 5 000 times... I was told a CM4 had all the power needed to route that...
Could it be the VLAN hurting the performance? The fact that the internal network does not use it?
I could put a switch between the CM4 and the ONT and make it do the VLAN tagging for the ISP
OK... I was able to connect directly through my laptop... network-manager GUI is not really helpful for that situation, let's just say that!
Here are the results:
I did 3 runs and got from 923 to 933 up and down... Pretty close to the advertised 940/940 (not exactly gigabit, but who's counting!)
Now... The CM4 was almost getting me the same speed, except for uploads... I will re-wire it and retest in case upload was just a transient error...
Now... how can I improve it's switching capability from there?
In my hardware, I have a tp-link dumb 8 ports gigabit switch, and a brand new TL-SG116E managed switch...
Can I alleviate the load on the CM4 by placing components differently? Like having the switch do the vlan maybe?
Ok... I made a mistake in my testing so I will rectify it here...
I was able to connect my PC to the ONT with your help, thank you! (network-manager GUI is not helpful here!)
My first test was using the Website Speedtest.net in the browser... Then I realized I was not replicating the test conditions used in the router, which is to test using speedtest-cli
I re-did the test with speedtest-cli on my PC and got similar results as those on the CM4
That is, download speeds are close to max, but upload speeds are lower.
I was getting unstable results (range was outside error margin)... and narrowed-it down to forcing the server to use in speedtest-cli
speedtest-cli --server 16754 --share
I did 10 runs on each device to get the most accurate data on speed.
Upload speed difference could be due to the different architecture's implementation of the tool (AMD64 vs ARM64)... I can't tell.
This is the CPU graph for the CM4. I was repeating tests in 2 different runs.
(irqbalance is installed)
Can you test enabling "Packet Steering" in Network -> Interfaces -> Global network options and additionally type each of the following in the router's shell - testing each time:
Packet Steering is setting "f" to all ethernet devices' rps_cpus on your 4-core RPi.
When rps_cpus is set to zero, kernel processes the packet up to the point it is inserted into the output device's queue on the CPU core it originally received the interrupt on, and some ethernet chips support only one interrupt request number - always handled by a single core.
When you set rps_cpus to a number (in hexadecimal format), whenever a packet is received, it is instead dispatched to any of the cores specified in the bitmask (1 -> 1st core, 2 -> 2nd core, 4 -> 3rd core, 8 -> 4th core, 3 -> 1st and 2nd cores, c -> 3rd and 4th cores, f -> any core) by creating a software IRQ, and then continuing the processing of the packet on that (random) core.
You are mostly correct but not entirely, AFAIK 0 won't trigger a software interrupt while 1 will - but keep it in the same core if your interface sends IRQs to the first core.
You can try switching - if eth1 has a better chip, it can help moving the PPPoE processing there, and using eth0 for your lan. I don't know which chips this board is using.
From the diagram, one of the ethernet chips is connected via USB. This surely adds additional overhead.
Is there a command to enter from the console that would reset all network parameters to default when you messed-up and can't access the router anymore?...