New OpenWrt installation on a TP-Link Archer C7 v2 is slow - speed cut in half

A lot of the claims raised in this thread are inaccurate (e.g -among others- everything about frequency scaling or CPU governors, ath79/ QCA9558 (like most mips SOCs used in routers) cannot do frequency scaling, it will always run at its design frequency of 720 MHz).

Your testing is conflating two orthogonal things, routing speed and wireless speed. While I understand that you care about the combination of the two, for debugging it would be important to separate those two (as in testing the wired routing capabilities, which should be somewhere around 175-200 MBit/s tops[0] without software flow-offloading - and testing the wireless speed of one wireless 5 GHz client against a wired system in your LAN (e.g. via iperf3[1]). When doing an internet based speedtest over wireless, both orthogonal features are competing about system resources (you have only one CPU core, at a fixed frequency).

Offloading is a mixed bag of beans, it always comes at a cost (quirks, bugs) and can only accelerate the trivial cases.

  • software flow-offloading is available for all devices, it can provide a certain speed-up.
  • hardware flow-offloading depends on both the hardware offering this feature (AR8327N technically does have something called "hardware NAT", a very early/ limited packet offloading engine) and the OS having drivers for it (not given with OpenWrt for this device, so far only mt7621/ mt7622/ filogic 8x0 are covered by mainline hardware flow-offloading drivers).

Usage of flow-offloading will ease the CPU cycles required for taking care of the WAN-to-LAN routing, freeing up cycles that would be needed for keeping the WLAN card busy, so it can speed up the WiFi indirectly. Proprietary wireless drivers (as used in the OEM firmware) may have further means to offload parts of the wireless processing (as does OpenWrt for recent mt76 based drivers via WED, but not for ath9k/ ath10k).

Expecting ~270 MBit/s (I haven't found your subscribed WAN speed) from the Archer c7-v2 (without offloading) is ambitious and not going to happen, software flow-offloading can recover some of that though (but routing&WiFi will always be in contention about the system performance there). Yes, the proprietary OEM firmware has more leverage here by relying on hardware acceleration, but even that is challenged for those speeds.

For OpenWrt to achieve those speeds, you will have to upgrade the hardware, nine years ago -when this hardware came to market- ~300 MBit/s WAN speed simply weren't on the map, yet.

[0] that assumes plain routing over ethernet/ DHCP on WAN, PPPoE or similar authentication protocols will slow you down further.
[1] I would expect something roughly around 250-300 MBit/s for that, QCA9880-BR4A is a rather early 802.11ac chipset and the CPU is still slow.