Ping Issue Regarding SQM

Hi,

So while I was playing Tekken 7, a fighting game dependent on low ping, on my laptop's WiFi card, I get occassional stutters. I then decide to try using my phone as a USB tether to the laptop, only to have buttery-smooth gameplay. I was dumbfounded at this discovery. How could my phone give such latency free play?

I have implemented SQM into the router to reduce latency, but sometimes when I do a ping test to Google, a sudden spike of over 1000 ms occurs. Usually, the ping is under 60 under normal packets but occassionally rises to 70, 80, or even 100+ (and the aforementioned 1000+ ping)

Is there a possible explanation as to why this occurs? If so, is there a way to mitigate such ping spikes?

No other wifi clients than the laptop connected to the phone?
Just connect also all your other wifi devices to the phone, and then see if the connection is still latency free...

You forgot to tell us anything about your router, connection and SQM settings. (and what kind of other traffic there possible is)

I used USB Tethering so that my laptop can access the internet via the phone.

My bad.
Router: TP-Link Archer C20 v4 (OpenWRT version 19.07.3)
Connection: Fiber to the Premises

SQM:



You are comparing apples with oranges here, WFi is a shared, but not very well managed resource, while GSM/LTE/5G is something where the basestation has considerable control over the scheduling of all stations, allowing to harmonize them. While in wifi things like cyclic frequency scans happen, during which a station will loose access to the AP on purpose to see what else is around on other channels (and these scans in turn cause cyclic latency spikes, e.g. notoriuos for that is apples location service)...

To figure out whether SQM is making things worse you can:
a) try to connect the laptop with an ethernet cable to the router, to rule out wifi

b) Look at the output of tc -s qdisc the pk_delay/peak delay counter will tell you about how much internal latency cake observed, if that is in the range of the observed spikes SQM might be involved in your problem. Often when that happens the root cause is CPU overload, so cake will not be able to send packets in time, and both throughput tanks and latency/jitter increase.

Here's the attached output:

qdisc noqueue 0: dev lo root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 18686764827 bytes 60838965 pkt (dropped 13, overlimits 0 requeues 1708)
 backlog 0b 0p requeues 1708
  maxpacket 1514 drop_overlimit 0 new_flow_count 3827 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev eth0.1 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc cake 800d: dev eth0.2 root refcnt 2 bandwidth 7900Kbit besteffort triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms noatm overhead 44
 Sent 406916499 bytes 499153 pkt (dropped 16, overlimits 688547 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 98560b of 4Mb
 capacity estimate: 7900Kbit
 min/max network layer size:           28 /    1500
 min/max overhead-adjusted size:       72 /    1544
 average network hdr offset:           14

                  Tin 0
  thresh       7900Kbit
  target          5.0ms
  interval      100.0ms
  pk_delay       16.3ms
  av_delay        6.4ms
  sp_delay        461us
  backlog            0b
  pkts           499169
  bytes       406938765
  way_inds          592
  way_miss         1748
  way_cols            0
  drops              16
  marks               0
  ack_drop            0
  sp_flows            1
  bk_flows            1
  un_flows            0
  max_len         11952
  quantum           300

qdisc ingress ffff: dev eth0.2 parent ffff:fff1 ----------------
 Sent 565579428 bytes 556277 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev br-lan root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev wlan0 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc cake 800e: dev ifb4eth0.2 root refcnt 2 bandwidth 9400Kbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100.0ms noatm overhead 44
 Sent 562174502 bytes 548249 pkt (dropped 8028, overlimits 869327 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 626976b of 4Mb
 capacity estimate: 9400Kbit
 min/max network layer size:           46 /    1500
 min/max overhead-adjusted size:       90 /    1544
 average network hdr offset:           14

                  Tin 0
  thresh       9400Kbit
  target          5.0ms
  interval      100.0ms
  pk_delay       12.4ms
  av_delay        3.5ms
  sp_delay         78us
  backlog            0b
  pkts           556277
  bytes       573462140
  way_inds         1100
  way_miss         1996
  way_cols            0
  drops            8028
  marks               0
  ack_drop            0
  sp_flows            6
  bk_flows            1
  un_flows            0
  max_len         13402
  quantum           300

qdisc noqueue 0: dev wlan1 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0

Apparently, the peak delay is just really low. I lowered the download and upload speeds so I guess it's stable now.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.