Netgear R7800 exploration (IPQ8065, QCA9984)

I have been exploring R7800 with @hnyman's community build OpenWrt 18.06-SNAPSHOT r7409-d5afaa4114 for last few days. [edit: Note: This has nothing to do with this particular build, but 18.06-branch and most likely also newer ones. I just used this build as base for test.]

If you want lower ping & faster performance:

install ethtool package.

add to rc.local

echo performance > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
echo performance > /sys/devices/system/cpu/cpufreq/policy1/scaling_governor

echo 800000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
echo 800000 > /sys/devices/system/cpu/cpufreq/policy1/scaling_max_freq
sleep 1
echo 1750000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
echo 1750000 > /sys/devices/system/cpu/cpufreq/policy1/scaling_max_freq

ethtool -C eth0 tx-usecs 0
ethtool -C eth1 tx-usecs 0
ethtool -C eth0 rx-usecs 31
ethtool -C eth1 rx-usecs 31

Remove / disable script (I inserted exit to 2nd line of file)
/etc/hotplug.d/net/20-smp-tune

There is some frequency setting bug in ipq8065's drivers. If you change frequency from 1GHz-1.4GHz to max, you get a lot worse latency than when changing from 600-800MHz. I suspect L2 is not done right? I haven't investigated sources (yet). Also ethernet driver has bug that you can't change tx-usecs after you have changes rx-usecs and default rx-usecs is really high. Normal would be about 3us, not 264us. 30us is minimum it allows to set (with parameter 31 - another bug that result is one lower than requested?).

eth0/1 coalesce settings will get reset when connection status changes or you apply/commit new settings, so be aware. I have not yet looked where to add lines so those would be applied when necessary. (Most likely somewhere in hotplug.d/ )

Pings get noticeably lower. I have not tested effect to bandwith (yet) as 10/10M is limiting in my current net topology.

If you want even faster latency / performance, iptables rules made by fw3 seem slow. But I haven't looked better performing ones yet.

If someone could figure how to get ethernet driver's rx-usecs to more standard 3us value, router's latency could be on same level as ar71xx with openwrt 12.09.

CPU governor changed to performance did not change router's idle power consumption measurable with 0.1W resolution RMS powermeter.

Is there some way to disable some of sleep/C-states of cpu/soc? it would improve things more.

VLAN-setting or switch0 settings didn't seem to make any effect to latency.

Best I could get was min 0.050ms / avg 0.126ms ping to router. Above "settings" should give avg about 0.140ms (or was it 0.150ms). Default state was 1ms level. Yes, it is pinging router, but same affects twice natted intenet traffic when not using hw (or sw?) acceleration.

ps. Messy post, I didn't refactor this, but just wrote what I remembered now after few hours sleep.

8 Likes