I have already try these methods. Simple but doesnt works for cod.. In other games with Just sqm and Cake you are OK... Cod somehow is something different.
what are you talking about. im talking gargoyle has the same sfq setup as your friend's advanced tomato.
and you telling me about how "simple" and cake doesnt work.
ok, im out of this thread.
i was intrigued by the misleading title about some new qdisc design and dlakelan replied to it and thought it was some high level discussion. im an idiot for joining this thread
This is a thread about creating a simple alternative to SQM for gamers using a custom combination / hierarchy of standard linux qdiscs... sorry if it's somehow misleading.
I hope we can get some people to test it, for the case where gamers want high priority for a special gaming machine this should be better than SQM which tries to be general purpose.
You dont read? I said i already try these methods... I know that gargoyle has sfq.. I try the same settings in gargoyle and It doesnt work as i imagine.
Dlakelan posts because i need something more specific and testing one part at a time.. It is more complicated. If you want to help you are wellcome.. But dont tell that you are an idiot to join... I see many times when we make a post about gaming many members not interested at all to help.. But gamers are a big part of community. And again i want to thank you Dlakelan for his time he spends untill now for my specific needs.
Ok, so it turns out that OpenWrt doesn't include the drr or the tbf qdisc? That seems like a mistake, but let's work with HFSC instead, it's a bit more CPU intensive but it's a great qdisc.
Also to do iptables classify requires iptables-mod-ipopt package.
#!/bin/sh
GAMINGIP="192.168.1.xxx" # change this
# start by putting everything into 2:1 as "default"
iptables -t mangle -A POSTROUTING -j CLASSIFY --set-class 2:1
#reclassify all udp packets from your gaming machine as 2:2, high priority
iptables -t mangle -A POSTROUTING -p udp -s "${GAMINGIP}" -j CLASSIFY --set-class 2:2
Ok, let's set up an hfsc with two classes... let's see:
#!/bin/sh
WAN=eth0.2 # change this to your WAN device name
UPRATE=650 #change this to your kbps upload speed
LAN=eth0.1
DOWNRATE=3000 #change this to about 80% of your download speed (in kbps)
setqdisc () {
DEV=$1
RATE = $2
OH=37
let uprate=$RATE*90/100
let downrate=$RATE*10/100
tc qdisc replace dev $DEV stab overhead $OH linklayer ethernet handle 1: root hfsc default 3
tc class add dev $DEV parent 1: classid 1:1 hfsc ls m2 ${RATE}kbit ul m2 ${RATE}kbit
# high prio class
tc class add dev $DEV parent 1:1 classid 1:2 hfsc rt m1 ${uprate}kbit d 20ms m2 ${downrate}kbit
tc class add dev $DEV parent 1:1 classid 1:3 hfsc ls m1 ${downrate}kbit d 20ms m2 ${uprate}kbit
tc qdisc add dev $DEV parent 1:2 pfifo limit 10
tc qdisc add dev $DEV parent 1:3 pfifo limit 10
}
setqdisc $WAN $UPRATE
## uncomment this to do the download direction via output of LAN
#setqdisc $LAN $DOWNRATE
and then classify differently:
#!/bin/sh
GAMINGIP="10.1.1.3" # change this
#reclassify all udp packets from your gaming machine as 1:2, high priority
iptables -t mangle -A POSTROUTING -p udp -s ${GAMINGIP} -j CLASSIFY --set-class 1:2
iptables -t mangle -A POSTROUTING -p udp -d ${GAMINGIP} -j CLASSIFY --set-class 1:2
That's right. basically it gives your udp traffic up to 90% of the bandwidth for up to 20ms... If you have say 1mbps that means you can transfer 2250 bytes, which should be enough to flush out your high priority queue.
after 20ms of contention, the role will switch, with only 10% of the bandwidth reserved in the long term for your games etc.
we can tune those things later.
Please let me know though what your up and down speed you will use is?
OH=37 this value is for ATM overhead?Mine is 40 from moeller ATM detector..can i change this?
I will use ...
#!/bin/sh
WAN=pppoe-wan # change this to your WAN device name
UPRATE=668 #change this to your kbps upload speed
LAN=br-lan
DOWNRATE=13060 #change this to about 80% of your download speed (in kbps)
Both upload and download are 80% of the lowest values i have taken after several speedtests.
that's right, so you can use the 40 ATM overhead, you could even boost that a little above the optimum it will generally be better than being a little below. If you're on ATM then technically things get more complicated, but let's just see if it works with 40
Do you have any wireguard data from your game? Maybe you can tell me what the typical game bandwidth upload usage is? The settings should allow the full game bandwidth + a little extra in the high priority queue so we should probably customize that a bit.
I put in startup.... sleep 8 /root/hfsc.sh sleep 8 /root/gaming.sh
I use the following scripts....
#!/bin/sh
WAN=pppoe-wan # change this to your WAN device name
UPRATE=668 #change this to your kbps upload speed
LAN=eth0.1
DOWNRATE=13060 #change this to about 80% of your download speed (in kbps)
setqdisc () {
DEV=$1
RATE=$2
OH=44
let uprate=$RATE*90/100
let downrate=$RATE*10/100
tc qdisc replace dev $DEV stab overhead $OH linklayer ethernet handle 1: root hfsc default 3
tc class add dev $DEV parent 1: classid 1:1 hfsc ls m2 ${RATE}kbit ul m2 ${RATE}kbit
# high prio class
tc class add dev $DEV parent 1:1 classid 1:2 hfsc rt m1 ${uprate}kbit d 20ms m2 ${downrate}kbit
tc class add dev $DEV parent 1:1 classid 1:3 hfsc ls m1 ${downrate}kbit d 20ms m2 ${uprate}kbit
tc qdisc add dev $DEV parent 1:2 pfifo limit 10
tc qdisc add dev $DEV parent 1:3 pfifo limit 10
}
setqdisc $WAN $UPRATE
## uncomment this to do the download direction via output of LAN
setqdisc $LAN $DOWNRATE
With OH value 44
And this....
#!/bin/sh
GAMINGIP="192.168.1.XXX" # change this
#reclassify all udp packets from your gaming machine as 1:2, high priority
iptables -t mangle -A POSTROUTING -p udp -s ${GAMINGIP} -j CLASSIFY --set-class 1:2
iptables -t mangle -A POSTROUTING -p udp -d ${GAMINGIP} -j CLASSIFY --set-class 1:2
It seems like it looks ok at first glance. How does a speed test work, and how does game play work? I do think we will need to tune the HFSC settings a bit for you. my current script only allows 10% of total bandwidth for long-term usage by your game... that's probably not enough.