Cake - FQ_codel the next generation
 help / color / mirror / Atom feed
From: Jonathan Morton <chromatix99@gmail.com>
To: Adrian Popescu <adriannnpopescu@gmail.com>
Cc: cake@lists.bufferbloat.net
Subject: Re: [Cake] cake - first impression
Date: Thu, 23 Apr 2015 01:38:42 +0300	[thread overview]
Message-ID: <0A340D13-7319-4599-AC69-EA8D2328A266@gmail.com> (raw)
In-Reply-To: <CAF3M4P2=7KxyvsUxjfUMkW8F4aR33NBYu7cz3iQXk=JcD5pV7w@mail.gmail.com>


> On 23 Apr, 2015, at 00:26, Adrian Popescu <adriannnpopescu@gmail.com> wrote:
> 
> Cake is fast and seems to work, but there are some issues.
> 
> tc doesn't allow setting the number of flows for cake:
> 
> tc qdisc add dev eth0 root cake bandwidth 10mbit flows 2048
> What is "2048"?
> Usage: ... cake [ bandwidth RATE | unlimited ]
>                [ besteffort | precedence | diffserv8 | diffserv4 ]
>                [ flowblind | srchost | dsthost | hosts | flows ]
>                [ atm ]
> 
> bandwidth validation doesn't catch errors such as 100mbps:
> tc qdisc add dev eth0 root cake bandwidth 100mbps
> tc qdisc
> qdisc cake 8003: dev eth0 root refcnt 3 bandwidth 800Mbit diffserv4 flows

Firstly, tc delegates much of the qdisc configuration parsing to modules specialised for each qdisc.  Helper callbacks are provided for parsing tricky items like rates and times (and for printing them) - so the interpretation of “mbps” as “megaBYTES per second”, versus “mbit” as “megaBITS per second" is entirely up to tc itself.  The full range of such suffixes is therefore detailed in the tc manpage, and I have no inclination to artificially limit that.

Cake doesn’t support adjusting the number of queues per traffic class (yet), partly because we might want to set a different number for each class.  As an extreme case, we could set just one queue for the bulk class, observing that fewer resources should be expended on a low-priority class.  The “flows” keyword is provided as a way to restore the default FQ behaviour, using the entire 5-tuple rather than a subset or ignoring it completely.

On the other hand, there are potentially valid arguments for keeping the same number of queues in each class, not least that some ISPs use Diffserv in inappropriate ways, and that the overhead per queue is fairly low.  The memory usage for queue housekeeping is in the kilobytes with the present settings, which is trivial on most modern hardware, and the algorithms are mostly O(1) on CPU under normal conditions; there’s an edge case or two which triggers an O(n) scan, but I think there’s a reasonable way to eliminate even that.

There may also be nuances to queue counts that we haven’t yet implemented and might complicate matters, such as a dual-layer FQ offering per-host fairness as well as per-flow fairness.  Due to this uncertainty, and a strong desire to keep cake’s configuration simple, it’s a compile-time option only (ie. you have to edit the code).

Hence it’s a work in progress, albeit one that already works quite well.

 - Jonathan Morton


      reply	other threads:[~2015-04-22 22:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-22 21:26 Adrian Popescu
2015-04-22 22:38 ` Jonathan Morton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.bufferbloat.net/postorius/lists/cake.lists.bufferbloat.net/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0A340D13-7319-4599-AC69-EA8D2328A266@gmail.com \
    --to=chromatix99@gmail.com \
    --cc=adriannnpopescu@gmail.com \
    --cc=cake@lists.bufferbloat.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox