Qosify: new package for DSCP marking + cake

ah I didn't know but I still have bad latency in games, should I configure something else?

So conceptually all you can do on your side is:
0) configure sqm with shaper settings that give you low/acceptable bufferbloat measures at all times (you want to use your link for gaming)

  1. Figure out how much traffic ypur game creates in both directions, looking at both longer term average rate and short term bursts

  2. set up a prioritization schme in which you only prioritize gaming packets and you make sure that the game-priority tin/tier has a sufficiently guaranteed rate-share such that it comfortably will fit the average rate from 2) and that is also large enough to accept the burst measured in 2)

  3. check whether there are signs of router exceeding its CPU capacity during gaming, if yes replace router with a more powerful unit.

As far as I can tell that is essentially all you can reasonably do at your router....

I assume you already controlled the non-router potential issues like:

  1. your gaming computer being fast enough for the selected game and graphics quality setting

  2. not playing over a sharwd WiFi or 100Mbps fast ethernet hub wirh other computers connected

  3. not having any multicast storms affecting your gaming computer

  4. decent routing/peering between your ISP and thevgaming servers (you might be able to affect/change/improve this routing by using a VPN that is both well connected with your ISP and the servers)

I have a rpi4b router so more powerful I do not think it is necessary something that I noticed is that when I download files of more than 2gb the bandwidth speed is not reduced or it does not go in bulk

therein lies the problem, i think maybe i need to configure something else

Sorry, I have not installed/tested qosify on any machine yet and will not be able to help here... My proposal however was not so much de-prioritising bulk traffic (albeit that might be a decent idea) but selectively only prioritizing your single game traffic (if that can be classified without too many false positives).

if you wanted to do something like this, how would you do it?

Fist figure out what identifying properties for your latency-sensitive gaming packets you can find. If it is port numbers you should be able to use qosify (as far as I understand) but make sure you start out with ONLY putting your gaming packets into a higher than best-effort priority tin, while leaving everything else in best-effort. (I would recommend to use diffserv4 and the Video tin as that will give you 50% of your total capacity for priority traffic (diffserv3 and diffserv4's Voice tin will only allow up to 25% of the total limit for high priority traffic, which might be too little if the link is slow and gaming traffic is bursty)). But really the trick is to start testing with only a single game's packets classified into high priority.

I use this class for now, the latency is good, but when everyone uses the network, the latency already varies a lot.

config class high_throughput_data
	option ingress AF12
	option egress AF12
	option dscp_prio AF11
	option prio_max_avg_pkt_len 1200
	option dscp_bulk LE
	option bulk_trigger_pps 700
	option bulk_trigger_timeout 20

As far as I can tell all of these map either into the Bulk or the Best-effort tin, so you still need to move your game packets into the Video tin.

Yes, full saturation is a bit problematic, remind me again, what speed does your link allow?

config interface wan
        option name wan
        option disabled 0
        option bandwidth_up 23mbit
        option bandwidth_down 103mbit
        option overhead_type docsis
        # for manual:
        option overhead 18
        option overhead_mpu 64
        option overhead_encap noatm
        option ingress 1
        option egress 1
        option mode diffserv4
        option nat 0
        option host_isolate 1
        option autorate_ingress 1
        option ingress_options "dual-dsthost"
        option egress_options "dual-srchost"
        option options "overhead 18"

1 Like

OK, that is not as bad as I feared, but still try with your game's packets in the Video tin of cake's diffserv4 und no other traffic in either the Voice or the Video tin. At that point you will see whether prioritisation helps with your issue or not.

I already passed the port of my game to the video class and the same

So you confirmed that your incoming and outgoing game packets are correctly steered into cake's Video tin (and nothing else is), but your game still suffers from undesired high latency issues?

Where do I see if my game goes to video class?

I would do two things:

  1. check tc -s qdisc whether there are actually packets in the two Video tins and that the number of packets matches what you expect your game to require

  2. use a packet capture while playing and confirm that the game packets contain those DSCP marks as your qosify rules predict. You might need to play around with what interface on your router to get the capture from, because you need to get the packets ofter qosify's ebpf code had a chance to change/set the DSCPs.

now if the latency is good commenting everything and putting the port of my game in cs6

#tcp:53         voice
#tcp:5353       voice
#udp:53         voice
#udp:5353       voice

#udp:123                voice

#tcp:22         +video

#tcp:80         +high_throughput_data
#tcp:443                +high_throughput_data

#udp:80         +high_throughput_data
#udp:443                +high_throughput_data

udp:3074        +CS6

only occasionally latency increases a bit but returns to normal

So this data showed packets in all 4 tins. This is not what I recommended you to test, so it seems your qosify rules are not yet correct.
The point about prioritization is that you really just shift the pain around for every high priority packet that gets queued less some other packet needs to gets delayed more, if you yry to prioritize too many packets at the same time there can be too few packets to delay and hence prioritisations will give diminishing returns.

For initial testing I really recommend to keep everything in the Bedt-Effort tin and ONLY move your game's packets into the Video tin. If that should work, you can then try to move the game to the voice tin, andbif that works you can start adding rules for other applications, like DNS (ports 53, 5353). Here I would also first try to move these the the Video tin and test.

I can offer no silver bullets here, but tedious trial-and-error work, sorry.

more or less so?

tcp:53          besteffort
tcp:5353        besteffort
udp:53          besteffort
udp:5353        besteffort

udp:123         besteffort

tcp:22          +besteffort

tcp:80          +besteffort
tcp:443         +besteffort

udp:80          +besteffort
udp:443         +besteffort

udp:3074        +video

You have to set the ports range used by the server of the game. 3074 is for Xbox live but each game uses another ports for in match comunication.

For example, In my game: 30.000-32.000 UDP

Sorry for my English.

1 Like