Skip to contentSkip to conversation

fq_codel, htb and quantum parameter...

DISCUSSION Marco Gaiarin 2 participants 5 messages Dec 17, 2014 – Dec 18, 2014

lore
Share & tools
lore
#0 lore raw

A question, probably dumb, but i've no found relevant info out there...

If i use htb as a classifier (tc class), with parameters 'r2q' that do some sort of ''quantum automatic computation'', still i need to set 'quantum' on qdisc, specifically on fq_codel qdisc?

Thanks.

Signature · 8 lines
dott. Marco Gaiarin				        GNUPG Key ID: 240A3D66
  Associazione ``La Nostra Famiglia''                    http://www.sv.lnf.it/
  Polo FVG   -   Via della Bontà, 7 - 33078   -   San Vito al Tagliamento (PN)
  marco.gaiarin(at)lanostrafamiglia.it   t +39-0434-842711   f +39-0434-842797

		Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
    http://www.lanostrafamiglia.it/25/index.php/component/k2/item/123
	(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)
#1 lore raw

The two treatments of quantum are very different.

In htb, this is an optimization for lowering the cpu load on switching between classes. In the sqm system I gradually increased this parameter as bandwidth went up to ease the cpu (softirq) load on the system. It helps, but not a lot.

In fq_codel this is an optimization to change how much data (in bytes, rather than packets) is served from each flow, per round. If set very low it devolves to being more "packet fair" than "byte fair", and you re-introduce the sorts of problems that SFQ introduced, with needing things like ack prioritization, etc. If set too high you starve downloads on asymmetric networks.

So we have evolved to recomending that fq_codel be set to 300 bytes (roughly 4 ipv4 acks), on asymmetric networks running at less than 20mbit/sec (think your typical 22mbit/4mbit cable service or 8mbit/1mbit dsl service). https://tools.ietf.org/id/draft-*-aqm-

...and that it be left at the default, otherwise.

Reducing the fq_codel quantum and not doing anything else to the algorithm, allows for far more things than just acks (think, voip, dns, ipv6 acks, quic) to be slightly prioritized over larger packets on asymmetric networks. Otherwise, please leave it alone.

For a bit more detail on that there was a thread here recently, and me asking the dd-wrt devs to stop allowing for ack prioritization at all in their qos system when fq_codel is used, and numerous other docs elsewhere.

fq_codel is also sensitive to the overall bandwidth on the link. At rates below 2.5mbit, presently, target and interval should be bumped to account for the induced mtu time.

Quoted 23 lines · Marco Gaiarin

A question, probably dumb, but i've no found relevant info out there...

If i use htb as a classifier (tc class), with parameters 'r2q' that do some sort of ''quantum automatic computation'', still i need to set 'quantum' on qdisc, specifically on fq_codel qdisc?

Thanks.

--
dott. Marco Gaiarin GNUPG Key ID: 240A3D66
Associazione ``La Nostra Famiglia'' http://www.sv.lnf.it/
Polo FVG - Via della Bontà, 7 - 33078 - San Vito al Tagliamento (PN)
marco.gaiarin(at)lanostrafamiglia.it t +39-0434-842711 f +39-0434-842797

Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
http://www.lanostrafamiglia.it/25/index.php/component/k2/item/123
(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)
--
To unsubscribe from this list: send the line "unsubscribe lartc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 3 lines
Dave Täht

thttp://www.bufferbloat.net/projects/bloat/wiki/Upcoming_Talks
#2 lore raw
In reply to Marco Gaiarin

Mandi! Dave Taht
In chel di` si favelave...

Quoted 1 line

The two treatments of quantum are very different.

Very clear, thanks.

Quoted 3 lines

fq_codel is also sensitive to the overall bandwidth on the link. At rates below 2.5mbit, presently, target and interval should be bumped to account for the induced mtu time.

I'm roughly now on a 4M/640K, so seems i can keep default values on that.
But i've also to manage some even lower end lines; what are preferred value for rates below 2.5mbit?

Thanks.

Signature · 8 lines
dott. Marco Gaiarin				        GNUPG Key ID: 240A3D66
  Associazione ``La Nostra Famiglia''                    http://www.sv.lnf.it/
  Polo FVG   -   Via della Bontà, 7 - 33078   -   San Vito al Tagliamento (PN)
  marco.gaiarin(at)lanostrafamiglia.it   t +39-0434-842711   f +39-0434-842797

		Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
    http://www.lanostrafamiglia.it/25/index.php/component/k2/item/123
	(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)
#3 lore raw
In reply to Marco Gaiarin
Quoted 6 lines · Marco Gaiarin

Mandi! Dave Taht
In chel di` si favelave...

Quoted 1 line

The two treatments of quantum are very different.

Very clear, thanks.

Took me a long while to figure it out!

Quoted 9 lines
Quoted 4 lines

fq_codel is also sensitive to the overall bandwidth on the link. At rates below 2.5mbit, presently, target and interval should be bumped to account for the induced mtu time.

I'm roughly now on a 4M/640K, so seems i can keep default values on that.
But i've also to manage some even lower end lines; what are preferred value for rates below 2.5mbit?

You should account for 1MTU. If your mtu is 1500 bytes, and your bandwidth 1mbit, that is 13ms. Feel free to put in a little slop, rounding up to a target 15ms interval 150ms in that case.

At really low rates (like your 640k) sometimes SFQ is still better. Life is really hard with modern tcps at that rate. Feel free to fiddle.

We have improved this in later versions of fq_codel (cake), so it figures it out for you.

tc qdisc add dev eth0 root cake bandwidth 1mbit # should do the right thing. But cake ain't fully baked yet, and we haven't worked out the interactions with htb yet, in particular.

Quoted 15 lines

Thanks.

--
dott. Marco Gaiarin GNUPG Key ID: 240A3D66
Associazione ``La Nostra Famiglia'' http://www.sv.lnf.it/
Polo FVG - Via della Bontà, 7 - 33078 - San Vito al Tagliamento (PN)
marco.gaiarin(at)lanostrafamiglia.it t +39-0434-842711 f +39-0434-842797

Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
http://www.lanostrafamiglia.it/25/index.php/component/k2/item/123
(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)
--
To unsubscribe from this list: send the line "unsubscribe lartc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 3 lines
Dave Täht

thttp://www.bufferbloat.net/projects/bloat/wiki/Upcoming_Talks
#4 lore raw
In reply to Marco Gaiarin

Mandi! Dave Taht
In chel di` si favelave...

Quoted 3 lines
Quoted 2 lines
Quoted 1 line

The two treatments of quantum are very different.

Very clear, thanks.

Took me a long while to figure it out!

...and seems to me that we need a wiki to write down all that stuff...

Quoted 2 lines

We have improved this in later versions of fq_codel (cake), so it figures it out for you.

i'm on a debian wheezy, so kernel 3.2.0-4-686-pae and tc as of iproute2 package version 3.12.0-2, from backports.
So i think i need to wait some more time to eat the cake. ;-)

So, to try to sum your ''rule of thumb'':

QUANTUM:
+ for ASYMMETRIC lines running around at 20Mbit/s (downlink) or less, it is better to set 'quantum' to 300 (bytes), that is roughly 4 ipv4 ACK to leave fq_codel do ''automatic ACK priorization''.

+ for any other case, leave at the default.

Any ''manual ACK priorization'' is anyway considered ''deprecated'' by fq_codel, that do it internally and more eefficiently.

A question: 'quantum 300' have to be set on egress, or on ifb/ingress side? Or both?

TARGET and INTERVAL:
+ considering indipendently egress and ingress (so, companion ifb interface), if rates is > 2.5Mbit/s, leave the default value.

+ if rate is lower, it is needed to account for one MTU, in milliseconds, rounding a bit higher.
if MTU00 and BANDWd0Kbit/s, the MTU in milliseconds is:

	1500*8/640000 = 19ms

so we can round it to 20ms;

A question: interval it is safe to keep as 150ms? Or it is better to change also that accordingly? or it is unrelated, so it is better to set with other criteria?

+ at really low rates, roughly under 1Mbit/s, probably it is better to keep using SFQ instead of fw_codel, that is oriented with modern, high rates.

Say me if i've understood well. Thanks.

Signature · 8 lines
dott. Marco Gaiarin				        GNUPG Key ID: 240A3D66
  Associazione ``La Nostra Famiglia''                    http://www.sv.lnf.it/
  Polo FVG   -   Via della Bontà, 7 - 33078   -   San Vito al Tagliamento (PN)
  marco.gaiarin(at)lanostrafamiglia.it   t +39-0434-842711   f +39-0434-842797

		Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
    http://www.lanostrafamiglia.it/25/index.php/component/k2/item/123
	(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)