R7800 performance


#1

With latest snapshot or even latest release, wifi tops out at ~300 mbps as does wired from lan->wan. I ran top and CPU is not even close to being maxed out when I do a speedtest, so doesn't seem like a lack of hardware forwarding as the issue if I analyzed correctly. Where is the bottle neck here?

I put the stock firmware back on and then I see 620mbps wifi, and 920mbps wired. (1 gbps cable modem)

Could there be any mis-configuration on my part? Please help I want openwrt firmware back.


#2

My understanding is with OpenWrt 18.06 or Master builds, kernel 4.14 has flow offloading enabled and you should have no problem reaching 900Mbits. It won't be quite as fast as OEM firmware because of proprietary hardware NAT but it should be close.

Did you try hnyman's latest build: Build for Netgear R7800


#3

Needs to be toggled on in firewall config.


#4

Thanks. Try that, enable it, and report back on your speed, curious how it does :slight_smile: My cable is "only" 500Mbits.


Speedtest: new package to measure network performance
#5

I'm running a vanilla master build with software flow offloading, and I noticed that the CPU wasn't running at its fastest frequency while benchmarking WAN<->LAN. Speeds consistently topped out at 600Mbps on a gigabit link.

Governor Consistent Speed Power Consumption while idle
ondemand (default) ~600 Mbps <= 6.9W
ondemand (tweaked) ~850Mbps <= 6.9W
performance ~850Mbps >= 6.9W

Tweaked settings for ondemand scheduler:
echo 35 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor

Hope this helps.


SQM fine in 17.01.4, can't keep up with line speed in 18.06 (Netgear R7800)
Netgear R7800 exploration (IPQ8065, QCA9984)
Build for Netgear R7800
#6

Enabling software flow offloading in firewall config: helped with fq_codel/simple, but not with cake/piece_of_cake

Tweaking ondemand governor settings as suggested by @ddwrt_refugee helped with both cake/piece_of_cake and fq_codel/simple, with or without flow offloading. With both governor tweaks and SW flow offloading, I got line speeds with fq_codel/simple.

Hardware+software flow offloading made no difference vs. software-only. Can't tell if R7800 hardware is supported?


#7

Hardware offloading is not supported. It only works for just a few targets. MT762x or so.


#8

Has anybody tracked down, where the original values come from ? It is likely in Linux kernel, but have the values been tweaked for specific processors? Or just for a generic architecture family?

If the original values have been drafted for basic calculation tasks, it might well be that sporadic irq driven network traffic needs different values like discussed above.

EDIT:
Based on a brief look at the kernel docs, it might be that the default 95% originates from the Linux kernel itself and no CPU-family specific tailoring has been made.

https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt

  • up_threshold:

    This defines what the average CPU usage between the samplings of
    'sampling_rate' needs to be for the kernel to make a decision on
    whether it should increase the frequency. For example when it is set
    to its default value of '95' it means that between the checking
    intervals the CPU needs to be on average more than 95% in use to then
    decide that the CPU frequency needs to be increased.

Might quite well be that the default for Openwrt should be changed, as the IRQ driven load by network traffic may not generate constant 95% load.

35% sounds maybe a bit low, though.

EDIT2:
Looks like the default values are hard-coded to Linux. no config options:

This line https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/cpufreq/cpufreq_ondemand.c?h=linux-4.14.y#n372

dbs_data->up_threshold = MICRO_FREQUENCY_UP_THRESHOLD;

simply sets the value set in https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/cpufreq/cpufreq_ondemand.c?h=linux-4.14.y#n27

#define MICRO_FREQUENCY_UP_THRESHOLD (95)

Same for sampling_down_factor.


#9

One other thing is the division of IRQs on CPU cores. By default all IRQs get assigned to core0, so the load is not split evenly. You might look into R7800 IRQ discussion in R7800 exploration thread, and e.g. to irqbalance

(also manually doing IRQ splitting to cores is possible.)


#10

(also manually doing IRQ splitting to cores is possible.)

I found pinning eth0 / eth1 on their respective CPUs to be a crucial step. It gave me better performance in bufferbloat tests, opposed to running irqbalance without any configuration.

I've used this doc as a guideline: https://digitalpubliclibraryofamerica.atlassian.net/wiki/spaces/TECH/pages/24510493/Using+irqbalance+and+SMP+IRQ+affinity

However, I had issues with irqbalance in the past (like 8 - 10 months ago), leading to spontaneous device reboots. Was running it on my NBG6817 though, not on my R7800. Did anyone else run into it here?


#11

This setting does not help with my WAN - LAN speeds. I'm only getting 300mbps maximum with the latest version of hymnan. Any other solution? :frowning: Thanks

Furthermore in earlier versions of hymnan the setting Tweaked settings for ondemand scheduler worked but after a while the device freezed and rebooted:
echo 35 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor


#12

Have you turn on Flow Offloading in Firewall page? I recently set up my R7800 by resetting all the settings, change only the Flow Offloading and the 2 line u mentioned.

with no SQM
My own Lan test peak at 700Mbps at dslreports
Comcast's XMT device Lan test reach 960Mbps


#13

Thanks for the hint.

  1. The following are the standard settings:

With this settings i am only getting 250-300mbps:

  1. As soon as i activate software and / or hardware flow offloading the speed is much better (maximum @430mbps)

    Speed:

    Which one is the best setting? I suppose hardware offloading, or? Thanks a lot for your hint!

I also tried other speed tests and direct downloads, the result is the same as seen in the speed test above (measuring network speed)

//Edit:

hnyman just said that only software flow offloading is available for the r7800


Build for Netgear R7800
#14

Thanks again for your hint but somehow after a lot of traffic load (Steam Downloads) and a lot of connections the R7800 crashed and restarted twice. I had the same issue after altering the up_trhreshold and sampling_down_factor after a while (2-3 days). Without altering this settings i never had the issue :frowning: I will try to reproduce the issue and gather some logs.

Anyone else with an idea how to fix this?


#15

single stream is always around 400-450 for me
using dslreport speed test can reach more than 700 at least

i also got crash, i just updated his latest no ct ver of firmware, i think using the old non ct should be the fix for crashing (i am not entirely sure but seems yes)


#16

The version master-r8447-1b4b942bce-20181110-ath10k crashed again today... :frowning: i will try now master-r8410-900005ee75-20181104-c

What about the master version? does it use ct or ath10k?


#17

It uses ct by default, but it's really easy to switch with 'make menuconfig'. I wonder why is it being an issue for you? I use yesterday's master with ath10k firmware driver and everything is rock solid and the speeds on 802.11ac are 850 mbit/s on average.


#18

not sure but it seems like enri experienced the same issue. What is your line speed? Maybe this is related to a higher bandwidth / more traffic on WAN?

Do you know how i can trace some log files when the error occurs?


#19

With gigabit speeds, you should likely forget about CPU frequency scaling "ondemand", and simply set the "performance" scaling governor.

Your crashes may be due to something going wrong with the scaling.

In general, there not been reports of R7800 crashing, so your case(s) seem rather unique, so far.

And you should try to separate the wifi part vs. generic router fixed line part. ath10k-ct or old ath10k have impact just on wifi. The interesting part si, if the crashes are due to the base system or the wifi firmware/driver.


#20

Thanks for your attention. But as a beginner i don't know how to troubleshoot this / gather logs. After the device crashes i have to turn it off and after the next start the systemlogs are gone... How do you do it to save logs?

Furthermore i did a complete factory reset and installed master-r8410-900005ee75-20181104-c. I'm using Adblock, DDNS, Dual Stack (ipv4 and ipv6) with software flow offloading enabled but without changing the ondemand scheduler. I will try to reproduce the crash today.