Mmh the last tc-s qdisc output did not look like working cake, but maybe the interface/device was wrong. Could I ask you again to post the output of:
tc -s qdisc
note this will be larger than the earlier output as it contains all interfaces, but there should be 2 cake instances in there.

1 Like

I am impressed. A couple notes:

  1. I was aware of the twitch streaming problem. I'm glad this seems to address it. Optimizing some for the increasingly common userspace vpn might also help - tossing wireguard traffic into the video queue for example. During covid I switched to diffserv4
    for cake.

  2. We showed in general (from the AP) that it was better to toss as much stuff as possible into the BE queue and to maximize aggregation, for greedy traffic. Going hog wild on using up the the wifi queues generally made things worse. What I wanted to propose at the time was that in a case where there were multiple packets scheduled for a station potentially using different hardware queues, that they be merged into a single txop. If there was a high priority packet in that stations queue(s), then everything would end up in the higher priority queue. I know this is hard, but if you look at the outputs of a rrul test vs a rrul_be test, or (worse) any of the multistation rrul_var tests, you'll see the damage currently caused by streaming traffic in each of these queues.

  3. In general my focus is on deprioritizing packets (like torrent), not prioritizing them. I like very much the idea of a "blessed" default config containing all the known protocols and port numbers - or multiple such files. Having one enormous shared file that could be jointly maintained would help.

  4. I have always preferred the idea of packets being marked and preserved end to end, not in the middleboxes, and applications marking their own traffic appropriately. Remarking from 0 to something else would be allowed, but not from one class to another, except in the case of abuse, or, in the case of LE, deprecation of CS1.

2 Likes

It looks to me like qosify could actually also be used by applicatons running on clients. Has android gained ebf support yet?

1 Like

Note that my device its wan.20 so its strange that the qosify works only if I set device as

config interface wan
	option name wan
	option disabled 0
	option bandwidth_up 1000mbit
	option bandwidth_down 1000mbit
Summary
BusyBox v1.34.1 (2021-11-13 20:29:41 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r18084-b5ab6d0bc5
 -----------------------------------------------------
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 mq 0: dev eth0 root 
 Sent 1121221 bytes 3340 pkt (dropped 0, overlimits 0 requeues 10) 
 backlog 0b 0p requeues 10
qdisc fq_codel 0: dev eth0 parent :8 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
 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 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
 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 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
 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 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
 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 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
 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 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
 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 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
 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 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
 Sent 1121221 bytes 3340 pkt (dropped 0, overlimits 0 requeues 10) 
 backlog 0b 0p requeues 10
  maxpacket 1482 drop_overlimit 0 new_flow_count 4 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev lan4 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan3 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan2 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan1 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev wan root refcnt 2 
 Sent 0 bytes 0 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 wan.20 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc cake 1: dev pppoe-wan root refcnt 2 bandwidth 1Gbit diffserv4 dual-srchost nat nowash no-ack-filter split-gso rtt 100ms raw overhead 0 
 Sent 65512 bytes 200 pkt (dropped 0, overlimits 1 requeues 0) 
 backlog 0b 0p requeues 0
 memory used: 8960b of 15180Kb
 capacity estimate: 1Gbit
 min/max network layer size:           40 /    1492
 min/max overhead-adjusted size:       40 /    1492
 average network hdr offset:            0

                   Bulk  Best Effort        Video        Voice
  thresh      62500Kbit        1Gbit      500Mbit      250Mbit
  target            5ms          5ms          5ms          5ms
  interval        100ms        100ms        100ms        100ms
  pk_delay          0us         20us         11us         14us
  av_delay          0us          0us          1us          1us
  sp_delay          0us          0us          1us          1us
  backlog            0b           0b           0b           0b
  pkts                0           11          102           87
  bytes               0        10010        15169        40333
  way_inds            0            0            0            0
  way_miss            0            1           10           45
  way_cols            0            0            0            0
  drops               0            0            0            0
  marks               0            0            0            0
  ack_drop            0            0            0            0
  sp_flows            0            0            0            1
  bk_flows            0            1            1            1
  un_flows            0            0            0            0
  max_len             0         5808         1859         1368
  quantum          1514         1514         1514         1514

qdisc ingress ffff: dev pppoe-wan parent ffff:fff1 ---------------- 
 Sent 80684 bytes 181 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc cake 1: dev ifb-pppoe-wan root refcnt 2 bandwidth 1Gbit diffserv4 dual-dsthost nat nowash ingress no-ack-filter split-gso rtt 100ms raw overhead 0 
 Sent 80684 bytes 181 pkt (dropped 0, overlimits 35 requeues 0) 
 backlog 0b 0p requeues 0
 memory used: 6Kb of 15140Kb
 capacity estimate: 1Gbit
 min/max network layer size:           40 /    1492
 min/max overhead-adjusted size:       40 /    1492
 average network hdr offset:            0

                   Bulk  Best Effort        Video        Voice
  thresh      62500Kbit        1Gbit      500Mbit      250Mbit
  target            5ms          5ms          5ms          5ms
  interval        100ms        100ms        100ms        100ms
  pk_delay          0us          6us         37us         18us
  av_delay          0us          0us          2us          2us
  sp_delay          0us          0us          2us          2us
  backlog            0b           0b           0b           0b
  pkts                0            5           95           81
  bytes               0         2431        41418        36835
  way_inds            0            0            0            0
  way_miss            0            1           11           45
  way_cols            0            0            0            0
  drops               0            0            0            0
  marks               0            0            0            0
  ack_drop            0            0            0            0
  sp_flows            0            0            0            1
  bk_flows            0            0            1            1
  un_flows            0            0            0            0
  max_len             0         1452         1492         1452
  quantum          1514         1514         1514         1514

root@OpenWrt:~# 

Zoom's recommendations: https://support.zoom.us/hc/en-us/articles/207368756-Using-QoS-DSCP-Marking

webrtc: https://www.w3.org/TR/webrtc-priority/

1 Like

That's my problem as well.
I set mine to pppoe-wan like I did for sqm-script and didn't work.
Set to wan and it works now tc showing it's working on the correct interface

2 Likes

hi @di_Niko replace by

option dscp_bulk bulk

by

option dscp_bulk CS1

like my post page 53 for bad argument and then

as i mentioned above do this

then so that it starts automatically add a file in hotplug iface and put this in this file ..

#!/bin/sh

[ -n "$DEVICE" ] || exit 0
[ "$ACTION" = ifup ] &&  {                                                                            
    echo y | /etc/init.d/qosify reload | start
    logger -t qosify "Reloading qosify due to $ACTION of $INTERFACE ($DEVICE)"
}

like my post page 71

1 Like

IIRC is wan an OpenWrt internal name that needs translating into someting tc understands, which in your case seems to be pppoe-wan.... and ifb-pppoe-wan (not using sqm convention and calling this ifb4pppoe-wan, which given that qosify is not sqm seems reasonable).

3 Likes

That seems unfortunate, because it will probably no work with more interesting set-ups that avoid using the costly IFB indirection.

sorry i have another problem qosify generates this error

Sun Nov 14 14:27:38 2021 daemon.info procd: Instance qosify::instance1 s in a crash loop 6 crashes, 1 seconds since last crash

do you know what the problem could be?

@moeller0

my config actual is like this

config defaults
	list defaults /etc/qosify/*.conf
	option dscp_prio CS5
	option dscp_icmp CS6
	option dscp_bulk CS1
	option dscp_default_udp	CS4
	option bulk_trigger_timeout 5
	option bulk_trigger_pps	100
	option prio_max_avg_pkt_len 500

config alias bulk
	option ingress LE
	option egress LE

config alias video
	option ingress AF41
	option egress AF41

config alias voice
	option ingress CS6
	option egress CS6

config interface wan
	option name wan
	option disabled 0
	option bandwidth_up 4mbit
	option bandwidth_down 56mbit
	# defaults:
	option ingress 1
	option egress 1
	option mode diffserv4
	option nat 1
	option host_isolate 1
	option autorate_ingress 1
	option ingress_options ""
	option egress_options ""
	option options "overhead 44"

config device wandev
	option disabled 1
	option name wan
	option bandwidth 100mbit

(with diffserv4)

and i has put for my priority gaming +CS6

how can I be sure that my console is released as a priority for games

# DNS
tcp:53		CS5
tcp:5353	CS5
udp:53		CS5
udp:5353	CS5

# NTP
udp:123		CS6

# SSH
tcp:22		+CS4

# HTTP/QUIC
tcp:80		+CS3
tcp:443		+CS3
udp:80		+CS3
udp:443		+CS3

-->only priorize that
#cod	
udp:3074	+CS6
#BF2042		
udp:3659 	+CS6

But sometimes i heard than cake the cs6 is good for wireless and EF for wired is right ?

@moeller just after restart qosify

my tc qdisc is like this, why

all my traffic for the video ?

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 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 18801293244 bytes 26367621 pkt (dropped 0, overlimits 0 requeues 19)
 backlog 0b 0p requeues 19
  maxpacket 6072 drop_overlimit 0 new_flow_count 218 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev lan1 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan2 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan3 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan4 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc cake 1: dev wan root refcnt 2 bandwidth 4Mbit diffserv4 dual-srchost nat nowash no-ack-filter split-gso rtt 100ms noatm overhead 44
 Sent 10495190 bytes 142687 pkt (dropped 8879, overlimits 293304 requeues 0)
 backlog 5868b 78p requeues 0
 memory used: 1242496b of 4Mb
 capacity estimate: 4Mbit
 min/max network layer size:           40 /    1500
 min/max overhead-adjusted size:       84 /    1544
 average network hdr offset:           14

                   Bulk  Best Effort        Video        Voice
  thresh        250Kbit        4Mbit        2Mbit        1Mbit
  target         72.7ms          5ms       9.08ms       18.2ms
  interval        168ms        100ms        104ms        113ms
  pk_delay          0us       4.85ms       87.4ms        214us
  av_delay          0us        272us         16ms          7us
  sp_delay          0us        271us        907us          7us
  backlog            0b           0b        5868b           0b
  pkts                0           40       151674           28
  bytes               0         2808     11100642         2314
  way_inds            0            0            0            0
  way_miss            0            5           15           23
  way_cols            0            0            0            0
  drops               0            0         8879            0
  marks               0            0            0            0
  ack_drop            0            0            0            0
  sp_flows            0            5            3            2
  bk_flows            0            0            3            0
  un_flows            0            0            0            0
  max_len             0           78         2039          400
  quantum           300          300          300          300

qdisc ingress ffff: dev wan parent ffff:fff1 ----------------
 Sent 165869120 bytes 111794 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 cake 1: dev ifb-wan root refcnt 2 bandwidth 56Mbit diffserv4 dual-dsthost nat nowash ingress no-ack-filter split-gso rtt 100ms noatm overhead 44
 Sent 168184444 bytes 111786 pkt (dropped 8, overlimits 155374 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 178104b of 4Mb
 capacity estimate: 56Mbit
 min/max network layer size:           46 /    1500
 min/max overhead-adjusted size:       90 /    1544
 average network hdr offset:           14

                   Bulk  Best Effort        Video        Voice
  thresh       3500Kbit       56Mbit       28Mbit       14Mbit
  target         5.19ms          5ms          5ms          5ms
  interval        100ms        100ms        100ms        100ms
  pk_delay          0us         65us       1.02ms        166us
  av_delay          0us          1us        299us          8us
  sp_delay          0us          1us         29us          8us
  backlog            0b           0b           0b           0b
  pkts                0            5       111767           22
  bytes               0          300    168194435         1821
  way_inds            0            0            0            0
  way_miss            0            3           15           18
  way_cols            0            0            0            0
  drops               0            0            8            0
  marks               0            0            0            0
  ack_drop            0            0            0            0
  sp_flows            0            1            4            1
  bk_flows            0            0            2            0
  un_flows            0            0            0            0
  max_len             0           60         3028          119
  quantum           300         1514          854          427

root@OpenWrt:~#

All your normal unmarked web traffic is getting CS3 added, which maps to video. You can change it or comment it out.

1 Like

thanks @dave14305 i has uncomment

and now

                   Bulk  Best Effort        Video        Voice
  thresh        250Kbit        4Mbit        2Mbit        1Mbit
  target         72.7ms          5ms       9.08ms       18.2ms
  interval        168ms        100ms        104ms        113ms
  pk_delay       2.94ms       12.8ms          0us       1.71ms
  av_delay        276us       2.28ms          0us        292us
  sp_delay          8us        156us          0us          7us
  backlog            0b           0b           0b           0b
  pkts           361960          430            0         5807
  bytes        27463801       327562            0       840516
  way_inds            0            0            0            0
  way_miss           11           36            0          238
  way_cols            0            0            0            0
  drops              50            1            0            4
  marks               0            0            0            0
  ack_drop            0            0            0            0
  sp_flows            1            1            0            1
  bk_flows            1            0            0            0
  un_flows            0            0            0            0
  max_len          2047         4542            0         1606
  quantum           300          300          300          300

qdisc ingress ffff: dev wan parent ffff:fff1 ----------------
 Sent 413429057 bytes 282312 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 cake 1: dev ifb-wan root refcnt 2 bandwidth 56Mbit diffserv4 dual-dsthost nat nowash ingress no-ack-filter split-gso rtt 100ms noatm overhead 44
 Sent 419028075 bytes 282299 pkt (dropped 11, overlimits 350939 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 353568b of 4Mb
 capacity estimate: 56Mbit
 min/max network layer size:           46 /    1500
 min/max overhead-adjusted size:       90 /    1544
 average network hdr offset:           14

                   Bulk  Best Effort        Video        Voice
  thresh       3500Kbit       56Mbit       28Mbit       14Mbit
  target         5.19ms          5ms          5ms          5ms
  interval        100ms        100ms        100ms        100ms
  pk_delay        230us        860us          0us        187us
  av_delay         45us        252us          0us         64us
  sp_delay          6us          7us          0us          5us
  backlog            0b           0b           0b           0b
  pkts           276240         1791            0         4279
  bytes       415702038      2404131            0       938560
  way_inds            0            0            0            0
  way_miss           11           98            0          199
  way_cols            0            0            0            0
  drops              10            1            0            0
  marks               0            0            0            0
  ack_drop            0            0            0            0
  sp_flows            1            1            0            2
  bk_flows            1            0            0            0
  un_flows            0            0            0            0
  max_len         10598         4542            0         1514
  quantum           300         1514          854          427

root@OpenWrt:~#

i suppose than traffic voice is my 2 rules in CS6 ?


#cod	
udp:3074	+CS6
#BF2042		
udp:3659 	+CS6

Or DNS, NTP, or prio packets.

1 Like

As I noticed before cake as fq_codel are designed such that sparse protocols like DNS and NTP tend to not need additional prioritization, by virtue of being naturally sparse. I would probably first keep as much in CS0 as possible and only down-up prioritize if there is empirical evidence that doing so helps (or like with gaming stuff) there is strong a priori intent to prioritize no matter what (DNS will happily work with an occasional latency spike, on-line FPS games will tolerant, or rather the players :wink: )

1 Like

what do you recommend to improve the game
diffserv4 is a mode that I do not master, and I mainly play fps games, the rest does not matter to me

# DNS
#tcp:53		CS5
#tcp:5353	CS5
#udp:53		CS5
#udp:5353	CS5

# NTP
#udp:123		CS6

# SSH
#tcp:22		+CS4

# HTTP/QUIC
#tcp:80		+CS3
#tcp:443		+CS3
#udp:80		+CS3
#udp:443		+CS3


#cod	
udp:3074	+CS6
#BF2042		
udp:3659 	+CS6

Sorry about the missing alias support. Turns out I forgot to push the init script change :slight_smile:

3 Likes

no problem

for the moment my game is bad compared to iptables and sqm but it's in development ...

my wireshark show all

Capture d’écran 2021-11-14 à 20.08.01

but while i have changed to changed to CS6 why he not make apply the new dscp ?
#cod
udp:3074 +CS6
#BF2042
udp:3659 +CS6

anyone has an explication ?

@nbd
Some questions & ideas for you:

  • Is the "interfaces" option intentionally missing from the default config file's "defaults" section?
    I got qosify to work once I added there "option interfaces eth0.2".

  • Does the "name" option defined in the "interface wan" section have any actual meaning or relation to the netifd interface name? I left that as "wan", and qosify seems to still apply the settings for "eth0.2" and seems to work ok.

  • There could be clear example of a working config in README.
    Possibly separately for a DSA based router (with "wan" etc.) and for a non-DSA router (with "eth0.2" etc.).

  • README (or possibly the default config file, so that the user actually sees it ??) might clearly explain the intended use and relations to other packages. E.g. apparently SQM should be disabled, so that qosify starts the cake qdisc. Or did I get that wrong?

3 Likes