gargoyle and fq_codel

Report issues relating to bandwith monitoring, bandwidth quotas or QoS in this forum.

Moderator: Moderators

robnitro
Posts: 84
Joined: Sat Feb 26, 2011 4:50 pm

Re: gargoyle and fq_codel

Post by robnitro »

You can't use codel for the qos in gargoyle, but hsfc/ sfq is much better because like mentioned, you can use caps.

sqm_scripts was not too good in balancing out load- like torrents would still saturate the connection because of many multiple connections!

But you can change the eth0 eth1 wlan1 wlan0 to use fq_codel which helps with the internal delays, especially good for wireless. I'm using my own customized settings that I have learned work best for me when I used openwrt qos and sqm. In fact, fq_codel itself on the device can reduce ping spikes if your line is slower than you put for limits in gargoyle.

Code: Select all

| Gargoyle version 1.7.X    | OpenWrt Barrier Breaker branch     |
| Gargoyle revision da35789 | OpenWrt revision r43694            |
| Built January 10, 2015    | Target  ar71xx/usb_large           |
------------------------------------------------------------------
#~# tc qdisc
qdisc fq_codel 800b: dev eth0 root refcnt 2 limit 488p flows 1024 quantum 300 target 2.0ms interval 48.0ms ecn
qdisc fq_codel 800c: dev eth1 root refcnt 2 limit 58p flows 1024 quantum 300 target 2.0ms interval 48.0ms ecn
qdisc fq_codel 800e: dev wlan1 root refcnt 5 limit 488p flows 1024 quantum 300 target 5.0ms interval 100.0ms ecn
qdisc fq_codel 800d: dev wlan0 root refcnt 5 limit 488p flows 1024 quantum 300 target 5.0ms interval 100.0ms ecn
qdisc hfsc 1: dev imq0 root refcnt 2 default 5
qdisc sfq 2: dev imq0 parent 1:2 limit 1031p quantum 1500b depth 127 headdrop divisor 256
qdisc sfq 3: dev imq0 parent 1:3 limit 1031p quantum 1500b depth 127 headdrop divisor 256
qdisc sfq 4: dev imq0 parent 1:4 limit 993p quantum 1500b depth 127 headdrop divisor 256
qdisc sfq 5: dev imq0 parent 1:5 limit 1012p quantum 1500b depth 127 headdrop divisor 256
qdisc sfq 6: dev imq0 parent 1:6 limit 468p quantum 1500b depth 127 headdrop divisor 256
#~#
And here are the commands I use in rc.local to enable my current settings:

Code: Select all

tc qdisc add dev eth0 root fq_codel limit 488 quantum 300 target 2ms interval 48ms ecn
tc qdisc add dev ifb0 root fq_codel limit 488 quantum 300 target 2ms interval 48ms ecn
tc qdisc add dev eth1 root fq_codel limit 58 quantum 300 target 2ms interval 48ms ecn
tc qdisc add dev wlan0 root fq_codel limit 488 quantum 300 target 5ms interval 100ms
tc qdisc add dev wlan1 root fq_codel limit 488 quantum 300 target 5ms interval 100ms


CarpeNoctem
Posts: 51
Joined: Fri Mar 06, 2015 11:15 am

Re: gargoyle and fq_codel

Post by CarpeNoctem »

robnitro wrote:You can't use codel for the qos in gargoyle, but hsfc/ sfq is much better because like mentioned, you can use caps.

sqm_scripts was not too good in balancing out load- like torrents would still saturate the connection because of many multiple connections!

But you can change the eth0 eth1 wlan1 wlan0 to use fq_codel which helps with the internal delays, especially good for wireless. I'm using my own customized settings that I have learned work best for me when I used openwrt qos and sqm. In fact, fq_codel itself on the device can reduce ping spikes if your line is slower than you put for limits in gargoyle.

Code: Select all

| Gargoyle version 1.7.X    | OpenWrt Barrier Breaker branch     |
| Gargoyle revision da35789 | OpenWrt revision r43694            |
| Built January 10, 2015    | Target  ar71xx/usb_large           |
------------------------------------------------------------------
#~# tc qdisc
qdisc fq_codel 800b: dev eth0 root refcnt 2 limit 488p flows 1024 quantum 300 target 2.0ms interval 48.0ms ecn
qdisc fq_codel 800c: dev eth1 root refcnt 2 limit 58p flows 1024 quantum 300 target 2.0ms interval 48.0ms ecn
qdisc fq_codel 800e: dev wlan1 root refcnt 5 limit 488p flows 1024 quantum 300 target 5.0ms interval 100.0ms ecn
qdisc fq_codel 800d: dev wlan0 root refcnt 5 limit 488p flows 1024 quantum 300 target 5.0ms interval 100.0ms ecn
qdisc hfsc 1: dev imq0 root refcnt 2 default 5
qdisc sfq 2: dev imq0 parent 1:2 limit 1031p quantum 1500b depth 127 headdrop divisor 256
qdisc sfq 3: dev imq0 parent 1:3 limit 1031p quantum 1500b depth 127 headdrop divisor 256
qdisc sfq 4: dev imq0 parent 1:4 limit 993p quantum 1500b depth 127 headdrop divisor 256
qdisc sfq 5: dev imq0 parent 1:5 limit 1012p quantum 1500b depth 127 headdrop divisor 256
qdisc sfq 6: dev imq0 parent 1:6 limit 468p quantum 1500b depth 127 headdrop divisor 256
#~#
And here are the commands I use in rc.local to enable my current settings:

Code: Select all

tc qdisc add dev eth0 root fq_codel limit 488 quantum 300 target 2ms interval 48ms ecn
tc qdisc add dev ifb0 root fq_codel limit 488 quantum 300 target 2ms interval 48ms ecn
tc qdisc add dev eth1 root fq_codel limit 58 quantum 300 target 2ms interval 48ms ecn
tc qdisc add dev wlan0 root fq_codel limit 488 quantum 300 target 5ms interval 100ms
tc qdisc add dev wlan1 root fq_codel limit 488 quantum 300 target 5ms interval 100ms

Would I be abusing your kindness if I asked you to explain what your code does specifically? Thank you in advance

robnitro
Posts: 84
Joined: Sat Feb 26, 2011 4:50 pm

Re: gargoyle and fq_codel

Post by robnitro »

It gives a codel queue for the interfaces themselves, not touching the QOS queues.

My friend has 150 mbit fiber, so he doesn't use qos. But if he leaves stock queues (fifo?) he can get spikes to 200 ms. With codel, the latency never goes above 120ms. It's just smarter about how it handles traffic, even when you don't use qos.

I see that the newer 1.7.1 does fq_codel by default on eth0 and eth1 (lan and wan). But still wlan (wireless) is not using it.

Just to explain the basics of codel and why I selected those values.
Limit is the number of packets it will hold onto in the queue. A lower value would mean less max speed, but less delay. (best value that I found helps without qos- set it lower on the outgoing interface and latency doesn't spike high!)
Quantum is the size of the packets it will split into for prioritization. (I didn't see much difference in testing but 300-500 is normally ok)
Target is where the queue wants to have max delay- I didn't see any benefit between stock and my setting of 2ms.
Interval is just how often the queue re-analyzes delays to adjust for latency.

Fa55u
Posts: 10
Joined: Tue Apr 21, 2015 6:55 am

Re: gargoyle and fq_codel

Post by Fa55u »

pbix wrote: People who want to try fq_codel in Gargoyle can replace their /etc/init.d/qos_gargoyle.sh scripts with the attached. I will be watching for any comments.
I just replaced qos_gargoyle and enabled QoS but tc -d qdisc still shows pfifo_fast not fq_codel, what do?

Code: Select all

qdisc pfifo_fast 0: dev eth0 root refcnt 2 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: dev eth1 root refcnt 2 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: dev pppoe-wan root refcnt 2 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc mq 0: dev wlan0 root

Post Reply