Help prioritizing games with alternative qdisc design

Any game that uses UDP, doesn't exceed your game rates, that you play on one of the machines you put in the ipsets should work well. Looking online it indicates that FIFA 20 for example uses UDP for game play so it should work.

I have pushed a small change to the script so that the example ipv6 addresses are public addresses in the "reserved" documentation range 2001:db8:: because there's not much reason to put your ULA addresses (fdxx:xxx type addresses).

If you don't have IPv6 from your ISP don't worry about it, if you do have IPv6 from your ISP include the public address of your gaming machines which should start with 2xxx: not with fdxx:

it wont let me, it goes straight into the Abort screen

it says "do not execute commands that require user-input or data transfer"

you should be in the console and just type the command, not run that window where you enter a command, whatever it is

It looks like this script is very interesting,
at my place the internet speed is so slow that i have to subscribe to several ISPs.
With this condition I ended up doing load balancer with MWAN3 to get enough BW.

Reading from the initial post until now, according to my understanding, it looks like this script can be combined with the configuration on MWAN3, namely by separating and prioritizing game connections to one of the ISPs. Is that true?
thank you

@dlakelan

setqdisc () {
DEV=$1
RATE=$2
OH=18
MTU=1500
highrate=$((RATE*90/100))
lowrate=$((RATE*10/100))
gamerate=$3
useqdisc=$4

#!/bin/sh

## "atm" for old-school DSL or change to "DOCSIS" for cable modem, or
## "other" or anything else, for everything else

LINKTYPE="DOCSIS"

WAN=eth1.2 # change this to your WAN device name
UPRATE=5000 #change this to your kbps upload speed
LAN=eth0.1
DOWNRATE=70000 #change this to about 80% of your download speed (in kbps)

## how many kbps of UDP upload and download do you need for your games
## across all gaming machines? 

GAMEUP=800
GAMEDOWN=1600

the web browsing was super slow and the bufferbloat was terrible

How fast are the different lines you use in Mwan3? Are they all DSL?

my internet is Cable with 5 up and 100 down Mbps. the router is hooked to the modem and from router all the machines are hooked with Ethernet cable.

This script works for wired only routers do you have a router with wifi? Was anyone using the wifi? Can you show us a speedtest

I see we crossed... Ok so it is wired only can you show us a speedtest?

Wow something went very wrong in your setup. Can you show the output of

tc -s class show dev eth0.1 and also for eth1.2

root@OpenWrt:~# tc -s class show dev eth0.1
class hfsc 1:11 parent 1:1 leaf 10: rt m1 45Mbit d 25.0ms m2 1600Kbit
 Sent 19175 bytes 100 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 period 0 work 19175 bytes rtwork 19175 bytes level 0

class hfsc 1: root
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 period 0 level 2

class hfsc 1:1 parent 1: ls m1 0bit d 0us m2 50Mbit ul m1 0bit d 0us m2 50Mbit
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 period 2510 work 1889553 bytes level 1

class hfsc 1:13 parent 1:1 leaf 800b: ls m1 10Mbit d 25.0ms m2 25Mbit
 Sent 645702 bytes 1429 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 period 948 work 645702 bytes level 0

class hfsc 1:12 parent 1:1 leaf 800a: ls m1 37500Kbit d 25.0ms m2 15Mbit
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 period 0 level 0

class hfsc 1:15 parent 1:1 leaf 800d: ls m1 500Kbit d 25.0ms m2 2500Kbit
 Sent 1224676 bytes 1948 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 period 1565 work 1224676 bytes level 0

class hfsc 1:14 parent 1:1 leaf 800c: ls m1 2Mbit d 25.0ms m2 7500Kbit
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 period 0 level 0

class fq_codel 800b:112 parent 800b:
 (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  deficit 2742 count 0 lastcount 0 ldelay 4us
class fq_codel 800d:1c0 parent 800d:
 (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  deficit 1713 count 0 lastcount 0 ldelay 2us
class fq_codel 800d:235 parent 800d:
 (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  deficit 4294966178 count 0 lastcount 0 ldelay 2us
class fq_codel 800d:360 parent 800d:
 (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  deficit 1271 count 0 lastcount 0 ldelay 2us
class red 10:1 parent 10:

root@OpenWrt:~# tc -s class show dev eth1.2
class hfsc 1:11 parent 1:1 leaf 10: rt m1 4500Kbit d 25.0ms m2 800Kbit
 Sent 4759 bytes 31 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 period 0 work 4759 bytes rtwork 4759 bytes level 0

class hfsc 1: root
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 period 0 level 2

class hfsc 1:1 parent 1: ls m1 0bit d 0us m2 5Mbit ul m1 0bit d 0us m2 5Mbit
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 period 2018 work 1368349 bytes level 1

class hfsc 1:13 parent 1:1 leaf 8007: ls m1 1Mbit d 25.0ms m2 2500Kbit
 Sent 1360939 bytes 3717 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 period 1987 work 1360939 bytes level 0

class hfsc 1:12 parent 1:1 leaf 8006: ls m1 3750Kbit d 25.0ms m2 1500Kbit
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 period 0 level 0

class hfsc 1:15 parent 1:1 leaf 8009: ls m1 50Kbit d 25.0ms m2 250Kbit
 Sent 2651 bytes 33 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 period 32 work 2651 bytes level 0

class hfsc 1:14 parent 1:1 leaf 8008: ls m1 200Kbit d 25.0ms m2 750Kbit
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 period 0 level 0

class fq_codel 8007:214 parent 8007:
 (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  deficit 2556 count 0 lastcount 0 ldelay 492us
class fq_codel 8007:288 parent 8007:
 (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  deficit 2714 count 0 lastcount 0 ldelay 1us
class fq_codel 8007:2ad parent 8007:
 (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  deficit 2873 count 0 lastcount 0 ldelay 1us
class fq_codel 8009:2d9 parent 8009:
 (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  deficit 2877 count 0 lastcount 0 ldelay 2us
class red 10:1 parent 10:

ISP-1 sells special streaming internet packages with speeds of down = 2Mbps, Up = 2Mbps
ISP-2 sells game-specific internet packages with speeds of DL = 1Mbps, Up = 756 Kbps

Even your idle measurements were totally broken. But there is no indication of setting things up wrong. You are classifying some traffic into class 15 which is background harvester traffic. What mechanism are you using to tag CS1 on those packets or is that just arriving like that?

Put your gaming machine on its own vlan, and tell mwan3 to use isp2 only for traffic from that vlan... It should work. Let others share the other isp. You can run two copies of this script it can shape the two connections separately

1 Like

ok thanks, I'll try

if connected to wifi, can this script be run?

ISP => ONT => Cisco AP => Openwrt-mode-client => ClientGame

I also have 1 more internet connection with a topology like that

Looking carefully at your speedtest results they are getting exactly the share they should for background traffic so something is causing your speedtest to be tagged DSCP CS1 and it's becoming background... As it should

Hmm the script is designed for the router to be wired WAN and wired LAN with wifi access points connected to the router by wire. I'm not clear on your topology but it looks like you are using WiFi WAN, it might work, the key is that the router isn't using a bridge for either LAN or WAN but just a single interface

yes I mean so, WIFI as a WAN
OK thanks, I'll try.

One more question, for sqm-script on your github, has the script in this post been implemented into a new script, hfsc-tiered.qos?

We don't have an SQM script at this point but there's an intention to allow a similar thing from within SQM eventually. However this script does some gaming / realtime specific stuff that SQM by default doesn't do (like classifying traffic based on ipsets etc).

For now, here's what I'd do. Run standard piece-of-cake SQM on ISP1, and run this script only for the ISP2 / vlan-for-game interface pair.

1 Like