I've tried to put together performance related tweaks:
- On-demand governor
# https://forum.openwrt.org/t/netgear-r7800-exploration-ipq8065-qca9984/285/1659
# https://forum.openwrt.org/t/netgear-r7800-exploration-ipq8065-qca9984/285/1661
#echo 800000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
#echo 800000 > /sys/devices/system/cpu/cpufreq/policy1/scaling_min_freq
#sleep 1
echo ondemand > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
echo ondemand > /sys/devices/system/cpu/cpufreq/policy1/scaling_governor
# https://forum.lede-project.org/t/r7800-performance/15780/5
#echo 35 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
#echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
- Performance governor
# https://forum.openwrt.org/t/netgear-r7800-exploration-ipq8065-qca9984/285/1442
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 1725000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
echo 1725000 > /sys/devices/system/cpu/cpufreq/policy1/scaling_max_freq
- 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
# 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 disable
/etc/init.d/odhcpd stop
# 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
/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
So far option with governor configured for performance seams to be in par with KONG changes (based on qualitative assessment). Does it make sense to combine those two? Any other ideas?