R7800 performance

You don’t need the box checked for software or hardware off loading in the firewall section (I have both turned off).

SQM requires use of a custom script (I forgot the tc package to be able to use it, I’ll add it on my next build). I’m not using SQM right now, will tinker with it later:

SQM’s performance is very impressive with the NSS cores:

1 Like

I finally found a time slot that allowed me to swap routers. I can confirm, that my qos integration in webif works for both pppoe and regular wan. I need to adopt the script in order to correctly set the interface, in case someone selects pppoe as wan interface in qos. Qos results are ok for now, but there is room for improvement.

1 Like

Cool. Let me know the best way to integrate it.

I’ve got the standard SQM package and luci sqm app installed.

I have not tried yet due to lack of time, sorry.

He visto una nueva versión, alguna mejora?

1 Like

Kong has a build from 9/9: http://www.desipro.de/openwrt/trunk/ipq806x-nss/

My build is based on @ansuel repo and is using the 5.4.60 kernel (about 2 weeks old, r14339).

My sysupgrade file is incorrectly named r14443 :rofl:- it is r14339.

This is what is included:

# Use "make defconfig" to expand this to a full .config
CONFIG_TARGET_ipq806x=y
CONFIG_TARGET_ipq806x_generic=y
CONFIG_TARGET_ipq806x_generic_DEVICE_netgear_r7800=y

# exfat is patented
CONFIG_BUILD_PATENTED=y

# NSS Drivers
CONFIG_PACKAGE_kmod-qca-nss-drv=y
CONFIG_PACKAGE_kmod-qca-nss-drv-qdisc=y
CONFIG_PACKAGE_kmod-qca-nss-ecm-standard=y
CONFIG_PACKAGE_kmod-qca-nss-gmac=y
CONFIG_PACKAGE_kmod-nss-ifb=y
CONFIG_PACKAGE_iptables-mod-physdev=y
CONFIG_PACKAGE_kmod-ipt-physdev=y

# Longer waiting for failsafe button push
CONFIG_IMAGEOPT=y
CONFIG_PREINITOPT=y
CONFIG_TARGET_PREINIT_TIMEOUT=5

# Busybox tweaks
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_SAVEHISTORY=y
CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_SAVE_ON_EXIT=y
CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_FLAGS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_REGEXP=y
CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_WINCH=y

# Add-on programs
CONFIG_PACKAGE_irqbalance=y
CONFIG_DROPBEAR_ECC=y

# USB device mount & file systems support
CONFIG_PACKAGE_block-mount=y
CONFIG_PACKAGE_kmod-usb-storage=y
CONFIG_PACKAGE_kmod-fs-cifs=y
CONFIG_PACKAGE_kmod-fs-exfat=y
CONFIG_PACKAGE_libblkid=y
CONFIG_PACKAGE_kmod-fs-ext4=y
CONFIG_PACKAGE_kmod-fs-hfsplus=y
CONFIG_PACKAGE_kmod-fs-msdos=y
CONFIG_PACKAGE_kmod-fs-vfat=y
CONFIG_PACKAGE_ntfs-3g=y
CONFIG_PACKAGE_kmod-nls-cp1250=y
CONFIG_PACKAGE_kmod-nls-cp437=y
CONFIG_PACKAGE_kmod-nls-cp850=y
CONFIG_PACKAGE_kmod-nls-iso8859-1=y
CONFIG_PACKAGE_kmod-nls-iso8859-15=y
CONFIG_PACKAGE_kmod-nls-utf8=y

# IPv6 support
CONFIG_PACKAGE_6in4=y
CONFIG_PACKAGE_6to4=y
CONFIG_PACKAGE_6rd=y

# IPv6 NAT support (ip6tables NAT extensions, ipt-nat6 and nf-nat6 kmods)
CONFIG_PACKAGE_ip6tables-mod-nat=y

# WLAN/WPS support
CONFIG_PACKAGE_hostapd-utils=y
CONFIG_WPA_MSG_MIN_PRIORITY=4
CONFIG_PACKAGE_wpad-openssl=y
# CONFIG_PACKAGE_wpad-basic-wolfssl is not set
# CONFIG_PACKAGE_libustream-wolfssl is not set

# SSL certificates
CONFIG_PACKAGE_ca-certificates=y

# Luci (SSL from OpenSSL)
CONFIG_PACKAGE_luci-ssl-openssl=y
CONFIG_PACKAGE_luci-app-commands=y
CONFIG_PACKAGE_luci-app-sqm=y
CONFIG_PACKAGE_luci-app-dawn=y

# Luci statistics
CONFIG_PACKAGE_luci-app-statistics=y
CONFIG_PACKAGE_collectd-mod-conntrack=y
CONFIG_PACKAGE_collectd-mod-cpufreq=y
CONFIG_PACKAGE_collectd-mod-entropy=y
CONFIG_PACKAGE_collectd-mod-ping=y
CONFIG_PACKAGE_collectd-mod-sqm=y
CONFIG_PACKAGE_collectd-mod-thermal=y
CONFIG_PACKAGE_collectd-mod-uptime=y

# nlbwmon app
CONFIG_PACKAGE_luci-app-nlbwmon=y

# chaoskey TRNG USB dongle
CONFIG_PACKAGE_kmod-chaoskey=y

Firewall software stream download disabled?

thanks

Yep turn software offloading off.

I added this to my /etc/rc.local file to link wifi with the Ethernet interfaces:

# NSS Firewall Tweaks
iptables -D FORWARD -m physdev --physdev-is-bridged -j ACCEPT
iptables -I FORWARD 1 -m physdev --physdev-is-bridged -j ACCEPT

perfect! what are those lines supposed to do, is wifi traffic supported by nss? I have several wifis created

the governor lines and frequencies in local rc. are no longer necessary?
Thank you

# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

# min scaling frequency: set to 800MHz because of L2 cache issues
echo 800000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
echo 800000 > /sys/devices/system/cpu/cpufreq/policy1/scaling_min_freq

sleep 1

# ondemand governor
echo ondemand > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
echo ondemand > /sys/devices/system/cpu/cpufreq/policy1/scaling_governor
echo 20 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold 
echo 60 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo 1000000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate

# NSS Firewall Tweaks
iptables -D FORWARD -m physdev --physdev-is-bridged -j ACCEPT
iptables -I FORWARD 1 -m physdev --physdev-is-bridged -j ACCEPT

exit 0

Wifi offloading still needs to be figured out. If offloads a small bit. NSS is successfully offloading SQM & wired routing (940mbps is now possible).

Regarding the NSS firewall - the iptables commands deletes the default bridge to the physical device and inserts a new bridge to the physical device with the parameter 1 (....don’t know what the 1 signifies, somehow is connecting the virtual NSS interface with the physical device?)

I’ve been trying the performance governor to see what my temps look like with max frequency NSS + main CPU.

The L2 issues have been fixed so you can delete the sleep 1 line. The default is ondemand so you can delete those lines as well.

This is my /etc/rc.local file:


# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

# Ondemand Governor Tweaks
# 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
# echo 60 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
# echo 1000000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate

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

# NSS Firewall Tweaks
iptables -D FORWARD -m physdev --physdev-is-bridged -j ACCEPT
iptables -I FORWARD 1 -m physdev --physdev-is-bridged -j ACCEPT

# Shape ingress traffic to 500 Mbit with chained NSSFQ_CODEL
# tc qdisc add dev nssifb root handle 1: nsstbl rate 500Mbit burst 1Mb
# tc qdisc add dev nssifb parent 1: handle 10: nssfq_codel limit 10240 flows 1024 quantum 1514 target 5ms interval 100ms set_default

# Shape egress traffic to 34 Mbit with chained NSSFQ_CODEL
tc qdisc add dev eth0 root handle 1: nsstbl rate 34Mbit burst 1Mb
tc qdisc add dev eth0 parent 1: handle 10: nssfq_codel limit 10240 flows 1024 quantum 1514 target 5ms interval 100ms set_default

exit 0

2 Likes

You got it all overruled from what I see

I will have to adapt the last line to my 600mb / 600mb connection, I imagine.

When SQM activates it, I have about 60mb in direct download, but if I deactivate it if I reach the total of my line, thank you !!!!!

Yep - I have FQ Codel offloaded to the NSS if I choose. Currently I have some bufferbloat issues on the upload for my asymmetric 940/35 internet. Setting the egress to 34 works well. Download fq codel is turned off and getting full line rate :sunglasses:

2 Likes

Entiendo que mi sqm, estará recibiendo carga y por eso guarda 60mb de ancha de banda, con sqm activo solo obtengo 550mb de 600mb

1 Like

the internet never forgets.

1 Like

I've been testing the firmware for a few days and it's going really well, zero problems. overall performance seems to be improved, placebo effect?

very happy in general, thank you very much.

Agreed. I’m running it on three r7800’s and performance is better. :sunglasses:

Hi,
I've flashed https://github.com/ACwifidude/openwrt/tree/kernel5.4-nss-qsdk10.0/bin/targets/ipq806x/generic on my new R7800 (previously only tested the stock firmware for a day) and I am experiencing abysmal wifi performance.

My wan is ~120/12 mbit (pppoe), I am getting full speeds over ethernet, but only 10/12 on wifi (both 2.4/5ghz, different devices - win10 laptops). I was getting full speeds also on wifi on the stock firmware before.

Things I did after I flashed openwrt (factory with tftp, so no old settings carried over):

  1. added some static dhcp leases + forwarded 5 ports,
  2. set wan pppoe login/pwd and dns to 1.1.1.1 i 1.0.0.1 (only on wan interface, not sure if that's the proper place if I want all the clients to use these dns)
  3. then I set identical ssid for 2.4 i 5ghz, with the same password, security "WPA2-PSK/WPA3 SAE Mixed Mode", channel "auto", ("40 mhz" width on 2.4ghz) and checked the "802.11r Fast Transition" checkbox (I've read somewhere it might help with automatic switching between 2.4 & 5 depending on the signal strength)
  4. added additional "guest" ssid on 2.4 ghz with different name and security set to "WPA2-PSK" and checked "Advanced Settings -> Isolate Clients"
    ...and that's it, I didn't touch other settings (e.g. firewall or qos)

I thought, maybe WPA3 is slowing things down? So then I set the security to "WPA2-PSK" for all ssids, then I turned off "802.11r", then I turned off all ssids except the main 2.4ghz (5ghz also turned off), manually set channel 6 on 2.4ghz, 20mhz width... but none of these steps helped anything.

Download speed is still ~10mbps :frowning:
Also: wifi<->lan transfers are just as slow (wifi to a NAS on ethernet) - so WAN connection is out of the equation. Measured 10mbps download / 25mbps upload.

What could be wrong? :thinking: Should I try flashing the latest stable release instead?

The NSS build has similar wifi performance to master.

I’d have a separate SSID for 2.4ghz and 5ghz. 2.4 ghz has tons of interference problems, a narrow bandwidth, and is less than desirable for anything beyond simple IoT connections. If you are looking for optimal performance- I’d eliminate the guest virtual wifi interface.

Virtual wifi interfaces have been causing big performance issues.

Connect to the 5ghz SSID and post a speedtest.net test.

@ACwifidude it indeed goes full speed when only 5ghz is enabled.

Something in my case is force limiting the speed of 2.4ghz, even if it's the only ssid enabled (guest ssid removed, 5ghz disabled) and capping the speed down to ~10 mbps. Very weird.

Like I said it was going full speed on 2.4 on the stock r7800 firmware and also on my previous tp-wr1043nd v2 router on old openwrt/gargoyle v1.10... so the environmental interference could not go that bad all of sudden :thinking: I hope it's "only" a matter of some (unknown to me) config toggle.

Well, I still can try flashing another build (e.g. kong, release) and I will report back.

OEM wifi is NSS accelerated so it’ll get a little more performance. I’d make your ondemand settings more aggressive or run the performance governor to have your main CPU at max performance for testing.

Ex:


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

Below are my 2.4ghz settings. Performance Specifics- have it to 20mhz channel (few devices support 40mhz in the 2.4ghz spectrum), have it set to the channel with the least interference (pick - 1,6,11), turned legacy rates off, and running psk2+Forced AES.


root@OpenWrt:~# cat /etc/config/wireless

config wifi-device 'radio1'
        option type 'mac80211'
        option channel '11'
        option hwmode '11g'
        option path 'soc/1b700000.pci/pci0001:00/0001:00:00.0/0001:01:00.0'
        option htmode 'HT20'
        option txpower '20'
        option country 'US'
        option legacy_rates '0'
        option beacon_int '191'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid ''
        option encryption 'psk2+ccmp'