Reply
Previous Employee
Posts: 13,551
Registered: ‎06-10-2011
Kudos: 5430
Solutions: 1656
Contributions: 2

Testing fq_codel in v1.5.0

[ Edited ]

As mentioned in the v1.5.0beta1 release notes, thanks to the backporting and preliminary testing effort by Dave Taht (@dtaht ), we now have fq_codel support available in the kernel! As discussed one can experiment with it using "tc" commands etc., and we certainly plan to add configuration settings for it (and then GUI of course). So first it would be great if more people can help us test it in different environments and provide result/feedback!

If you are interested in testing, below is a simple script (also attached) that could potentially be used as a basic starting point. (EDIT: Updated the script to make the parameters tweakable as discussed later in this thread.)

Spoiler
#!/bin/bash

### basic settings
WAN_INTF=eth1
WAN_UP_SPEED=8000000
WAN_DOWN_SPEED=10000000

### advanced settings
TQDISC=fq_codel

# Dave Taht's recommendation:
#   less than 40mbit: 300
#   otherwise: 1514
FQ_CODEL_QUANTUM_UP=300
FQ_CODEL_QUANTUM_DOWN=300

# Dave Taht's recommendation:
#   less than 3mbit: 15ms
#   otherwise: 5ms
FQ_CODEL_TARGET_UP=5ms
FQ_CODEL_TARGET_DOWN=5ms

# Dave Taht's recommendation:
#   less than 40mbit: 1500
#   otherwise: higher (e.g., 8000 or higher for 100mbit etc.)
HTB_QUANTUM_UP=1500
HTB_QUANTUM_DOWN=1500

TQDISC_OPTS_UP=
TQDISC_OPTS_DOWN=
if [ "$TQDISC" == fq_codel ]; then
    TQDISC_OPTS_UP+="quantum $FQ_CODEL_QUANTUM_UP "
    TQDISC_OPTS_UP+="target $FQ_CODEL_TARGET_UP "
    TQDISC_OPTS_DOWN+="quantum $FQ_CODEL_QUANTUM_DOWN "
    TQDISC_OPTS_DOWN+="target $FQ_CODEL_TARGET_DOWN "
fi

WAN_IFB="ifb_${WAN_INTF}"
TC=/sbin/tc
IP=/sbin/ip

$TC qdisc del dev $WAN_INTF root >/dev/null 2>&1
$TC qdisc del dev $WAN_INTF ingress >/dev/null 2>&1
$TC qdisc del dev $WAN_IFB root >/dev/null 2>&1

[ "$1" == clear ] && exit 0

$TC qdisc add dev $WAN_INTF root handle 1: htb default 10
$TC class add dev $WAN_INTF parent 1: classid 1:1 \
    htb quantum $HTB_QUANTUM_UP \
    rate $WAN_UP_SPEED ceil $WAN_UP_SPEED
$TC class add dev $WAN_INTF parent 1:1 classid 1:10 \
    htb quantum $HTB_QUANTUM_UP \
    rate $WAN_UP_SPEED ceil $WAN_UP_SPEED
$TC qdisc add dev $WAN_INTF parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_UP

$IP link add $WAN_IFB type ifb >/dev/null 2>&1
$TC qdisc add dev $WAN_IFB root handle 1: htb default 10
$TC class add dev $WAN_IFB parent 1: classid 1:1 \
    htb quantum $HTB_QUANTUM_DOWN \
    rate $WAN_DOWN_SPEED ceil $WAN_DOWN_SPEED
$TC class add dev $WAN_IFB parent 1:1 classid 1:10 \
    htb quantum $HTB_QUANTUM_DOWN \
    rate $WAN_DOWN_SPEED ceil $WAN_DOWN_SPEED
$TC qdisc add dev $WAN_IFB parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_DOWN

$IP link set $WAN_IFB up
$TC qdisc add dev $WAN_INTF handle ffff: ingress
$TC filter add dev $WAN_INTF parent ffff: \
    protocol all prio 10 u32 match u32 0 0 flowid 1:1 \
    action mirred egress redirect dev $WAN_IFB

 

A few things to note:

  • Do not configure any traffic-policy in the CLI configuration as it might conflict with the script.
  • Make the script executable (chmod +x ...).
  • Change the "WAN_INTF", "WAN_UP_SPEED", and "WAN_DOWN_SPEED" variables in the script according to your Internet connection (the WAN interface and the upload/download speeds in bits/second).
  • If you want to compare fq_codel with sfq, for example, you can change the "TQDISC" variable to sfq.
  • Run the script with "clear" as command-line argument will clear up the existing settings so you could experiment with different settings.
  • The script can also be placed in the "/config/scripts/post-config.d" directory, in which case it will be executed on boot after the configuration has been loaded. However, if the WAN interface is set to a dynamic interface (e.g., pppoe0), the interface might not exist yet at that point, so in such cases different approaches would be needed (e.g., ppp ip-up script).
  • As Dave discussed in another thread, measuring the effectiveness is not trivial as there are many factors involved. For more "scientific" testing, take a look at Dave's testing methodology referenced in that thread. Of course unscientific tests could be useful data points too so please do share your experience while testing!
  • In v1.5.0beta1, the offload mechanism has been improved so that offload does not need to be disabled for QoS to function. More specifically, the offload mechanism will automatically skip traffic that requires QoS. (If this is not working correctly that would be a bug and we'll need to fix it of course!)
  • Obviously this is not the only way to use fq_codel and there are other parameters that can be adjusted too (using tc for example), so the script certainly may not be optimal (or may not even work) in any particular setup. So again it is just meant as a basic starting point, and we certainly expect experts within the community to propose even better solutions! Icon Smile

Thanks everyone for your help (especially @dtaht  !!), and we look forward to the results/feedback!

Emerging Member
Posts: 63
Registered: ‎03-24-2014
Kudos: 147

Re: Testing fq_codel in v1.5.0beta1

comments on your script, from my own very similar one.

(http://snapon.lab.bufferbloat.net/~d/ubnt/testscript )

 

0) I had no idea ifb names could be symbolic, and was allocating them out of a managed pool elsewhere.

your method is much simpler! Thank you!

 

1) I am not sure if all the correct modules are inserted at boot time, so I make sure they are:

for i in ifb act_mirred cls_u32 sch_fq_codel sch_htb
do
modprobe $i
done

is what I do.

2) The quantum 1500 on htb is ok for low rates, but it helps to make it larger as you get above 40mbit, typically increasing to 8000 or higher below 100mbit, higher still after that, to save on cpu in the scheduler.

3) at low rates (below 40Mbit) it pays to use "fq_codel quantum 300".

4) at really low rates (below 3Mbit) it pays to increase the codel target, e.g. "fq_codel quantum 300 target 15ms interval 150ms"

 

Previous Employee
Posts: 13,551
Registered: ‎06-10-2011
Kudos: 5430
Solutions: 1656
Contributions: 2

Re: Testing fq_codel in v1.5.0beta1

Thanks Dave for the great info on the parameters! I'll make them tweakable in the script! Icon Smile When we get to the actual implementation, we can make this dynamic based on the rates of course. Thanks!

Regular Member
Posts: 536
Registered: ‎11-12-2013
Kudos: 78
Solutions: 3

Re: Testing fq_codel in v1.5.0beta1

[ Edited ]

correct me wrong but has there not been like 3 or 4 versions of this same script that are all different yet meant to do the same thing? it makes me awfully paranoid about using a script that could be worse then another. i dont know why it can't just be simply and have 1 script everyone can edit to there needs

which version of this script is best and or easiest

and if someone could plz help me set it up for my connection speeds (explained in this post - http://community.ubnt.com/t5/EdgeMAX/S-FQ-CoDel-Support-Possible/m-p/829004/highlight/true#M30186 ) that would be great thanks

T1200 - ERX - UAP - R7000 - WEB6000Q
Previous Employee
Posts: 13,551
Registered: ‎06-10-2011
Kudos: 5430
Solutions: 1656
Contributions: 2

Re: Testing fq_codel in v1.5.0beta1

New script with tweakable parameters (also noted Dave's recommendation in comments Icon Smile):

Spoiler
#!/bin/bash

### basic settings
WAN_INTF=eth1
WAN_UP_SPEED=8000000
WAN_DOWN_SPEED=10000000

### advanced settings
TQDISC=fq_codel

# Dave Taht's recommendation:
#   less than 40mbit: 300
#   otherwise: 1514
FQ_CODEL_QUANTUM_UP=300
FQ_CODEL_QUANTUM_DOWN=300

# Dave Taht's recommendation:
#   less than 3mbit: 15ms
#   otherwise: 5ms
FQ_CODEL_TARGET_UP=5ms
FQ_CODEL_TARGET_DOWN=5ms

# Dave Taht's recommendation:
#   less than 40mbit: 1500
#   otherwise: higher (e.g., 8000 or higher for 100mbit etc.)
HTB_QUANTUM_UP=1500
HTB_QUANTUM_DOWN=1500

TQDISC_OPTS_UP=
TQDISC_OPTS_DOWN=
if [ "$TQDISC" == fq_codel ]; then
    TQDISC_OPTS_UP+="quantum $FQ_CODEL_QUANTUM_UP "
    TQDISC_OPTS_UP+="target $FQ_CODEL_TARGET_UP "
    TQDISC_OPTS_DOWN+="quantum $FQ_CODEL_QUANTUM_DOWN "
    TQDISC_OPTS_DOWN+="target $FQ_CODEL_TARGET_DOWN "
fi

WAN_IFB="ifb_${WAN_INTF}"
TC=/sbin/tc
IP=/sbin/ip

$TC qdisc del dev $WAN_INTF root >/dev/null 2>&1
$TC qdisc del dev $WAN_INTF ingress >/dev/null 2>&1
$TC qdisc del dev $WAN_IFB root >/dev/null 2>&1

[ "$1" == clear ] && exit 0

$TC qdisc add dev $WAN_INTF root handle 1: htb default 10
$TC class add dev $WAN_INTF parent 1: classid 1:1 \
    htb quantum $HTB_QUANTUM_UP \
    rate $WAN_UP_SPEED ceil $WAN_UP_SPEED
$TC class add dev $WAN_INTF parent 1:1 classid 1:10 \
    htb quantum $HTB_QUANTUM_UP \
    rate $WAN_UP_SPEED ceil $WAN_UP_SPEED
$TC qdisc add dev $WAN_INTF parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_UP

$IP link add $WAN_IFB type ifb >/dev/null 2>&1
$TC qdisc add dev $WAN_IFB root handle 1: htb default 10
$TC class add dev $WAN_IFB parent 1: classid 1:1 \
    htb quantum $HTB_QUANTUM_DOWN \
    rate $WAN_DOWN_SPEED ceil $WAN_DOWN_SPEED
$TC class add dev $WAN_IFB parent 1:1 classid 1:10 \
    htb quantum $HTB_QUANTUM_DOWN \
    rate $WAN_DOWN_SPEED ceil $WAN_DOWN_SPEED
$TC qdisc add dev $WAN_IFB parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_DOWN

$IP link set $WAN_IFB up
$TC qdisc add dev $WAN_INTF handle ffff: ingress
$TC filter add dev $WAN_INTF parent ffff: \
    protocol all prio 10 u32 match u32 0 0 flowid 1:1 \
    action mirred egress redirect dev $WAN_IFB

 

Previous Employee
Posts: 13,551
Registered: ‎06-10-2011
Kudos: 5430
Solutions: 1656
Contributions: 2

Re: Testing fq_codel in v1.5.0beta1

ConnorM: Yeah if you look at the scripts they are setting up the same structure (htb + fq_codel). The new script above does allow different parameters for up and down directions so might be easier in your case since your connection is quite asymmetric at 112M/6M according to the other thread, but certainly any of the scripts can be edited to achieve the same result.

Regular Member
Posts: 536
Registered: ‎11-12-2013
Kudos: 78
Solutions: 3

Re: Testing fq_codel in v1.5.0beta1

ok, could u plz clearly point out EVERYWHERE that i need to change something on that script to make it work. and or pointing out every possible variable on the script. cause i have like 0 idea where to start with this and that thing really confuses me

T1200 - ERX - UAP - R7000 - WEB6000Q
Regular Member
Posts: 536
Registered: ‎11-12-2013
Kudos: 78
Solutions: 3

Re: Testing fq_codel in v1.5.0beta1

#!/bin/bash

### basic settings
WAN_INTF=eth1
WAN_UP_SPEED=5500
WAN_DOWN_SPEED=100000

### advanced settings
TQDISC=fq_codel

# Dave Taht's recommendation:
#   less than 40mbit: 300
#   otherwise: 1514
FQ_CODEL_QUANTUM_UP=300 ( still no idea if i make this 300 or 1514 cause it DOES NOT SPECIFY IF FOR UPLOAD OR DOWNLOAD!!!!!!!!!!!!!
FQ_CODEL_QUANTUM_DOWN=300

# Dave Taht's recommendation:
#   less than 3mbit: 15ms
#   otherwise: 5ms
FQ_CODEL_TARGET_UP=5ms
FQ_CODEL_TARGET_DOWN=5ms

# Dave Taht's recommendation:
#   less than 40mbit: 1500
#   otherwise: higher (e.g., 8000 or higher for 100mbit etc.)
HTB_QUANTUM_UP=1500
HTB_QUANTUM_DOWN=1500

TQDISC_OPTS_UP=
TQDISC_OPTS_DOWN=
if [ "$TQDISC" == fq_codel ]; then
    TQDISC_OPTS_UP+="quantum $FQ_CODEL_QUANTUM_UP "
    TQDISC_OPTS_UP+="target $FQ_CODEL_TARGET_UP "
    TQDISC_OPTS_DOWN+="quantum $FQ_CODEL_QUANTUM_DOWN "
    TQDISC_OPTS_DOWN+="target $FQ_CODEL_TARGET_DOWN "
fi

WAN_IFB="ifb_${WAN_INTF}"
TC=/sbin/tc
IP=/sbin/ip

$TC qdisc del dev $WAN_INTF root >/dev/null 2>&1
$TC qdisc del dev $WAN_INTF ingress >/dev/null 2>&1
$TC qdisc del dev $WAN_IFB root >/dev/null 2>&1

[ "$1" == clear ] && exit 0

$TC qdisc add dev $WAN_INTF root handle 1: htb default 10
$TC class add dev $WAN_INTF parent 1: classid 1:1 \
    htb quantum $HTB_QUANTUM_UP \
    rate $WAN_UP_SPEED ceil $WAN_UP_SPEED
$TC class add dev $WAN_INTF parent 1:1 classid 1:10 \
    htb quantum $HTB_QUANTUM_UP \
    rate $WAN_UP_SPEED ceil $WAN_UP_SPEED
$TC qdisc add dev $WAN_INTF parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_UP

$IP link add $WAN_IFB type ifb >/dev/null 2>&1
$TC qdisc add dev $WAN_IFB root handle 1: htb default 10
$TC class add dev $WAN_IFB parent 1: classid 1:1 \
    htb quantum $HTB_QUANTUM_DOWN \
    rate $WAN_DOWN_SPEED ceil $WAN_DOWN_SPEED
$TC class add dev $WAN_IFB parent 1:1 classid 1:10 \
    htb quantum $HTB_QUANTUM_DOWN \
    rate $WAN_DOWN_SPEED ceil $WAN_DOWN_SPEED
$TC qdisc add dev $WAN_IFB parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_DOWN

$IP link set $WAN_IFB up
$TC qdisc add dev $WAN_INTF handle ffff: ingress
$TC filter add dev $WAN_INTF parent ffff: \
    protocol all prio 10 u32 match u32 0 0 flowid 1:1 \
    action mirred egress redirect dev $WAN_IFB


i am completely lost Man Sad

T1200 - ERX - UAP - R7000 - WEB6000Q
Regular Member
Posts: 536
Registered: ‎11-12-2013
Kudos: 78
Solutions: 3

Re: Testing fq_codel in v1.5.0beta1

[ Edited ]

serious question....... is it alot of work to customize this script for me? because it will probably be about 80000 times faster then me doing it myself. i just figured u guys could probably customize it to work in a couple minutes?

T1200 - ERX - UAP - R7000 - WEB6000Q
Regular Member
Posts: 536
Registered: ‎11-12-2013
Kudos: 78
Solutions: 3

Re: Testing fq_codel in v1.5.0beta1

is is what i got so far, no idea if any of it is right or if its completely wrong, help plz

#!/bin/bash

### basic settings
WAN_INTF=eth1
WAN_UP_SPEED=5500        
WAN_DOWN_SPEED=100000

### advanced settings
TQDISC=fq_codel

# Dave Taht's recommendation:
#   less than 40mbit: 300
#   otherwise: 1514
FQ_CODEL_QUANTUM_UP=300
FQ_CODEL_QUANTUM_DOWN=1514

# Dave Taht's recommendation:
#   less than 3mbit: 15ms
#   otherwise: 5ms
FQ_CODEL_TARGET_UP=5ms
FQ_CODEL_TARGET_DOWN=5ms

# Dave Taht's recommendation:
#   less than 40mbit: 1500
#   otherwise: higher (e.g., 8000 or higher for 100mbit etc.)
HTB_QUANTUM_UP=1500
HTB_QUANTUM_DOWN=8000

TQDISC_OPTS_UP=
TQDISC_OPTS_DOWN=
if [ "$TQDISC" == fq_codel ]; then
    TQDISC_OPTS_UP+="quantum $FQ_CODEL_QUANTUM_UP "
    TQDISC_OPTS_UP+="target $FQ_CODEL_TARGET_UP "
    TQDISC_OPTS_DOWN+="quantum $FQ_CODEL_QUANTUM_DOWN "
    TQDISC_OPTS_DOWN+="target $FQ_CODEL_TARGET_DOWN "
fi

WAN_IFB="ifb_${ETH1}"
TC=/sbin/tc
IP=/sbin/ip

$TC qdisc del dev $ETH1 root >/dev/null 2>&1
$TC qdisc del dev $ETH1 ingress >/dev/null 2>&1
$TC qdisc del dev $WAN_IFB root >/dev/null 2>&1

[ "$1" == clear ] && exit 0

$TC qdisc add dev $ETH1 root handle 1: htb default 10
$TC class add dev $ETH1 parent 1: classid 1:1 \
    htb quantum $HTB_QUANTUM_UP \
    rate $5500 ceil $5500
$TC class add dev $WAN_INTF parent 1:1 classid 1:10 \
    htb quantum $HTB_QUANTUM_UP \
    rate $5500 ceil $5500
$TC qdisc add dev $ETH1 parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_UP

$IP link add $WAN_IFB type ifb >/dev/null 2>&1
$TC qdisc add dev $WAN_IFB root handle 1: htb default 10
$TC class add dev $WAN_IFB parent 1: classid 1:1 \
    htb quantum $HTB_QUANTUM_DOWN \
    rate $100000 ceil $100000
$TC class add dev $WAN_IFB parent 1:1 classid 1:10 \
    htb quantum $HTB_QUANTUM_DOWN \
    rate $100000 ceil $100000
$TC qdisc add dev $WAN_IFB parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_DOWN

$IP link set $WAN_IFB up
$TC qdisc add dev $ETH1 handle ffff: ingress
$TC filter add dev $ETH1 parent ffff: \
    protocol all prio 10 u32 match u32 0 0 flowid 1:1 \
    action mirred egress redirect dev $WAN_IFB

T1200 - ERX - UAP - R7000 - WEB6000Q
Previous Employee
Posts: 13,551
Registered: ‎06-10-2011
Kudos: 5430
Solutions: 1656
Contributions: 2

Re: Testing fq_codel in v1.5.0beta1

Oh yeah looks mostly right, just a couple of things:

  • The unit for "WAN_UP_SPEED" and "WAN_DOWN_SPEED" is bits/second, so they should be 5500000 and 100000000, respectively.

  • Shouldn't need to change anything below the "HTB_QUANTUM_DOWN=8000" line for now. Looks like you've changed some additional lines, so you should probably start with a fresh copy and just change the lines above that (WAN_INTF, speeds, and the six numbers).
Established Member
Posts: 1,707
Registered: ‎02-07-2014
Kudos: 537
Solutions: 36

Re: Testing fq_codel in v1.5.0beta1


ConnorM wrote:

$TC qdisc add dev $ETH1 root handle 1: htb default 10
$TC class add dev $ETH1 parent 1: classid 1:1 \
    htb quantum $HTB_QUANTUM_UP \
    rate $5500 ceil $5500
$TC class add dev $WAN_INTF parent 1:1 classid 1:10 \
    htb quantum $HTB_QUANTUM_UP \
    rate $5500 ceil $5500
$TC qdisc add dev $ETH1 parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_UP

$IP link add $WAN_IFB type ifb >/dev/null 2>&1
$TC qdisc add dev $WAN_IFB root handle 1: htb default 10
$TC class add dev $WAN_IFB parent 1: classid 1:1 \
    htb quantum $HTB_QUANTUM_DOWN \
    rate $100000 ceil $100000
$TC class add dev $WAN_IFB parent 1:1 classid 1:10 \
    htb quantum $HTB_QUANTUM_DOWN \
    rate $100000 ceil $100000
$TC qdisc add dev $WAN_IFB parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_DOWN

you should leave those $WAN_UP_SPEED and $WAN_DOWN_SPEED in the bottom of the script, since that are variables that you gave values under the basic settings on top.

Regular Member
Posts: 536
Registered: ‎11-12-2013
Kudos: 78
Solutions: 3

Re: Testing fq_codel in v1.5.0beta1

[ Edited ]

ok, when i use ETH1 is it ok if its in caps or should it be like "eth1" with no caps

also where it sais "TQDISC_OPTS_UP = " am i suppose to leave this blank how i have essentially? or what will it do

is that really all i need to do? .....

thank you psydafke

T1200 - ERX - UAP - R7000 - WEB6000Q
Regular Member
Posts: 536
Registered: ‎11-12-2013
Kudos: 78
Solutions: 3

Re: Testing fq_codel in v1.5.0beta1

ok lets try again, can anyone see anything wrong with this?

#!/bin/bash

### basic settings
WAN_INTF=eth1
WAN_UP_SPEED=5500000
WAN_DOWN_SPEED=100000000

### advanced settings
TQDISC=fq_codel

# Dave Taht's recommendation:
#   less than 40mbit: 300
#   otherwise: 1514
FQ_CODEL_QUANTUM_UP=300
FQ_CODEL_QUANTUM_DOWN=1514

# Dave Taht's recommendation:
#   less than 3mbit: 15ms
#   otherwise: 5ms
FQ_CODEL_TARGET_UP=5ms
FQ_CODEL_TARGET_DOWN=5ms

# Dave Taht's recommendation:
#   less than 40mbit: 1500
#   otherwise: higher (e.g., 8000 or higher for 100mbit etc.)
HTB_QUANTUM_UP=1500
HTB_QUANTUM_DOWN=8000

TQDISC_OPTS_UP=
TQDISC_OPTS_DOWN=
if [ "$TQDISC" == fq_codel ]; then
    TQDISC_OPTS_UP+="quantum $FQ_CODEL_QUANTUM_UP "
    TQDISC_OPTS_UP+="target $FQ_CODEL_TARGET_UP "
    TQDISC_OPTS_DOWN+="quantum $FQ_CODEL_QUANTUM_DOWN "
    TQDISC_OPTS_DOWN+="target $FQ_CODEL_TARGET_DOWN "
fi

WAN_IFB="ifb_${WAN_INTF}"
TC=/sbin/tc
IP=/sbin/ip

$TC qdisc del dev $WAN_INTF root >/dev/null 2>&1
$TC qdisc del dev $WAN_INTF ingress >/dev/null 2>&1
$TC qdisc del dev $WAN_IFB root >/dev/null 2>&1

[ "$1" == clear ] && exit 0

$TC qdisc add dev $WAN_INTF root handle 1: htb default 10
$TC class add dev $WAN_INTF parent 1: classid 1:1 \
    htb quantum $HTB_QUANTUM_UP \
    rate $WAN_UP_SPEED ceil $WAN_UP_SPEED
$TC class add dev $WAN_INTF parent 1:1 classid 1:10 \
    htb quantum $HTB_QUANTUM_UP \
    rate $WAN_UP_SPEED ceil $WAN_UP_SPEED
$TC qdisc add dev $WAN_INTF parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_UP

$IP link add $WAN_IFB type ifb >/dev/null 2>&1
$TC qdisc add dev $WAN_IFB root handle 1: htb default 10
$TC class add dev $WAN_IFB parent 1: classid 1:1 \
    htb quantum $HTB_QUANTUM_DOWN \
    rate $WAN_DOWN_SPEED ceil $WAN_DOWN_SPEED
$TC class add dev $WAN_IFB parent 1:1 classid 1:10 \
    htb quantum $HTB_QUANTUM_DOWN \
    rate $WAN_DOWN_SPEED ceil $WAN_DOWN_SPEED
$TC qdisc add dev $WAN_IFB parent 1:10 handle 100: $TQDISC $TQDISC_OPTS_DOWN

$IP link set $WAN_IFB up
$TC qdisc add dev $WAN_INTF handle ffff: ingress
$TC filter add dev $WAN_INTF parent ffff: \
    protocol all prio 10 u32 match u32 0 0 flowid 1:1 \
    action mirred egress redirect dev $WAN_IFB

T1200 - ERX - UAP - R7000 - WEB6000Q
Established Member
Posts: 1,707
Registered: ‎02-07-2014
Kudos: 537
Solutions: 36

Re: Testing fq_codel in v1.5.0beta1

looks ok to me, fire it up Man Happy)

Regular Member
Posts: 536
Registered: ‎11-12-2013
Kudos: 78
Solutions: 3

Re: Testing fq_codel in v1.5.0beta1

[ Edited ]

not quite sure exactly how to do that yet.

a) i still have a shaper enabled and im about 99% i have to disable it first, doing this will not be a problem though.

b) don't know exactly how to get the script onto the router once its done, im sure i probably have to save it to a file and get it onto the router with winscp but im not sure the exact details on how to do this, if someone could clearly just explain each step to getting this setup now that would be great

i think i will start to do some tests to show how my connection acts under load currently. i will run the same tests with no limiters, and then show the results from a basic traffic-shaper policy vs no policy vs fq_codel. it is important to note i will be testing out codel on downstream aswell, while normally i only have my traffic-shaper applied to my upstream traffic going out of the wan interface.

T1200 - ERX - UAP - R7000 - WEB6000Q
Regular Member
Posts: 536
Registered: ‎11-12-2013
Kudos: 78
Solutions: 3

Re: Testing fq_codel in v1.5.0beta1

this might be slightly off topic because i wasnt using FQ-CoDel for the but just basic traffic shaper. however i think this video is still relevant because it is my best option other than using FQ-CoDel

but i wanted to make this video to show the problem i have been having with netalyzer. i am scared to even trust it now because its not reporting correct results. this video also shows that my current method of limiting my upstream is quite effective. though i hope that codel will be superior for both my down and upstream. i also wonder if FQ-CoDel will stop netalyzer from reporting incorect results

https://www.youtube.com/watch?v=KTlv9TCragY

T1200 - ERX - UAP - R7000 - WEB6000Q
Emerging Member
Posts: 63
Registered: ‎03-24-2014
Kudos: 147

Re: Testing fq_codel in v1.5.0beta1

netanalyzer does not report correct results above about 20Mbits, mostly due to being written in java, but also due to the limitations of the underlying (usually windows) stack.

When used vs codel or fq_codel it tends to report an early buffering value of (typically) about 500ms, which is basically correct for the first second or two of a codel'd stream. codel rapidly gets the buffering down below 5ms.


We've been after the netalyzer folk for years to at least detect fq techniques, and have given up on using java to deal with faster than 20mbits, thus the use of written-in-c tools like netperf and netperf-wrapper which we know can scale past gigabits.

Emerging Member
Posts: 63
Registered: ‎03-24-2014
Kudos: 147

Re: Testing fq_codel in v1.5.0beta1

htb takes modifiers for speed such as kbit or mbit (but not floating point), so if your uplink is 5.5mbits,

you can write 5500kbit

 

 

Regular Member
Posts: 536
Registered: ‎11-12-2013
Kudos: 78
Solutions: 3

Re: Testing fq_codel in v1.5.0beta1

[ Edited ]

ok so if i undertstand correct your essentially saying netalyzer is wrong, and as we can see in my video, my upstream buffering/jitter didnt exceed more then 20ms. which is suprisingly good for a simple limiter, to be honest im perfectly happy with it the way it is. but if codel can turn that 20ms into 5 that would be amazing.

could someone PLZ help me with how to get this script i edited onto the router


wait where should  i put 5500kbit ? instead of 5500000 ?

T1200 - ERX - UAP - R7000 - WEB6000Q
Reply