Help prioritizing games with alternative qdisc design

An argument that is not that convincing given that the script this thread discusses existed well before quosify, no? As temporally seen quosify would be the reinvented wheel (not that the thread-script is conceptually the first wheel either), but you are not arguing for quosify to be scraped?

IMHO there is no reason why we should only have one specific model of wheel, like in reality having a choice of diameter, weight, load bearing capacity and what not seems a good thing :wink:

1 Like

hello to all so this night I had fun retesting the script I had some pretty good games, a little later I put QoSify and my games were much better it's not necessarily qosify but the settings that elan has proposed which in my humble opinion are perfect for gamers, small bonus I used banip to block bad servers, I was only in good lobbies with a very good ping

2 Likes

Don't understand whats the deal on spamming this thread with qosify. Anyone registered in this forum acknowledged the existence of qosify and im sure they are smart enough to find the thread with your guys suggestions.

hello, has anyone tried the script in dsa??? I connect to the ps4 via cable to port 1 and my ap to port 4. In swconfig I am clear that my lan network is eth0.1 and my wan network is eth1.1074. Can someone help??

Hi @dlakelan upgraded to nanopi r4s with friendly wrt build and one of the points is that this build has qfq and sfq discs included... the problem that your script does not work correctly with the fw3 and fw4 firewall on 22.03 at the moment. Can we expect on update from your side? Thanks!

Hello @dlakelan, is there a solution to run this script in fw4, I don't have much knowledge but from what I see, it should be adapted to NFTABLES
Kind regards and we look forward to an update from you


Continue? (type y or n and then RETURN/ENTER)
y
/etc/SimpleHFSCgamerscript.sh: line 219: iptables: not found
/etc/SimpleHFSCgamerscript.sh: line 220: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: line 219: iptables: not found
/etc/SimpleHFSCgamerscript.sh: line 220: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: line 219: iptables: not found
/etc/SimpleHFSCgamerscript.sh: line 220: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: line 219: iptables: not found
/etc/SimpleHFSCgamerscript.sh: line 220: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: line 219: iptables: not found
/etc/SimpleHFSCgamerscript.sh: line 220: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: line 219: iptables: not found
/etc/SimpleHFSCgamerscript.sh: line 220: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 5: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 6: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 5: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 6: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 5: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 6: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 5: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 6: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 5: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 6: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 5: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 6: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 5: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 6: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 5: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 6: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 5: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 6: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 5: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 6: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 5: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 6: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 5: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 6: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 5: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 6: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 5: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 6: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 5: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 6: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 5: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 6: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 5: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 6: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 5: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 6: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 5: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 6: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 5: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 6: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 5: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 6: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 9: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 9: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 9: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 12: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 9: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 12: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 9: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 12: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 9: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 12: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 9: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 12: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 9: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 12: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 9: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 5: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 6: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 5: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 6: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 9: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 9: iptables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 12: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: /etc/dscptag.sh: line 12: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: line 219: iptables: not found
/etc/SimpleHFSCgamerscript.sh: line 220: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: line 219: iptables: not found
/etc/SimpleHFSCgamerscript.sh: line 220: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: line 219: iptables: not found
/etc/SimpleHFSCgamerscript.sh: line 220: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: line 219: iptables: not found
/etc/SimpleHFSCgamerscript.sh: line 220: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: line 219: iptables: not found
/etc/SimpleHFSCgamerscript.sh: line 220: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: line 219: iptables: not found
/etc/SimpleHFSCgamerscript.sh: line 220: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: line 219: iptables: not found
/etc/SimpleHFSCgamerscript.sh: line 220: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: line 219: iptables: not found
/etc/SimpleHFSCgamerscript.sh: line 220: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: line 219: iptables: not found
/etc/SimpleHFSCgamerscript.sh: line 220: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: line 219: iptables: not found
/etc/SimpleHFSCgamerscript.sh: line 220: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: line 219: iptables: not found
/etc/SimpleHFSCgamerscript.sh: line 220: ip6tables: not found
/etc/SimpleHFSCgamerscript.sh: line 219: iptables: not found
/etc/SimpleHFSCgamerscript.sh: line 220: ip6tables: not found
DONE!
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 69257902 bytes 689891 pkt (dropped 0, overlimits 0 requeues 9)
 backlog 0b 0p requeues 9
qdisc fq_codel 0: dev eth0 parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 69257902 bytes 689891 pkt (dropped 0, overlimits 0 requeues 9)
 backlog 0b 0p requeues 9
  maxpacket 1446 drop_overlimit 0 new_flow_count 10 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc mq 0: dev eth1 root
 Sent 5946468901 bytes 4362536 pkt (dropped 0, overlimits 0 requeues 21)
 backlog 0b 0p requeues 21
qdisc fq_codel 0: dev eth1 parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 5946468901 bytes 4362536 pkt (dropped 0, overlimits 0 requeues 21)
 backlog 0b 0p requeues 21
  maxpacket 1514 drop_overlimit 0 new_flow_count 31 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 hfsc 1: dev eth1.1 root refcnt 2 default 13
 Sent 10999 bytes 18 pkt (dropped 0, overlimits 3 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 801c: dev eth1.1 parent 1:15 limit 10240p flows 1024 quantum 3000 target 4ms interval 100ms memory_limit 2500000b 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 801a: dev eth1.1 parent 1:13 limit 10240p flows 1024 quantum 3000 target 4ms interval 100ms memory_limit 2500000b ecn drop_batch 64
 Sent 10824 bytes 17 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 1539 drop_overlimit 0 new_flow_count 3 ecn_mark 0
  new_flows_len 0 old_flows_len 1
qdisc pfifo 10: dev eth1.1 parent 1:11 limit 897p
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 8019: dev eth1.1 parent 1:12 limit 10240p flows 1024 quantum 3000 target 4ms interval 100ms memory_limit 2500000b 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 801b: dev eth1.1 parent 1:14 limit 10240p flows 1024 quantum 3000 target 4ms interval 100ms memory_limit 2500000b 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 hfsc 1: dev eth0.2 root refcnt 2 default 13
 Sent 1346 bytes 5 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 8016: dev eth0.2 parent 1:13 limit 10240p flows 1024 quantum 3000 target 4ms interval 101ms memory_limit 500000b ecn drop_batch 64
 Sent 1346 bytes 5 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 633 drop_overlimit 0 new_flow_count 4 ecn_mark 0
  new_flows_len 1 old_flows_len 0
qdisc fq_codel 8018: dev eth0.2 parent 1:15 limit 10240p flows 1024 quantum 3000 target 4ms interval 101ms memory_limit 500000b 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 pfifo 10: dev eth0.2 parent 1:11 limit 183p
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 8015: dev eth0.2 parent 1:12 limit 10240p flows 1024 quantum 3000 target 4ms interval 101ms memory_limit 500000b 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 8017: dev eth0.2 parent 1:14 limit 10240p flows 1024 quantum 3000 target 4ms interval 101ms memory_limit 500000b 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

throw those errors, any ideas?

Hi, Yes it should be updated for nftables. I don't have any OpenWrt devices and am not sure how FW4 works right now. I'm pretty sure I could just write up an nftables script which would be included by fw4 and provide the right tables and rules etc... but would really help if someone could look into what that file should look like and where it goes. I'm pretty sure I could create the nftables script fairly easily but will take some testing by friends here :wink:

2 Likes

There’s a lot of “include” flexibility in fw4 now, so depending where you want to inject your rules, there are many options.

This are the plain mangle chains:


        #
        # Mangle rules
        #

        chain mangle_prerouting {
                type filter hook prerouting priority mangle; policy accept;
        }

        chain mangle_postrouting {
                type filter hook postrouting priority mangle; policy accept;
        }

        chain mangle_input {
                type filter hook input priority mangle; policy accept;
        }

        chain mangle_output {
                type route hook output priority mangle; policy accept;
        }

        chain mangle_forward {
                type filter hook forward priority mangle; policy accept;
                iifname "eth1" tcp flags syn tcp option maxseg size set rt mtu comment "!fw4: Zone wan IPv4/IPv6 ingress MTU fixing"
                oifname "eth1" tcp flags syn tcp option maxseg size set rt mtu comment "!fw4: Zone wan IPv4/IPv6 egress MTU fixing"
        }

You can include within an existing chain (pre- or post the default rules), add another chain in the fw4 table, or add a new table completely.

1 Like

@dlakelan fantastic script, had a question about the ack filter formula.

if [ $UPRATE -lt 5000 -a $((DOWNRATE10/UPRATE > 45)) -eq 1 ] and ACKRATE=$((DOWNRATE1000/8/540*150/100))
if you had 100Mbps down and 7.3 upload, how would you enter it into the equation?
in the 540 mss equation, if you keep the mss and did not in fact change it from the default 1460 do you change that part of the equation?

last question is does cake's ack filter handle acks only on the upload side or does it do download as well?

cake does not know about directions at all, and so you can configure ack-filter on ingress and egress qdiscs (well, qdiscs only attach to the egress side anyway, so for ingress we need either a veth pair or an IFB to functionally create an egress interface that handles ingress traffic).

However the utility of an ack-filter on the internet download side typically is much less than on the egress side:
a) on ingress packets typically have already traversed the true bottleneck so dropping-filtering them will not allow more throughput, unlike in egress direction where filtering happens before the bottleneck, so we can gently reduce the load
b) filtering requires that ACK packets actually end up building a queue, on the typical faster ingress side that is less likely to happen than on the typically much slower egress side
c) the end2end principle really prefers if we leave packet streams alone as much as possible and filtering ACKs is a pretty hefty manipulation, so it better come with a tangible improvement, which for egress tends to be clearer than for ingress.
d) for very bursty MACs (aggregating WiFi or DOCSIS) ACK filtering can actually help smoothing out TCP performance, as getting a set of back to back ACKs can irritate the stack a bit...

1 Like

Good morning my friend!
Do you have a tutorial explaining how to add this script to Openwrt?
I don't understand much but I wanted to do this configuration to improve the online gaming part.
If you have a tutorial on how to do it, I would appreciate it.