Packet loss and Latency R7800

Sent message

Let's call it in the vicinity of 400-500kbps both directions (i'm not clear on what's tx vs rx it depends on if you're capturing LAN or WAN packets).

so I suspect that bandwidth is not entirely the main issue here. Though with only 2Mbps there is a serialization delay issue 1500*8/2e6 = 6ms so you'll have potentially 6ms of jitter at best.

  • Also, do you know if your game randomly elects you as the server?
  • If so, is this when you experience that issue?
1 Like

GM everyone I finally got some sleep. Wow I feel better.

I would have no idea if I’m the host. I would think not considering the connection speed vs others using higher speed connections. One more thing to note I don’t host any games I’m always joining a game.

Would there be anyway to stop that or knowing I was?

moeller did you receive my message?

Not sure what that means...

Saw it, thanks. To recap in that complete iftop output the uplink had plenty of headroom, but the downlink was close to capacity, did you notice packetdrops and increased delay when taking that screenshot?

Yes, I just had no time to look at it yesterday.

I didn't see anything pop up but then again I was playing as normal and I was focused on the game. I did notice some lag in my hit detection when I was playing with my son.

Would you mind telling me what the downlink capacity was? If you can I'm at work right now can you please share the results with everyone please.

Thanks

If I understood you correctly you are using a 25/2 Mbps plan, so capacity would be around 25 Mbps, in the screenshot the peak values where 25.7/0.549. Now it is rather common for Cable ISPs to provision more bandwidth than it states in the contract so this does not necessarily signify downlink saturation, hence my judgement close to capacity. I hope this makes sense now.

Would the middle section represent where it is connecting to?

Yes, iftop will take the IP address and try to resolve the hostname (unless you use the -n command line argument).

snoop:

If it is, how would I know what xbox is connecting to and to who?

Well the second column will give you the IP address/hostname of the remote end-point of a connection (but without knowing the port that does not tell you much, especially in the light of CDN services that multiplex a multitude of websites). But as you can see from the fitst column on the WAN interface iftop only sees your external IP address so you will not be able to differentiate between the internal hosts.
But you can also run iftop on the interface facing inwards iftop -i br-lan which will show both internal and exteral hostnames/IP-addresses, but note that on br-lan the first column will have the remote address and the second the internal address. This is to be expected, since the directionality is in relation to the actual network interface and for an inward looking interface, the packets from-the-intenet will be sent-out to the internal network and those from-the-internal-network will be received, and the first iftop column is transmitting/sending (TX) and the second receving (RX). From man iftop :

DISPLAY
       When running, iftop uses the whole screen to display network usage. At the top of the display is a logarithmic scale  for
       the bar graph which gives a visual indication of traffic.

       The  main  part  of the display lists, for each pair of hosts, the rate at which data has been sent and received over the
       preceding 2, 10 and 40 second intervals. The direction of data flow is indicated by arrows, <= and =>. For instance,

       foo.example.com  =>  bar.example.com      1Kb  500b   100b
                        <=                       2Mb    2Mb    2Mb

       shows, on the first line, traffic from foo.example.com to bar.example.com; in the  preceding  2  seconds,  this  averaged
       1Kbit/s,  around half that amount over the preceding 10s, and a fifth of that over the whole of the last 40s. During each
       of those intervals, the data sent in the other direction was about 2Mbit/s. On the actual display, part of each  line  is
       inverted  to  give  a visual indication of the 10s average of traffic.  You might expect to see something like this where
       host foo is making repeated HTTP requests to bar, which is sending data back which saturates a 2Mbit/s link.

       By default, the pairs of hosts responsible for the most traffic (10 second average) are displayed at the top of the list.

       At the bottom of the display, various totals are shown, including peak traffic over the last 40s,  total  traffic  trans‐
       ferred (after filtering), and total transfer rates averaged over 2s, 10s and 40s.
1 Like

So, I'm thinking maybe prioritization limits (for each device) with Qos? Thinking out loud.

I would try first sqm-scripts with cake and per-internal-IP-fairness as that should share your link equally between your gaming devices and might actually do what you desire. So the first thing I would like to see is the output of:

tc -s qdisc
tc -d qdisc
cat /etc/config/sqm

to get an idea where you are standing in regards tp your sqm configuration and what we could do to improve it :wink:

You can always go wild with more targeted bespoke qos rules if you want to (@dlakelan would be an excellent source of information about that topic), but let's first try to figure out what is the the reason for your loss and latency issues...

Am I doing this in ssh terminal window, Putty?

:+1:

yup putty like there is no more tommorrow

1 Like

Before hand sqm should be in cake and a piece of cake right or it doesn't matter?
Am I putting in 1 script at a time like this?
tc -s qdisc enter
tc -d qdisc enter
cat /etc/config/sqm enter
Will something pop up to screen print?

I will be doing this around 12:30pm est.

putty 0.0.0.0 < routerip
tc -s qdisc [ENTER]
copy paste into notepad or here with </> code tag

repeat

Here is a bit of my "tc -s qdisc";

qdisc htb 1: dev ifb4tun0 root refcnt 2 r2q 10 default 16 direct_packets_stat 0 direct_qlen 32
 Sent 5584236 bytes 8969 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc fq_codel 110: dev ifb4tun0 parent 1:10 limit 1001p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn 
 Sent 5584236 bytes 8969 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 1365 drop_overlimit 0 new_flow_count 1516 ecn_mark 0
  new_flows_len 0 old_flows_len 2

Here is example cat /etc/config/sqm

config queue 'tun0'
	option download '23000'
	option upload '4000'
	option qdisc 'fq_codel'
	option script 'simple.qos'
	option qdisc_advanced '0'
	option linklayer 'none'
	option enabled '1'
	option interface 'tun0'
	option debug_logging '1'
	option verbosity '7'

It's pretty fault tolerant.... if it spits and error just copy paste again, or putty in again.... etc.

1 Like

Got it! Thank you!

Question for everyone. I can upgrade that line to 55 down and 5 up. What do you think? Cost is less than 10 dollars a month.

I'm going to wait before I do anything to see if we can figure things out.

Definitely do this, since you have a dedicated connection just for the game machines, this will likely be all you need

root@OpenWrt:~# tc -s qdisc
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 htb 1: dev eth0 root refcnt 9 r2q 10 default 18 direct_packets_stat 0 direct_qlen 1000
 Sent 614687593 bytes 5919669 pkt (dropped 1265, overlimits 198142 requeues 50557)
 backlog 0b 0p requeues 50557
qdisc fq_codel 120: dev eth0 parent 1:12 limit 1001p flows 1024 quantum 300 target 7.0ms interval 102.0ms memory_limit 4Mb ecn
 Sent 614687077 bytes 5919667 pkt (dropped 1265, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 1506 drop_overlimit 0 new_flow_count 1800006 ecn_mark 0
  new_flows_len 1 old_flows_len 11
qdisc fq_codel 130: dev eth0 parent 1:13 limit 1001p flows 1024 quantum 300 target 7.0ms interval 102.0ms memory_limit 4Mb ecn
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 110: dev eth0 parent 1:11 limit 1001p flows 1024 quantum 300 target 7.0ms interval 102.0ms memory_limit 4Mb ecn
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc ingress ffff: dev eth0 parent ffff:fff1 ----------------
 Sent 14238810168 bytes 10097629 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc mq 0: dev eth1 root
 Sent 213413304 bytes 306472 pkt (dropped 0, overlimits 0 requeues 839)
 backlog 0b 0p requeues 839
qdisc fq_codel 0: dev eth1 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 213413304 bytes 306472 pkt (dropped 0, overlimits 0 requeues 839)
 backlog 0b 0p requeues 839
  maxpacket 1514 drop_overlimit 0 new_flow_count 250 ecn_mark 0
  new_flows_len 0 old_flows_len 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 eth1.1 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc htb 1: dev ifb4eth0 root refcnt 2 r2q 10 default 16 direct_packets_stat 0 direct_qlen 32
 Sent 14409442707 bytes 10054517 pkt (dropped 29290, overlimits 8119477 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 110: dev ifb4eth0 parent 1:10 limit 1001p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 14409442707 bytes 10054517 pkt (dropped 29290, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 11756 drop_overlimit 0 new_flow_count 907099 ecn_mark 0
  new_flows_len 1 old_flows_len 2
qdisc noqueue 0: dev eth0.2 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
root@OpenWrt:~# root@OpenWrt:~# tc -s qdisc
-ash: root@OpenWrt:~#: not found
root@OpenWrt:~# qdisc noqueue 0: dev lo root refcnt 2
-ash: qdisc: not found
root@OpenWrt:~#  Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
-ash: syntax error: unexpected "("
root@OpenWrt:~#  backlog 0b 0p requeues 0
-ash: backlog: not found
root@OpenWrt:~# qdisc htb 1: dev eth0 root refcnt 9 r2q 10 default 18 direct_packets_stat 0 direct_qlen 1000
  new_flows_len 1 old_flows_len 2
-ash: qdisc: not found
root@OpenWrt:~#  Sent 614687593 bytes 5919669 pkt (dropped 1265, overlimits 198142 requeues 50557)
-ash: syntax error: unexpected "("
root@OpenWrt:~#  backlog 0b 0p requeues 50557
-ash: backlog: not found
root@OpenWrt:~# qdisc fq_codel 120: dev eth0 parent 1:12 limit 1001p flows 1024 quantum 300 target 7.0ms interval 102.0ms memory_limit 4Mb
ecn
-ash: qdisc: not found
root@OpenWrt:~#  Sent 614687077 bytes 5919667 pkt (dropped 1265, overlimits 0 requeues 0)
-ash: syntax error: unexpected "("
root@OpenWrt:~#  backlog 0b 0p requeues 0
-ash: backlog: not found
root@OpenWrt:~#   maxpacket 1506 drop_overlimit 0 new_flow_count 1800006 ecn_mark 0
-ash: maxpacket: not found
root@OpenWrt:~#   new_flows_len 1 old_flows_len 11
-ash: new_flows_len: not found
root@OpenWrt:~# qdisc fq_codel 130: dev eth0 parent 1:13 limit 1001p flows 1024 quantum 300 target 7.0ms interval 102.0ms memory_limit 4Mb
ecn
-ash: qdisc: not found
root@OpenWrt:~#  Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
-ash: syntax error: unexpected "("
root@OpenWrt:~#  backlog 0b 0p requeues 0
-ash: backlog: not found
root@OpenWrt:~#   maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
-ash: maxpacket: not found
root@OpenWrt:~#   new_flows_len 0 old_flows_len 0
-ash: new_flows_len: not found
root@OpenWrt:~# qdisc fq_codel 110: dev eth0 parent 1:11 limit 1001p flows 1024 quantum 300 target 7.0ms interval 102.0ms memory_limit 4Mb
ecn
-ash: qdisc: not found
root@OpenWrt:~#  Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
-ash: syntax error: unexpected "("
root@OpenWrt:~#  backlog 0b 0p requeues 0
-ash: backlog: not found
root@OpenWrt:~#   maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
-ash: maxpacket: not found
root@OpenWrt:~#   new_flows_len 0 old_flows_len 0
-ash: new_flows_len: not found
root@OpenWrt:~# qdisc ingress ffff: dev eth0 parent ffff:fff1 ----------------
-ash: qdisc: not found
root@OpenWrt:~#  Sent 14238810168 bytes 10097629 pkt (dropped 0, overlimits 0 requeues 0)
-ash: syntax error: unexpected "("
root@OpenWrt:~#  backlog 0b 0p requeues 0
-ash: backlog: not found
root@OpenWrt:~# qdisc mq 0: dev eth1 root
-ash: qdisc: not found
root@OpenWrt:~#  Sent 213413304 bytes 306472 pkt (dropped 0, overlimits 0 requeues 839)
-ash: syntax error: unexpected "("
root@OpenWrt:~#  backlog 0b 0p requeues 839
-ash: backlog: not found
root@OpenWrt:~# qdisc fq_codel 0: dev eth1 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ec
n
-ash: qdisc: not found
root@OpenWrt:~#  Sent 213413304 bytes 306472 pkt (dropped 0, overlimits 0 requeues 839)
-ash: syntax error: unexpected "("
root@OpenWrt:~#  backlog 0b 0p requeues 839
-ash: backlog: not found
root@OpenWrt:~#   maxpacket 1514 drop_overlimit 0 new_flow_count 250 ecn_mark 0
-ash: maxpacket: not found
root@OpenWrt:~#   new_flows_len 0 old_flows_len 0
-ash: new_flows_len: not found
root@OpenWrt:~# qdisc noqueue 0: dev br-lan root refcnt 2
-ash: qdisc: not found
root@OpenWrt:~#  Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
-ash: syntax error: unexpected "("
root@OpenWrt:~#  backlog 0b 0p requeues 0
-ash: backlog: not found
root@OpenWrt:~# qdisc noqueue 0: dev eth1.1 root refcnt 2
-ash: qdisc: not found
root@OpenWrt:~#  Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
-ash: syntax error: unexpected "("
root@OpenWrt:~#  backlog 0b 0p requeues 0
-ash: backlog: not found
root@OpenWrt:~# qdisc htb 1: dev ifb4eth0 root refcnt 2 r2q 10 default 16 direct_packets_stat 0 direct_qlen 32
-ash: qdisc: not found
root@OpenWrt:~#  Sent 14409442707 bytes 10054517 pkt (dropped 29290, overlimits 8119477 requeues 0)
-ash: syntax error: unexpected "("
root@OpenWrt:~#  backlog 0b 0p requeues 0
-ash: backlog: not found
root@OpenWrt:~# qdisc fq_codel 110: dev ifb4eth0 parent 1:10 limit 1001p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit
 4Mb ecn
-ash: qdisc: not found
root@OpenWrt:~#  Sent 14409442707 bytes 10054517 pkt (dropped 29290, overlimits 0 requeues 0)
-ash: syntax error: unexpected "("
root@OpenWrt:~#  backlog 0b 0p requeues 0
-ash: backlog: not found
root@OpenWrt:~#   maxpacket 11756 drop_overlimit 0 new_flow_count 907099 ecn_mark 0
-ash: maxpacket: not found
root@OpenWrt:~#   new_flows_len 1 old_flows_len 2
-ash: new_flows_len: not found
root@OpenWrt:~# qdisc noqueue 0: dev eth0.2 root refcnt 2
-ash: qdisc: not found
root@OpenWrt:~#  Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
-ash: syntax error: unexpected "("
root@OpenWrt:~#  backlog 0b 0p requeues 0
-ash: backlog: not found
root@OpenWrt:~# qdisc noqueue 0: dev wlan0 root refcnt 2
-ash: qdisc: not found
root@OpenWrt:~#  Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
-ash: syntax error: unexpected "("
root@OpenWrt:~#  backlog 0b 0p requeues 0
-ash: backlog: not found
root@OpenWrt:~# tc -d qdisc
qdisc noqueue 0: dev lo root refcnt 2
qdisc htb 1: dev eth0 root refcnt 9 r2q 10 default 18 direct_packets_stat 0 ver 3.17 direct_qlen 1000
 linklayer ethernet overhead 22
qdisc fq_codel 120: dev eth0 parent 1:12 limit 1001p flows 1024 quantum 300 target 7.0ms interval 102.0ms memory_limit 4Mb ecn
qdisc fq_codel 130: dev eth0 parent 1:13 limit 1001p flows 1024 quantum 300 target 7.0ms interval 102.0ms memory_limit 4Mb ecn
qdisc fq_codel 110: dev eth0 parent 1:11 limit 1001p flows 1024 quantum 300 target 7.0ms interval 102.0ms memory_limit 4Mb ecn
qdisc ingress ffff: dev eth0 parent ffff:fff1 ----------------
qdisc mq 0: dev eth1 root
qdisc fq_codel 0: dev eth1 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
qdisc noqueue 0: dev br-lan root refcnt 2
qdisc noqueue 0: dev eth1.1 root refcnt 2
qdisc htb 1: dev ifb4eth0 root refcnt 2 r2q 10 default 16 direct_packets_stat 0 ver 3.17 direct_qlen 32
 linklayer ethernet overhead 22
qdisc fq_codel 110: dev ifb4eth0 parent 1:10 limit 1001p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
qdisc noqueue 0: dev eth0.2 root refcnt 2
qdisc noqueue 0: dev wlan0 root refcnt 2
root@OpenWrt:~# cat /etc/config/sqm

config queue 'eth1'
        option qdisc_advanced '0'
        option debug_logging '0'
        option verbosity '5'
        option linklayer 'ethernet'
        option overhead '22'
        option enabled '1'
        option interface 'eth0'
        option download '24991'
        option upload '1992'
        option linklayer_advanced '1'
        option tcMTU '2047'
        option tcTSIZE '128'
        option tcMPU '0'
        option linklayer_adaptation_mechanism 'default'
        option qdisc 'fq_codel'
        option script 'simple.qos'

I hope I did it right...

2 Likes