Possible cause of R7800 latency issues

Am running that code for weeks and weeks now. Totally stable.

Just applied the patch and it seems to be running well, but it doesn't solve the ping issue. Pinging the next hop:

pc_to_r7800

It's just stalled. Need to bug the core team about it.

Can I get the exact script / setup for producing your plot?

I have both "old" and "new" r7800, let me try to reprod the issue.

The same here: no visible negative or positive impact on the latency spikes.

Ok, there could be something wrong with those patches: the value of BogoMIPS is stuck at 56.16 for CPU1 and is always at 6.00. If I set the governor to performance, then this value for CPU0 goes to 26.95, but the other one stays the same. Without the patches, the the behaved properly.

root@R7800:~# cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 0 (v7l)
BogoMIPS : 6.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32
CPU implementer : 0x51
CPU architecture: 7
CPU variant : 0x2
CPU part : 0x04d
CPU revision : 0

processor : 1
model name : ARMv7 Processor rev 0 (v7l)
BogoMIPS : 56.15
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32
CPU implementer : 0x51
CPU architecture: 7
CPU variant : 0x2
CPU part : 0x04d
CPU revision : 0

Hardware : Generic DT based system
Revision : 0000
Serial : 0000000000000000

When comparing the latest plot by @huaracheguarache to the relevant previous one, I'd say the patches have made it a bit worse...

I run the following command to get the latency:

ping -c 9001 -i 0.2 YOUR_FIRST_HOP > filename

Run a traceroute to say 8.8.8.8 and note the first hop that's not your router. Replace YOUR_FIRST_HOP with that ip and replace filename with a name of your choosing.

I use python3 to plot the ping with the following script:

https://www.dropbox.com/s/c7ag0r9ihw9itxj/ping_plot_r7800.py?dl=0

Run it with --help to get an overview of what you have to provide as input:

$ python3 ping_plot_r7800.py --help
usage: ping_plot_r7800.py [-h] --f FILENAME --i INTERVAL --c CUT_OFF
                          [--p MAX_PING]

Read filename and ping interval. Plot latency and print latency spike
percentage.

optional arguments:
  -h, --help    show this help message and exit
  --f FILENAME  filename or path to file if not in the same directory
  --i INTERVAL  interval between pings in seconds
  --c CUT_OFF   cut-off value for latency spikes
  --p MAX_PING  max ping limit on plot, default = 100ms

Just as an additional note: the cut-off value is the minimum value a ping has to have in order to be counted as a spike. This is used when calculating the percentage of spikes from the total number of pings.

The spikes appear a bit more spread out, but the percentage is pretty much the same (above 30 ms): 0.37%

The router also experienced a bit more network load during this test (streaming video and normal web traffic).

@fantom-x my output:

root@lulu:~# cat /proc/cpuinfo 
processor	: 0
model name	: ARMv7 Processor rev 0 (v7l)
BogoMIPS	: 6.00
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 
CPU implementer	: 0x51
CPU architecture: 7
CPU variant	: 0x2
CPU part	: 0x04d
CPU revision	: 0

processor	: 1
model name	: ARMv7 Processor rev 0 (v7l)
BogoMIPS	: 12.50
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 
CPU implementer	: 0x51
CPU architecture: 7
CPU variant	: 0x2
CPU part	: 0x04d
CPU revision	: 0

Hardware	: Generic DT based system
Revision	: 0000
Serial		: 0000000000000000

EDIT: I get the same values without the patch.

is this Latency issue on the R7800, just on Ethernet? or does it occur when using wifi?

I haven't really looked into WiFi because I fear that ath10k might be introducing it's own latency. I'm not sure the results would be very meaningful.

i Just wondered if the spikes were present when using WiFi only. If there are no latency spikes, as a casual user i will use WiFi until the Ethernet issue is fixed, if of course if it can be fixed.
I've noticed there is also various discussion on the DDWRT forum regarding this issue also on the R7800. From there forum this issue wasnt present on Kernel 3.18, but appears on 4.4, 4.9.

Could you provide a link to those discussions? It would be interesting to see what sort of issues they're experiencing.

https://www.dd-wrt.com/forum/viewtopic.php?t=289788&postdays=0&postorder=asc&start=0&sid=666b4679622fcf838e8bf74819700d1d

Its very interesting reading, all 139 pages of it!

1 Like

Yes, they are present and are reaching 300ms and above at times.

1 Like

Double-confirmed: one of my kids is on wifi (5G), he complains the loudest about the lag-spikes.

That is not very helpful. Can you point to the specific posts of interest?

That is not very helpful. Can you point to the specific posts of interest?

I found it very helpful, try around page 130 regarding the increased latency from kernel 4.*.

You can remove the variability of pinging over the WAN (if you want) by pinging the modem itself. I see the spikes doing that too.