R7800 Gigabit WAN Will Blow Your Mind (or not)

Hi All!
I'm a recent convert from DD-WRT; I've been happily running on OpenWRT for about 4 months now. It is a superior product IMO.

I also recently upgraded my ISP plan to 1Gbps/50Mbps, purchased a Motorola MB8600, and tested everything connecting directly to a laptop. I was getting near 1Gbps speeds going from cable modem to my laptop on a Cat6 cable.

The performance is much worse with my R7800 in between my cable modem and my laptop (Cat6 on both ends).

My performance:

trancekat@Eden:~$ while true; do speedtest --no-upload | grep Download;sleep 10; done
Download: 570.72 Mbit/s
Download: 477.92 Mbit/s
Download: 690.27 Mbit/s
Download: 533.02 Mbit/s
Download: 599.47 Mbit/s
Download: 648.15 Mbit/s
Download: 396.07 Mbit/s
Download: 501.47 Mbit/s
Download: 554.94 Mbit/s
Download: 490.25 Mbit/s
Download: 612.76 Mbit/s
Download: 517.27 Mbit/s
Download: 570.33 Mbit/s
Download: 572.50 Mbit/s
Download: 536.51 Mbit/s
Download: 574.63 Mbit/s
Download: 671.33 Mbit/s
Download: 573.15 Mbit/s
Download: 420.54 Mbit/s
Download: 510.72 Mbit/s
Download: 570.54 Mbit/s
Download: 492.96 Mbit/s
Download: 526.43 Mbit/s
Download: 453.35 Mbit/s
^C

The build I am running:

Hostname

Model
Netgear Nighthawk X4S R7800
Architecture
ARMv7 Processor rev 0 (v7l)
Firmware Version
KONG 19 2020-05 / LuCI branch git-20.150.78254-4bd88ee
Kernel Version
4.14.180
Local Time
2020-06-26 09:28:21
Uptime
24h 43m 8s
Load Average
0.17, 0.21, 0.22

The optimization steps I've taken:

~# cat ./opt.sh 
#############################################
# KONG Changes                              #
#############################################
# https://www.desipro.de/openwrt/sources/startup
# https://forum.openwrt.org/t/r7800-cache-scaling-issue/44187/20
echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 800000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo 20 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold

# utilize both cpu cores for network processing
for file in /sys/class/net/*
do
	echo 3 > $file"/queues/rx-0/rps_cpus"
	echo 3 > $file"/queues/tx-0/xps_cpus"
done


#############################################
# Common Changes                            #
#############################################
# https://gist.github.com/fantom-x/629fac1e82639979ae7fa02cb3c6d0b4
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6
echo 0 > /proc/sys/net/ipv6/conf/all/forwarding
echo 0 > /proc/sys/net/ipv6/conf/default/forwarding
/etc/init.d/odhcpd stop
/etc/init.d/odhcpd disable

# Disable SNMP MIBs on the switch
swconfig dev switch0 set ar8xxx_mib_poll_interval 0

# wifi0 - 5GHz
echo 2 > /proc/irq/28/smp_affinity
# wifi1 - 2GHz
echo 1 > /proc/irq/29/smp_affinity
# eth0 - WAN
echo 1 > /proc/irq/31/smp_affinity
# eth1 - LAN
echo 2 > /proc/irq/32/smp_affinity

# USB1 & USB2
echo 2 > /proc/irq/105/smp_affinity
echo 2 > /proc/irq/106/smp_affinity

# These get lost after making any change via LuCI, so a reboot is required after every change
ethtool -C eth0 tx-usecs 0
ethtool -C eth1 tx-usecs 0
ethtool -C eth0 rx-usecs 31
ethtool -C eth1 rx-usecs 31
echo "...ethtool -C tx/rx 0/31"

/etc/init.d/uhttpd restart

# There is no need for collectd to run above nice == 19
if [ ! `grep "NICEPRIO=19" /etc/init.d/collectd` ]; then
  sed -i 's/^NICEPRIO.*/NICEPRIO=19/g' /etc/init.d/collectd
  # Restart does not pick up the above change right away
  (sleep 300 ; /etc/init.d/collectd stop; sleep 15; /etc/init.d/collectd start) &
fi

# There is no need for uhttpd to run above nice == 19
if [ ! `grep "nice -n 19" /etc/init.d/uhttpd` ]; then
  sed -i "s/procd_set_param command/procd_set_param command nice -n 19/g" /etc/init.d/uhttpd
  # Restart does not pick up the above change right away
  (sleep 300 ; /etc/init.d/uhttpd stop; sleep 15; /etc/init.d/uhttpd start) &
fi

For good measure (ignoring the optimization to the governor above, I also tried this:

# cat /etc/rc.local 
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
/root/opt.sh
echo performance > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
exit 0

Additionally, QoS and QSM are disabled. Software offloading is ENABLED.

I am running about 25 hosts on this network, 4 SSIDs, 2 LAN networks, 1 WAN connection, Adblock (see below), dnsmasq, 2 local USB drives mounted ans shared via SMB, and NTP server.

CPUs don't seem to be sweating from reviewing top.

Adblock info below (I did my testing with Abblock disabled and enabled, and saw little difference):

Information
Status / Version
enabled / 4.0.5
Blocked Domains
239,623
Active Sources
adaway, adguard, andryou, anudeep, malwaredomains, malwarelist, notracking, openphish, phishing_army, smarttv, spam404, sysctl, wally3k, winhelp, winspy, yoyo
DNS Backend
dnsmasq, /mnt/scratch/adblock
Run Utils
/usr/bin/curl, /usr/bin/awk
Run Interfaces
trigger: lan, report: br-lan
Run Directories
base: /mnt/scratch/adblock/, backup: /mnt/scratch/backup/, report: /mnt/scratch/report/, jail: /tmp
Run Flags
backup: 1, reset: 0, flush: 0, force: 0, search: 0, report: 1, mail: 0, jail: 0

Is my router just not powerful enough to handle 1Gbps download WAN link, please?

Thank you for your help.

Have a look here.

1 Like

Check this for some background information, the r7800 and nbg6817 are comparable (basically identical) in this regard.

Without SQM, and with flow offloading enabled, you could expect something like 780 Mbit/s down and 880 Mbit/s up from your R7800 on a not-so-recent snapshot. I am on a symmetrical 1 Gbit/s connection, direct speedtest with laptop gives 940 Mbit/s in both directions.

1 Like