SQM qos for cs:go

Hi everyone,

I have moved to a new location and I have a slow ADSL connection.
I have run a speedtest on my WRT3200ACM
Download = 8.82 Mbps
Upload = 0.83 Mbps

When I have some free time after work I like to play cs:go (counter strike) but if my girlfriend watch a streaming like netflix, molotov or youtube I got packet loss on cs:go that create lag (between 1 percent and 17 percent)
If no one is connected, I have 0 percent loss, no roll back, no lag

So I have downloaded sqm but seems not to help a lot in my case.
I have downloaded luci-app-qos or luci-app-nft-qos, qos on specific udp port 27000 to 27100, configured priority or limited the bandwidth pro mac address but I still had this packet loss in game.

I have limited the resolution on the TV (using fire TV) locked the quality to the lowest one with the lowest resolution ( I have 4K TV and I must watch movies in HD, that's sad lol)

What is the best way to solve this issue ?

Thanks

Regards

1 Like

start by posting your /etc/config/sqm in preformatted text please, so users here can help you out in a better way.

read the details here, cake and the per-host isolation part should help a lot with your issue, doing qos on specific port and/or dscp markings for specific app from windows is eventually something that come in to play after this..

1 Like

Thanks for your answer jesanor

here is my sqm settings :

config queue 'eth1'
       option ingress_ecn 'ECN'
       option debug_logging '0'
       option verbosity '5'
       option script 'piece_of_cake.qos'
       option qdisc_advanced '1'
       option squash_dscp '1'
       option squash_ingress '1'
       option linklayer 'atm'
       option overhead '44'
       option interface 'eth1.2'
       option qdisc 'cake'
       option enabled '1'
       option download '7480'
       option upload '705'
       option egress_ecn 'NOECN'
       option qdisc_really_really_advanced '1'
       option eqdisc_opts 'nat dual-srchost'
       option iqdisc_opts 'nat dual-dsthost ingress'

My eth1.2 is eq (wan,wan6) and behind this connector is my ADSL routeur from my internet provider (no wifi and no lan except the wrt3200)

I have read your link and just added the "nat dual-dsthost ingress" in the "Advanced option string to pass to the ingress queueing disciplines; no error checking, use very carefully."
and added "nat dual-srchost" into "Advanced option string to pass to the egress queueing disciplines; no error checking, use very carefully."

Will see this weekend if the behavior is better.

Regards

If you're running PPPoE and bridged ADSL, put the SQM on pppoe-wan not the eth port.

You may need to reverse "download" and "upload". Set SQM much slower than line speed then run speed tests to confirm it is working.

A full sized packet of 1500 bytes takes 1500*8/830 = 14ms and it's quite typical to get 2 or 3 of those ahead of your packet, so you'll experience a MINIMUM of 20 to 40 ms of jitter which is typically very noticeable on these reaction-oriented games.

That's the BEST you can do given your speeds with very good management of your queues.

Consider a 60hz monitor is displaying one frame every 16.7ms so your jitter will be between 1 and say 3 frames on this kind of monitor. If you have a high speed gaming monitor doing 144hz that's 7ms per frame, so 30ms of jitter is 4 frames or so... that's the BEST you can do.

1 Like

You wish :wink:

this is ADSL so probably ATM/AAL5 so
(ceil(1544/48)*53)*8/830 = 1749*8/830 = 16.86 ~ 17ms

(just kidding the 14ms estimate already carries the gist of the issue and the exact numbers are not that important)

yes those two option should give you best result for fairness between your gaming and girlfriend tv streaming, for egress you could add ack-filter for a little gain in egress bandwidth. post your results here after testing a bit, as you can read in other posts users here are way more competent and experienced than me i'm pretty sure some fine tuning/prioritization can be done with dscp markings.. but i'm no expert on this.

Please post the output of tc -s qdisc to see cake's internal statistics...

Thank you all for your reply ! Appreciate

@mk24 : On the sqm interface i have the following choice :
eth1
eth0
sit0
bond0
teql0
br-lan(lan)
eth0.1(lan)
eth1.2(wan,wan6)
wlan0(lan)
wlan1(lan)

@jesanor : I'm not sure where to put the ack-filter, I put it after the nat dual-srchost ?

@moeller0 : the output you asked for

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 mq 0: dev eth1 root
 Sent 8045629454 bytes 74727546 pkt (dropped 0, overlimits 0 requeues 6)
 backlog 0b 0p requeues 6
qdisc fq_codel 0: dev eth1 parent :8 limit 10240p flows 1024 quantum 1514 target                                                    5.0ms interval 100.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 0: dev eth1 parent :7 limit 10240p flows 1024 quantum 1514 target                                                    5.0ms interval 100.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 0: dev eth1 parent :6 limit 10240p flows 1024 quantum 1514 target                                                    5.0ms interval 100.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 0: dev eth1 parent :5 limit 10240p flows 1024 quantum 1514 target                                                    5.0ms interval 100.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 0: dev eth1 parent :4 limit 10240p flows 1024 quantum 1514 target                                                    5.0ms interval 100.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 0: dev eth1 parent :3 limit 10240p flows 1024 quantum 1514 target                                                    5.0ms interval 100.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 0: dev eth1 parent :2 limit 10240p flows 1024 quantum 1514 target                                                    5.0ms interval 100.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 0: dev eth1 parent :1 limit 10240p flows 1024 quantum 1514 target                                                    5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 8045629454 bytes 74727546 pkt (dropped 0, overlimits 0 requeues 6)
 backlog 0b 0p requeues 6
  maxpacket 1494 drop_overlimit 0 new_flow_count 5 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc mq 0: dev eth0 root
 Sent 4598822245 bytes 7408649 pkt (dropped 0, overlimits 0 requeues 36)
 backlog 0b 0p requeues 36
qdisc fq_codel 0: dev eth0 parent :8 limit 10240p flows 1024 quantum 1514 target                                                    5.0ms interval 100.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 0: dev eth0 parent :7 limit 10240p flows 1024 quantum 1514 target                                                    5.0ms interval 100.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 0: dev eth0 parent :6 limit 10240p flows 1024 quantum 1514 target                                                    5.0ms interval 100.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 0: dev eth0 parent :5 limit 10240p flows 1024 quantum 1514 target                                                    5.0ms interval 100.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 0: dev eth0 parent :4 limit 10240p flows 1024 quantum 1514 target                                                    5.0ms interval 100.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 0: dev eth0 parent :3 limit 10240p flows 1024 quantum 1514 target                                                    5.0ms interval 100.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 0: dev eth0 parent :2 limit 10240p flows 1024 quantum 1514 target                                                    5.0ms interval 100.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 0: dev eth0 parent :1 limit 10240p flows 1024 quantum 1514 target                                                    5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 4598822245 bytes 7408649 pkt (dropped 0, overlimits 0 requeues 36)
 backlog 0b 0p requeues 36
  maxpacket 4542 drop_overlimit 0 new_flow_count 29 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 eth0.1 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc cake 801c: dev eth1.2 root refcnt 2 bandwidth 705Kbit besteffort dual-srch                                                   ost nat nowash no-ack-filter split-gso rtt 100.0ms atm overhead 44
 Sent 2658390243 bytes 23403651 pkt (dropped 160425, overlimits 35611601 requeue                                                   s 0)
 backlog 0b 0p requeues 0
 memory used: 1655168b of 4Mb
 capacity estimate: 705Kbit
 min/max network layer size:           28 /    1500
 min/max overhead-adjusted size:      106 /    1749
 average network hdr offset:           14

                  Tin 0
  thresh        705Kbit
  target         25.8ms
  interval      120.8ms
  pk_delay      109.0ms
  av_delay       20.3ms
  sp_delay          6us
  backlog            0b
  pkts         23564077
  bytes      2758297530
  way_inds      1267230
  way_miss        88046
  way_cols            0
  drops          160425
  marks               0
  ack_drop            0
  sp_flows            2
  bk_flows            2
  un_flows            0
  max_len         16679
  quantum           300

qdisc ingress ffff: dev eth1.2 parent ffff:fff1 ----------------
 Sent 43655587801 bytes 31695505 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc mq 0: dev wlan0 root
 Sent 12541566490 bytes 10494906 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev wlan0 parent :4 limit 10240p flows 1024 quantum 1514 targe                                                   t 5.0ms interval 100.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 0: dev wlan0 parent :3 limit 10240p flows 1024 quantum 1514 targe                                                   t 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 12541318167 bytes 10493792 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 1514 drop_overlimit 0 new_flow_count 13 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan0 parent :2 limit 10240p flows 1024 quantum 1514 targe                                                   t 5.0ms interval 100.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 0: dev wlan0 parent :1 limit 10240p flows 1024 quantum 1514 targe                                                   t 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 248323 bytes 1114 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 mq 0: dev wlan1 root
 Sent 116143987105 bytes 81332858 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev wlan1 parent :4 limit 10240p flows 1024 quantum 1514 targe                                                   t 5.0ms interval 100.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 0: dev wlan1 parent :3 limit 10240p flows 1024 quantum 1514 targe                                                   t 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 116143479291 bytes 81329897 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 1514 drop_overlimit 0 new_flow_count 57 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan1 parent :2 limit 10240p flows 1024 quantum 1514 targe                                                   t 5.0ms interval 100.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 0: dev wlan1 parent :1 limit 10240p flows 1024 quantum 1514 targe                                                   t 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 507814 bytes 2961 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 cake 801d: dev ifb4eth1.2 root refcnt 2 bandwidth 7480Kbit besteffort dual                                                   -dsthost nat wash ingress no-ack-filter split-gso rtt 100.0ms atm overhead 44
 Sent 40341972540 bytes 29126657 pkt (dropped 2568848, overlimits 54086410 reque                                                   ues 0)
 backlog 0b 0p requeues 0
 memory used: 674048b of 4Mb
 capacity estimate: 7480Kbit
 min/max network layer size:           32 /    1500
 min/max overhead-adjusted size:      106 /    1749
 average network hdr offset:           14

                  Tin 0
  thresh       7480Kbit
  target          5.0ms
  interval      100.0ms
  pk_delay        7.7ms
  av_delay        1.8ms
  sp_delay          2us
  backlog            0b
  pkts         31695505
  bytes     44100828873
  way_inds       597400
  way_miss        97680
  way_cols            0
  drops         2568848
  marks               0
  ack_drop            0
  sp_flows            1
  bk_flows            1
  un_flows            0
  max_len          7166
  quantum           300

What should be interesting is to use DSCP marking. SQM is capable to acknowledge that. That way you can give cs:go the highest priority. Second highest should be voip applications like discord, ts3 or mumble.

Edit: using a dns adblocker on OpenWRT itself, or with pihole+unbound on another device should help a lot in matter of killing unnecessary connections.

That way my sister was a few years back able to play competitive in overwatch with 1mbit down/up.

1 Like

Thanks.

(ceil(1544/48)*53)*8/705 = 19.85ms so the average delay 20.3 ms is basically 1 queued full MTU packet on average, the peak delay of 109ms is ~5.5 packets, all within what @dlakelan predicted.

Not much you can do given that slow upload throughput.

replace
option eqdisc_opts 'nat dual-srchost'
with
option eqdisc_opts 'nat dual-srchost ack-filter'
but given that this is dsl this is not going to help too much...

@bigfat : I have Adblock enabled / 4.0.5
For dscp what packet should I download to set it up ? or is there a parameters that i must set with sqm ?
Because I had installed luci-app-qos and luci-app-nft-qos before but maybe it was not right configured.

@moeller0 : Thanks I added the ack-filter

Check this: Ultimate SQM settings: Layer_cake + DSCP marks (New Script!)

The closed older thread is linked there.

You need to modify your sqm setup and use layer_cake with diffserv4 or diffserv8 to use this script.

Also cake manpage is a great reference to understand each setting youre making for sqm. For help with dscp you should probably start another thread and refer to your post and the one above.

Okay

I will take a look at that post and try to understand how it work.
If I'm not capable to do it on my own, I will create a new post.

Thanks again for your help !!

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