[Codel] Floating an Idea. ip_fq_codel

Eric Dumazet eric.dumazet at gmail.com
Tue May 20 11:31:41 EDT 2014

On Tue, 2014-05-20 at 20:16 +1000, Andrew McGregor wrote:
> That's about what constitutes a flow.  fq_codel as implemented in
> linux works per (source ip, dest ip, protocol, source port, dest port)
> 5-tuple.  Linux should probably support multiple flow hashing
> algorithms in the kernel.

Right. fq_codel uses the same trick than other qdisc, like SFQ

By _default_ it uses a 5-tuple hash. Thats convenient but not a

You can classify packets using a filter and for example hash only on the
part you need. For example destination IP, or source IP, depending if
you use fq_codel on egress or ingress sides.

tc qdisc add dev eth0 root handle 1: fq_codel flows 8192
tc filter add dev eth0 protocol ip parent 1: handle 1 \
	flow hash keys dst divisor 8192

Simple as that.

> On Tue, May 20, 2014 at 7:15 PM, Richard Edmands <thesirdmz at gmail.com>
> wrote:
>         In my environment we've got a fair chunk of torrent usage
>         happening (+ gaming) and with fq_codel giving the advantage to
>         whichever individual could open up as many connections as
>         possible the entire situation imploded very quickly.
>         So to balance this out I used htb to implement the IP part of
>         this (actually not really, i made groups of ip's which
>         belonged to individuals) and stuck fq_codel on top of the
>         divided setup.
>         With this system what now happens is each IP now gets equal
>         utilization of the link (actually, i'm a lazy hack. I only
>         implemented the uplink section) which prevents the advantage
>         of opening up as many connections as possible. 
>         Now when an individual decides to go nuts, they're limited to
>         what is available to them without harming everyone else,
>         without compromising maximum possible speed.
>         I have had this running in my environment for the past month
>         and WOW.
>         See pastebin'd implementation.
>         http://pastebin.com/hXtzFL9f
>         _______________________________________________
>         Codel mailing list
>         Codel at lists.bufferbloat.net
>         https://lists.bufferbloat.net/listinfo/codel
> _______________________________________________
> Codel mailing list
> Codel at lists.bufferbloat.net
> https://lists.bufferbloat.net/listinfo/codel

More information about the Codel mailing list