High latency on NanoPi R4S

I'm not sure exactly what that means. The R4S is passively cooled by the entire case being a heavy block of metal. Active cooling isn't really pragmatically possible, but I don't see any evidence for thermals being the issue.

You can try my builds meanwhile : https://github.com/anaelorlinski/OpenWrt-NanoPi-R2S-R4S-Builds/

1 Like

is qosify included in your 22.03 builds?

It was not until now. I added it in the full build, and started a new release

1 Like

Yes, I adapted a copper-based Intel cooler kit to my R4S. It always works below 35°.

I will test your build as soon as my new micro sd arrives.
I believe that with this new sd card now with A2 specification it will improve a lot. I see that storage speed has limited my NanoPi quite a bit.

I gave up waiting for operwrt release for r4s so I've been running armbian for probably 12 months. Out of curiosity I ran the ping tests on my up to date armbian nanopi r4s (22.05.3) with kernel (5.15.52-rockchip64 #22.05.4) and get similar results. My r4s is idle and cool.

64 bytes from localhost (::1): icmp_seq=1 ttl=64 time=0.250 ms
64 bytes from LAN: icmp_seq=2 ttl=64 time=0.252 ms
64 bytes from WAN: icmp_seq=2 ttl=64 time=0.290 ms

For comparison with my laptop:

64 bytes from macbookpro localhost: icmp_seq=0 ttl=64 time=0.065 ms

Set the governor to performance and you'll be very close to what you're getting from your laptop.

1 Like

Thanks kindly for the suggestion. It has mostly halved my latency:
With default ondemand govenor

ping -qc 5 localhost : rtt min/avg/max/mdev = 0.222/0.239/0.266/0.015 ms
ping -qc 5 LAN       : rtt min/avg/max/mdev = 0.130/0.227/0.291/0.060 ms
ping -qc 5 WAN       : rtt min/avg/max/mdev = 0.237/0.275/0.344/0.036 ms

After changing govenor to performance with

find /sys/devices/system/cpu/cpufreq/ -name scaling_governor | while read GOVERNOR ; do echo performance > $GOVERNOR ; done

I get improved latency results:

ping -qc 5 localhost: rtt min/avg/max/mdev = 0.136/0.142/0.149/0.005 ms
ping -qc 5 LAN      : rtt min/avg/max/mdev = 0.085/0.151/0.252/0.055 ms
ping -qc 5 WAN      : rtt min/avg/max/mdev = 0.104/0.148/0.203/0.036 ms

Some one have the stable 22.xx version running in his NanoPi R4S and have less latency ? or the issue still remainig?

It's not a code issue. By default, OpenWRT runs in a conservative mode that tries to balance energy savings versus performance, which results in higher latency. If you don't mind the higher power draw, performance mode will reduce latency (at the expense of increasing your power bill slightly). It's the end user's choice.

1 Like

Does it matter anyway? In what application can you notice an extra 300-500 microseconds of latency?

@rhester72
I really didn't know this.

@hmof I know it's not really something that matters too much, but I thought it was a problem that could not be solved.

As many of us want things that we do not need and even understand, I only wanted the best, I know that not even in a game, remote desktop, video call or IP voice I will notice those 200 or 500 micro seconds.

However, as I told you, with a Tp-link router I found out about the problem and that it was caused by the terrible firmware of the manufacturer and it had too much latency and I was left with psychosis about the subject.

Thank you both for the help.

This week I will test OpenWRT versions 22 on my NanoPi to see if it improves. Unfortunately my NanoPi keeps restarting when using performance mode.
I will post my report here after testing this system.

1 Like

Do you have a forecast for the release of a stable version of 22.03?

You can consider my recent 22.03 builds stable, I am running my R4S for more than a month with it as main router without issues

Hello,

I received my new sd card, I'm testing your system but I already found a problem. For some reason SMB doesn't work, I'm also prevented from installing the package "kmod-usb-storage" because of the kernel version "require 5.10.138-1-8b39088b… "
Otherwise it seems to be working fine. I will still test Wireguard.

Now I managed to make the mounts work, but the Policy Based Routing is not working properly. I configured everything correctly but it tries to apply the rules in "-t mangle -A PBR_PREROUTING" and this Append does not exist, I was forced to perform the settings manually switching to "-A PREROUTING", this way it works just fine.

So far I've been successful in my test, the device doesn't restart anymore when very required, it's even running smoothly in performance mode.

With the faster sd card, I also notice a big improvement.

I'll keep running it for a few weeks and see how it goes.

Thanks!

Hello,

Any update on this please?
I'm considering buying a nanopi R4SE and would love to hear your feedback about it.
I guess it doesn't have a switch chip, so the VLAN switching would be made by software. How would be the latency for that? Any experience?
Can it boot from USB (like using a SSD)?
How about docker capabilities? Can we use it together with OpenWRT (maybe adding PIhole, nexcloud, etc.)?

Thanks,
Joaoabs

This from hmof, and this from rhester72 ? Microseconds of latency would not be part of my decision process for a router. For context, Waveform considers 95th percentile latency below 40 milliseconds (that is 40,000 microseconds!!) good for gaming.

Latency on my R4S managing 5 vlans going out through a managed switch is no worse than the perfectly acceptable performance reported in this thread.

mercygroundabyss reports docker works well here. I haven't tried that myself, but the R4S is a very capable router.