I wanted to test switching performance of my old LEDE router to see if it would be better on OpenWrt (knowing that it will probably be cpu-bound).
I cleared the configuration, started from scratch and configured the WAN interface using my ISP data and it works, albeit a bit slow:
Using MS Edge (86.073 kbps download, 94.040 kbps upload)
Using Firefox (95.853 kbps download, 52.963 kbps upload)
Note that it should be more than 100.000, normally hovers around 124,000
Then I upgraded to OpenWrt 19.07(.4) and I got this, which is way slower:
(64.136 kbps download, 64.806 kbps upload)
The results are consistent, with very little variability.
So I went back to OpenWrt 18.06(.9) and I get similar results.
I've noticed that running top while benchmarking yields vastly difference CPU usages between LEDE and OpenWrt. With OpenWrt, the CPU usage never gets above 50%, and with LEDE it goes to 89%.
What is going on? Is there something that can be done?
Copying from the old thread [18.06.4] speed fix for BT HomeHub 5a, since this won't be changed for 18.06.X or 19.07.X as it's a "performance fix" the quickest way on an existing device is just to;
$ rm /etc/hotplug.d/net/20-smp-tune
This won't affect currently up interfaces until a restart or you manually echo 0 to their rps_cpus and xps_cpus proc entries.
If building from git master then no action is required as it's already fixed. For a HH5 to further improve performance, I would suggest adding the SMP IRQ patches, now just one 0901-add-icu-smp-support.patch for git master which really should be commited, and then use the irqbalance daemon or manually set IRQ assignments in /etc/rc.local.
You'd need to build OpenWRT from source with the mentioned patch for master or these two for the 19.07 branch.
For my ADSL2 use case(s), I just just set the following in /etc/rc.local to split the load assuming wireless usage will be either 2.4GHz ath9k or 5GHz ath10k at a time. If no DSL, split the wireless instead perhaps. YMMV.
Unfortunately those patches have been removed from pastebin, while the other ones that work give me errors like:
Applying /home/user/openwrt/target/linux/lantiq/patches-5.4/0901-add-icu-smp-support.patch using plaintext:
(Stripping trailing CRs from patch; use --binary to disable.)
patching file arch/mips/lantiq/irq.c
Hunk #1 FAILED at 49.
Hunk #2 FAILED at 62.
Hunk #3 FAILED at 81.
Hunk #4 FAILED at 92.
Hunk #5 FAILED at 104.
Hunk #6 FAILED at 158.
Hunk #7 succeeded at 255 with fuzz 2 (offset 52 lines).
Hunk #8 FAILED at 241.
Hunk #9 FAILED at 261.
patch unexpectedly ends in middle of line
Hunk #10 FAILED at 305.
9 out of 10 hunks FAILED -- saving rejects to file arch/mips/lantiq/irq.c.rej
Patch failed! Please fix /home/user/openwrt/target/linux/lantiq/patches-5.4/0901-add-icu-smp-support.patch!
Tried both master and 19.07 branches, but I think I'm missing something. Crap, I hate being a newbie.