Ping latency on single core CPU

I get strange ping latency values on a single core cpu.

OpenWrt is in bridge mode. I'm pinging my internet router from a wifi-connected computer.

PING 192.168.10.1 (192.168.10.1): 56 data bytes
64 bytes from 192.168.10.1: icmp_seq=0 ttl=64 time=5.849 ms
64 bytes from 192.168.10.1: icmp_seq=1 ttl=64 time=20.470 ms
64 bytes from 192.168.10.1: icmp_seq=2 ttl=64 time=35.215 ms
64 bytes from 192.168.10.1: icmp_seq=3 ttl=64 time=11.874 ms
64 bytes from 192.168.10.1: icmp_seq=4 ttl=64 time=27.679 ms
64 bytes from 192.168.10.1: icmp_seq=5 ttl=64 time=6.851 ms
64 bytes from 192.168.10.1: icmp_seq=6 ttl=64 time=24.000 ms
64 bytes from 192.168.10.1: icmp_seq=7 ttl=64 time=2.420 ms
64 bytes from 192.168.10.1: icmp_seq=8 ttl=64 time=20.220 ms
64 bytes from 192.168.10.1: icmp_seq=9 ttl=64 time=1.289 ms
64 bytes from 192.168.10.1: icmp_seq=10 ttl=64 time=18.686 ms
64 bytes from 192.168.10.1: icmp_seq=11 ttl=64 time=32.953 ms
64 bytes from 192.168.10.1: icmp_seq=12 ttl=64 time=8.086 ms
64 bytes from 192.168.10.1: icmp_seq=13 ttl=64 time=27.973 ms
64 bytes from 192.168.10.1: icmp_seq=14 ttl=64 time=5.244 ms
64 bytes from 192.168.10.1: icmp_seq=15 ttl=64 time=21.581 ms
64 bytes from 192.168.10.1: icmp_seq=16 ttl=64 time=1.311 ms
64 bytes from 192.168.10.1: icmp_seq=17 ttl=64 time=16.543 ms
64 bytes from 192.168.10.1: icmp_seq=18 ttl=64 time=32.582 ms
64 bytes from 192.168.10.1: icmp_seq=19 ttl=64 time=11.151 ms
64 bytes from 192.168.10.1: icmp_seq=20 ttl=64 time=26.976 ms
64 bytes from 192.168.10.1: icmp_seq=21 ttl=64 time=2.517 ms
64 bytes from 192.168.10.1: icmp_seq=22 ttl=64 time=21.849 ms
64 bytes from 192.168.10.1: icmp_seq=23 ttl=64 time=1.564 ms
64 bytes from 192.168.10.1: icmp_seq=24 ttl=64 time=15.544 ms
64 bytes from 192.168.10.1: icmp_seq=25 ttl=64 time=35.097 ms
64 bytes from 192.168.10.1: icmp_seq=26 ttl=64 time=12.783 ms
64 bytes from 192.168.10.1: icmp_seq=27 ttl=64 time=31.315 ms
64 bytes from 192.168.10.1: icmp_seq=28 ttl=64 time=8.800 ms
64 bytes from 192.168.10.1: icmp_seq=29 ttl=64 time=27.754 ms

What exactly is wrong? It responds so the connection works.

Time is all over the place ?

Then again, OP haven't told is anything about his router or ISP.

Yea, but

What ping times are we expecting to begin with?

If you want stable times, don’t ping through wifi because that is a very very very super very time slot controlled data in block movements.

2 Likes

If I try pinging my router through wifi the time responces moves in long repeating cycles between about 12ms and 2ms, pretty much similar to your repeating cycles.

But if I ping something far away like google at 8.8.8.8 the ping times get a lot more stable at around 30ms with only decimal variation.

But still, once the actual radio transmission is done for every ping the internal network use Gbit speed. But the wired internal network speed is a lot faster than the ISP speed I have.

This is pinging the openwrt wifi bridge. This is, what I would expect with your 'very very super very time slot controlled data'.

As soon as I try pinging my internet router behind the openwrt wifi bridge, I get the result of my first posting.

Linux seems to have a separate kernel process for the MT76 WiFi transmitter. The irregular latency might come from the kernel scheduler. It's a MIPS single core CPU, 580 MHz (MT7628AN).

PING 192.168.10.7 (192.168.10.7): 56 data bytes
64 bytes from 192.168.10.7: icmp_seq=0 ttl=64 time=5.082 ms
64 bytes from 192.168.10.7: icmp_seq=1 ttl=64 time=1.007 ms
64 bytes from 192.168.10.7: icmp_seq=2 ttl=64 time=1.314 ms
64 bytes from 192.168.10.7: icmp_seq=3 ttl=64 time=1.429 ms
64 bytes from 192.168.10.7: icmp_seq=4 ttl=64 time=1.006 ms
64 bytes from 192.168.10.7: icmp_seq=5 ttl=64 time=1.008 ms
64 bytes from 192.168.10.7: icmp_seq=6 ttl=64 time=0.973 ms
64 bytes from 192.168.10.7: icmp_seq=7 ttl=64 time=1.013 ms
64 bytes from 192.168.10.7: icmp_seq=8 ttl=64 time=0.967 ms
64 bytes from 192.168.10.7: icmp_seq=9 ttl=64 time=0.994 ms
64 bytes from 192.168.10.7: icmp_seq=10 ttl=64 time=0.955 ms
64 bytes from 192.168.10.7: icmp_seq=11 ttl=64 time=1.969 ms
64 bytes from 192.168.10.7: icmp_seq=12 ttl=64 time=3.878 ms
64 bytes from 192.168.10.7: icmp_seq=13 ttl=64 time=0.882 ms
64 bytes from 192.168.10.7: icmp_seq=14 ttl=64 time=0.969 ms
64 bytes from 192.168.10.7: icmp_seq=15 ttl=64 time=0.965 ms
64 bytes from 192.168.10.7: icmp_seq=16 ttl=64 time=1.035 ms
64 bytes from 192.168.10.7: icmp_seq=17 ttl=64 time=1.141 ms
64 bytes from 192.168.10.7: icmp_seq=18 ttl=64 time=4.009 ms
64 bytes from 192.168.10.7: icmp_seq=19 ttl=64 time=1.404 ms
64 bytes from 192.168.10.7: icmp_seq=20 ttl=64 time=0.965 ms
64 bytes from 192.168.10.7: icmp_seq=21 ttl=64 time=0.990 ms
64 bytes from 192.168.10.7: icmp_seq=22 ttl=64 time=1.010 ms
64 bytes from 192.168.10.7: icmp_seq=23 ttl=64 time=0.934 ms
64 bytes from 192.168.10.7: icmp_seq=24 ttl=64 time=0.990 ms
64 bytes from 192.168.10.7: icmp_seq=25 ttl=64 time=1.030 ms
64 bytes from 192.168.10.7: icmp_seq=26 ttl=64 time=3.305 ms
64 bytes from 192.168.10.7: icmp_seq=27 ttl=64 time=3.186 ms
64 bytes from 192.168.10.7: icmp_seq=28 ttl=64 time=1.211 ms
64 bytes from 192.168.10.7: icmp_seq=29 ttl=64 time=1.904 ms

The wifi bridge is OpenWrt on Mediatek MT7628AN (MIPS, single core, 580 MHz), address 192.168.10.7.

The wifi bridge runs in AP mode. The only station is my computer.

The wifi bridge is connected by 100 Mbit/s to the ping target 192.168.10.1

No internet connection used.

Ping from the computer (192.168.10.230) over wifi to the wifi bridge (192.168.10.7) is around 1 ms, with only a few other values up to 4 ms. That's what everyone expects.

Ping on the wifi bridge console (192.168.10.7) to the target (192.168.10.1) is 0.7 ms.

Ping from the computer (192.168.10.23) to the router behind the wifi bridge (192.168.10.1) is what you see in my initial posting. I would expect both times added, plus some overhead. But not the values in my initial posting.