Cake - FQ_codel the next generation
 help / color / mirror / Atom feed
From: "Luis E. Garcia" <luis@bitamins.net>
To: Jonathan Morton <chromatix99@gmail.com>
Cc: cake@lists.bufferbloat.net, codel@lists.bufferbloat.net
Subject: Re: [Cake] Proposing COBALT
Date: Mon, 23 May 2016 13:11:36 -0600	[thread overview]
Message-ID: <CALnBQ5krxPBVLuAXTLVb8FfvGG_Px=e+3cJpXoiqMmut1TfzjQ@mail.gmail.com> (raw)
In-Reply-To: <323AFC22-A092-4F59-8197-AF21EF73FD58@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4870 bytes --]

It sounds like COBALT should be a bit smoother in terms of recovery/switch
time from one state to another - if this is the case, I would say that it
is a nice improvement - FQ_CODEL is smooth/fast in it's transition (at
least in my observations on a ping test while running multiple streams to
the bandwidth cap), and if the transition of the states is improved - I'm
all for it :)

Shorter & simpler code is always welcomed - I look forward to testing it.
Now I just need to reconfigure the network with a test router, without
breaking the internet at home so my wife doesn't notice.

Luis

On Mon, May 23, 2016 at 12:30 PM, Jonathan Morton <chromatix99@gmail.com>
wrote:

>
> > On 20 May, 2016, at 19:43, Jonathan Morton <chromatix99@gmail.com>
> wrote:
> >
> >> On 20 May, 2016, at 19:37, Luis E. Garcia <luis@bitamins.net> wrote:
> >>
> >> I think this would be a great idea to implement and test.
> >> Can COBALT's behavior be easily implemented to test it using the
> OpenWRT or LEVE ?
> >
> > I assume you mean LEDE.
> >
> > Yes, the BLUE algorithm is very simple (and is already in Linux, if you
> want to see how it behaves independently).  It’s merely a case of modifying
> a fork of sch_codel and/or sch_fq_codel and/or sch_cake to run it in
> parallel with the Codel algorithm.
> >
> > I’ll probably get around to it once I’ve got some current Cake changes
> out of the way.
>
> While I don’t have COBALT working in an actual qdisc yet, I’ve coded the
> core algorithm - including a major refactoring of Codel.  This core code,
> containing *both* Codel and BLUE, is 90 lines *shorter* than codel5.h
> alone.  Quite a surprising amount of simplification.
>
> There’s even a possibility that it’ll be faster, especially on embedded
> CPUs, simply because it’s smaller.
>
> The simplification partly results from a change in API structure.  Rather
> than calling back into the qdisc to retrieve however many packets it wants,
> COBALT is handed one packet and a timestamp, and returns a flag indicating
> whether that packet should be dropped or delivered.  It becomes the qdisc’s
> responsibility to dequeue candidate packets and perform the actual
> dropping.  So there is no longer a gnarly branched loop in the middle of
> the AQM algorithm.
>
> There were objections to Codel’s “callback” structure for other reasons,
> too.  The refactoring obviates them all.
>
> The one remaining loop in the fast path is a new backoff strategy for the
> Codel phase where it’s just come out of the dropping state.  Originally
> Codel reduced count by 1 or 2 immediately, and reset count to zero after an
> arbitrary number of intervals had passed without the target delay being
> exceeded.  My previous modification changed the immediate reduction to a
> halving, in an attempt to avoid unbounded growth of the count value.
>
> In COBALT, I keep the drop-scheduler running in this phase, but without
> actually dropping packets, and *decrementing* count instead of incrementing
> it; the backoff phase then naturally ends when count returns to zero,
> instead of after an arbitrary hard timeout.  The loop simply ensures that
> count will reduce by the correct amount, even if traffic temporarily ceases
> on the queue.  Ideally, this should cause Codel’s count value to stabilise
> where 50% of the time is spent above target sojourn time, and 50% below.
> (Actual behaviour won’t quite be ideal, but it should be closer than
> before.)
>
> As another simplification, I eliminated the “primed” state (waiting for
> interval to expire) as an explicit entity, by simply scheduling the first
> drop event to be at now+interval when entering the dropping state.  This
> also eliminates the first_above_time variable.  Any packets with sojourn
> times below target will bump Codel out of the dropping state anyway.
>
> Yet another simplification is enabled by COBALT’s hybrid structure and the
> tacit assumption that it will be used with flow isolation.  Because BLUE is
> present to handle overloads, much logic to handle overloads and “extra”
> signalling in Codel is not replicated in the refactored version.  For
> example, there is no “drop then mark” logic any more; in all probability
> the traffic in one flow is either all ECN capable or all not so.
>
> BLUE doesn’t add much code; only two lines in the fast path, and a couple
> of extra entry points for the qdisc to signal queue-full and queue-empty.
>
> While going over codel5.h, I noticed that the invsqrt cache stored as u16
> while calculations were being done in u32.  This probably caused some major
> weirdness with Codel’s behaviour in Cake, so I fixed it in the original.
>
> Next step: get an actual qdisc working using this.
>
>  - Jonathan Morton
>
>

[-- Attachment #2: Type: text/html, Size: 5409 bytes --]

  reply	other threads:[~2016-05-23 19:11 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-20 10:04 Jonathan Morton
2016-05-20 11:37 ` moeller0
2016-05-20 12:18   ` Jonathan Morton
2016-05-20 13:22     ` moeller0
2016-05-20 14:36       ` Jonathan Morton
2016-05-20 16:03         ` David Lang
2016-05-20 17:31           ` Jonathan Morton
2016-05-20 16:37         ` Luis E. Garcia
2016-05-20 16:43           ` Jonathan Morton
2016-05-20 16:55             ` Luis E. Garcia
2016-05-23 18:30             ` Jonathan Morton
2016-05-23 19:11               ` Luis E. Garcia [this message]
2016-05-24 13:47               ` [Cake] [Codel] " Jeff Weeks
2016-05-24 14:07                 ` Jonathan Morton
2016-05-24 15:52                   ` Dave Täht
2016-05-24 15:56                     ` Jonathan Morton
2016-05-24 16:02                       ` Dave Taht
2016-05-25  6:40                         ` Loganaden Velvindron
2016-05-25 12:00                         ` Benjamin Cronce
2016-05-26 12:33                     ` Jonathan Morton
2016-06-03 19:09                       ` Noah Causin
2016-06-03 19:34                         ` Jonathan Morton
2016-06-04  1:01                           ` Andrew McGregor
2016-06-04  6:23                             ` Jonathan Morton
2016-06-04 13:55                             ` Jonathan Morton
2016-06-04 14:01                               ` moeller0
2016-06-04 14:16                                 ` Vincent Frentzel
2016-06-04 14:16                                 ` Jonathan Morton
2016-06-04 15:03                                   ` moeller0
2016-06-04 17:10                               ` Noah Causin
2016-06-04 17:49                                 ` Eric Dumazet
2016-06-04 19:55                                   ` Jonathan Morton
2016-06-04 20:56                                     ` Eric Dumazet
2016-06-27  3:56                                     ` Jonathan Morton
2016-06-27  7:59                                       ` moeller0
2016-06-27 15:18                                       ` Kevin Darbyshire-Bryant
2016-06-28  2:51                                         ` Jonathan Morton
2016-06-28  8:40                                           ` Kevin Darbyshire-Bryant
2016-06-28 15:33                                             ` Jonathan Morton
2016-06-28 17:37                                               ` Kevin Darbyshire-Bryant
2016-06-29 15:22                                                 ` Kevin Darbyshire-Bryant
2016-06-30  8:16                                                   ` Kevin Darbyshire-Bryant
2016-06-28 15:44                                             ` Dave Taht
2016-05-20 13:41     ` [Cake] " David Lang
2016-05-20 13:46       ` moeller0
2016-05-20 14:04         ` David Lang
2016-05-20 15:12           ` Jonathan Morton
2016-05-20 16:05             ` David Lang
2016-05-20 17:06               ` Jonathan Morton
2016-05-20 16:20             ` [Cake] [Codel] " Rick Jones
2016-05-20 16:35               ` Jonathan Morton
2016-05-20 17:01                 ` Rick Jones
2016-05-20 17:07                   ` Jonathan Morton
2016-05-20 17:21                     ` Rick Jones
2016-05-20 17:26                     ` David Lang
2016-05-20 17:33                       ` Jonathan Morton
2016-05-20 14:09       ` [Cake] " Jonathan Morton

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='CALnBQ5krxPBVLuAXTLVb8FfvGG_Px=e+3cJpXoiqMmut1TfzjQ@mail.gmail.com' \
    --to=luis@bitamins.net \
    --cc=cake@lists.bufferbloat.net \
    --cc=chromatix99@gmail.com \
    --cc=codel@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