by vel0city · 4y ago · 0 comments
With an Intel AX201 WiFi chip connecting to a UniFi6 Lite my average latency is 1ms to the router.
Even a cheap and somewhat compromised WiFi chipset/antenna can do way better than 30-50ms latency. Here's an original Pi Zero W connecting through the same AP hitting the local router:
64 packets transmitted, 64 received, 0% packet loss, time 156ms rtt min/avg/max/mdev = 2.293/6.699/63.116/7.364 ms
This is while I've got streaming music playing on my phone on WiFi connected to Bluetooth headphones, streaming video on the WiFi TV, and other wireless network traffic happening.
A 63ms delay on some packets can totally ruin the user experience even if the average is relatively low... and this is the best a near-optimal (in the real world) setup can do.
If you left your test running longer than 64 packets, I'm sure you would see at least a 100ms max. GP wasn't far-off with their assertion that running on WiFi can easily add 30-50ms of latency. Their wording was a bit loose though.
If we only looked at max values then Amazon isn't 2 day shipping it's like 1 month because some delivery sometime took that long, even though like 95% of deliveries are within two days (just an example, don't know what their actual rates are)
And on top of that, that's with an extremely cheap chip with a compromised antenna inside a network closet with a TCXO literally right on top of the antenna running on 2.4FHz. My 5GHz example with a nice AX chip and decent laptop lid edge antenna never experienced any pings higher than 1ms.
The test uses 64 packages which is a tiny sample size for streaming use. If we blindly scale that up you would hit the max several dozen times per minute.
> If we only looked at max values then Amazon isn't 2 day shipping it's like 1
A better example: Imagine your tongue just stops moving once every minute and then tries to catch up with what you where doing, imagine this will happen for the next two months. It is just a minor annoyance, right?
A person I know was diagnosed with tinnitus. And it (the diagnosis) made him happy. For over a year he was frustrated, nervous, but he didn't know why. Turns out he was hearing noise all that time, but just didn't realize it. Sounds (pun not intended) ridiculous, but that's how the mind works.
So if a video frame consists of 64 packets, the whole frame will be delayed by 63.1ms.
Yes there are ways around this (FEC), but getting 1ms 99%ile latency over wifi IRL is nontrivial.
Btw fat-client PCs have much smaller latency spikes, but even those spikes are noticable and make games feel jittery. That's why we compare GPUs based on "1% lows" instead of average FPS. Also see frame pacing.
Streaming video is extremely nontrivial to start with. Use FEC when necessary.
Also I just threw a thousand 1400B packets over my wifi and 99% was something like 5ms, max 10ms. 5ms is close enough for me, and I could probably hit 2ms with light effort.
Btw you almost certainly tested on an unloaded connection so you're not seeing any HOL blocking like a real video stream would. Try playing a 20mbps YouTube video in the background while you ping. Oh and turn on a microwave oven when you're 3 walls (a room and a hallway) away from the AP for extra hilarity on the order of 80ms
Ping statistics for router.home.lan:
Packets: Sent = 793, Received = 793, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 5ms, Average = 1msAnd you don't need to use webrtc, or you can add your own FEC on top for your client software.
And yes a 4k YouTube video makes it worse but "don't do that" is a valid response and realtime video won't be so bursty. I can get a very nice ping while more stable bandwidth hogs are running. Microwave is also "don't do that".
Over here in the urbanized world it's a whole different world of pain.
I live walking distance to a train to take me to an airport non stop around the world.
Try again.