Re: [aqm] Fwd: New Version Notification for draft-baker-aqm-sfq-implementation-00.txt

Dave Taht <dave.taht@gmail.com> Sat, 14 June 2014 00:26 UTC

Return-Path: <dave.taht@gmail.com>
X-Original-To: aqm@ietfa.amsl.com
Delivered-To: aqm@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C67A71B2AC0 for <aqm@ietfa.amsl.com>; Fri, 13 Jun 2014 17:26:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.3
X-Spam-Level: *
X-Spam-Status: No, score=1.3 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, GB_SUMOF=1, MANGLED_TOOL=2.3, SPF_PASS=-0.001] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xm_CGBKCIf0v for <aqm@ietfa.amsl.com>; Fri, 13 Jun 2014 17:26:45 -0700 (PDT)
Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c:c05::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0B1C11B2ABE for <aqm@ietf.org>; Fri, 13 Jun 2014 17:26:44 -0700 (PDT)
Received: by mail-wi0-f181.google.com with SMTP id n3so1662579wiv.14 for <aqm@ietf.org>; Fri, 13 Jun 2014 17:26:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=5ARPvGAKSu9kVovGuULmTRtso/raYC8hp3XBKlmfV/w=; b=p70oNcAua10Ij46FtLGoS1N7KrrsWNgR5XsTnDJYSg08d0EOTwv+YB5Gh6mssC+XAc l1+5HKht7eQVyWoy/D4d3fOq+CEMOTIVG1ihJ5nc0VSi/xJYQU2Yx/PQrXDKNjJLEVf8 EbvoJVQXYXC//0AmiPwSeBcVSXVqNVUQcuSPXhmusgW9geEDqONr4Mnw57H92b+aytPd eYRVErpfX3fHwWGgKWN7DDxelQYMo2DsCCCph4zAlbJov7BaJ8xCJC9Ocy4la/GwiMZ3 dVW3rhkzDD5hbIjbCitsKOlfwFWXh0OpKX47oaymBp+w26zFqZhvd6MGbIrQJ7anBBHB VESw==
MIME-Version: 1.0
X-Received: by 10.180.73.169 with SMTP id m9mr8623588wiv.53.1402705603408; Fri, 13 Jun 2014 17:26:43 -0700 (PDT)
Received: by 10.216.207.82 with HTTP; Fri, 13 Jun 2014 17:26:43 -0700 (PDT)
In-Reply-To: <FDF58CAD-0294-418F-9849-359896DBAA7E@cisco.com>
References: <20140613215207.11613.75352.idtracker@ietfa.amsl.com> <F8A92E62-4135-41F7-A069-711B27137BE5@cisco.com> <CAA93jw4u12Jhkpg=7vrwx_rn3aWf1CeOEuovWksNyxZMY0RqDQ@mail.gmail.com> <FDF58CAD-0294-418F-9849-359896DBAA7E@cisco.com>
Date: Fri, 13 Jun 2014 17:26:43 -0700
Message-ID: <CAA93jw7ncP42otxCwad2zQAAyB7YoBCUu1Ew+5SVBy9wLG5qhw@mail.gmail.com>
From: Dave Taht <dave.taht@gmail.com>
To: "Fred Baker (fred)" <fred@cisco.com>, "aqm@ietf.org" <aqm@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: http://mailarchive.ietf.org/arch/msg/aqm/5TymW19FnOLly-umJzK1a3ob2PQ
Subject: Re: [aqm] Fwd: New Version Notification for draft-baker-aqm-sfq-implementation-00.txt
X-BeenThere: aqm@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "Discussion list for active queue management and flow isolation." <aqm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/aqm>, <mailto:aqm-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/aqm/>
List-Post: <mailto:aqm@ietf.org>
List-Help: <mailto:aqm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/aqm>, <mailto:aqm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 14 Jun 2014 00:26:46 -0000

doing this privately...

" The weakness of a WRR approach is the search time
   expended when the queuing system is relatively empty, which the
   calendar queue model obviates."

This is a little strong.

Fq_codel (and DRR) is darn close to O(1) on the dequeue side for
sparse numbers of flows. I wouldn't use the word "searching" in describing
the behavior of DRR in this case.

        head = &q->new_flows;
        if (list_empty(head)) {
                head = &q->old_flows;
                if (list_empty(head))
                        return NULL;
        }
        flow = list_first_entry(head, struct fq_codel_flow, flowchain);

        if (flow->deficit <= 0) {
                flow->deficit += q->quantum;
                list_move_tail(&flow->flowchain, &q->old_flows);
                goto begin;
        }

If you have one flow only, and it's over it's quantum, you go through
this loop twice. If you have two flows and they are both over quantum,
3 times, but the next 2 times no more than once. Three flows, all over
quantum, 4 times, but the 3 next 3 times through no more than once
each.

(this is assuming that quantum is set for mtu size packets) So you end
up with times through the loop averaging less than 2.

Then applying codel to the queue, codel will iterate through it's list of
packets eventually delivering 1 or not. This too is short (function elided)

        skb = codel_dequeue(sch, &q->cparams, &flow->cvars, &q->cstats,
                            dequeue);

        flow->dropped += q->cstats.drop_count - prev_drop_count;
        flow->dropped += q->cstats.ecn_mark - prev_ecn_mark;

// the original fq_codel code would never hit this point below as codel always
// stopped dropping at one packet remaining per queue.

        if (!skb) {
                /* force a pass through old_flows to prevent starvation */
                if ((head == &q->new_flows) && !list_empty(&q->old_flows))
                        list_move_tail(&flow->flowchain, &q->old_flows);
                else
                        list_del_init(&flow->flowchain);
                goto begin;
        }

As drop rates are typically measured in fractions of a percentage
point, and IF codel empties a queue entirely and you have to select a
new drr queue, you have the sum of these behaviors as your maximum
overhead.

Does QFQ meet your definition of a calendar queue model?


On Fri, Jun 13, 2014 at 4:43 PM, Fred Baker (fred) <fred@cisco.com> wrote:
> Thanks
>
> On Jun 13, 2014, at 4:04 PM, Dave Taht <dave.taht@gmail.com> wrote:
>
>> Really excellent, Fred, on a first reading!
>>
>> nit 1) drops tend to happen in bursts on a tail drop queue (not
>> necessarily on this bottleneck, but elsewhere on the network). By
>> breaking up flows into sequences of distinctly different packets, this
>> applies minor damage to more flows, instead of severe damage to one
>> flow.
>>
>> I don't know where to put this or how to express it anywhere near as
>> well as you expressed everything else.
>>
>> 2) weighted FQ algos like QFQ and WFQ are interesting from a
>> take-advantage-of-diffserv perspective. I keep hoping to get a
>> simplified and more fq_codel-like implementation of QFQ, in
>> particular.
>>
>> 3) sch_fq is a *perfect* fq algo, instead of using a hash, it uses a
>> red-black tree to keep track of all flows. While memory and compute
>> intensive for a router, it's pretty awesome on hosts, and makes it
>> possible to schedule (and pace) tcp flows at a level much closer to
>> the driver hardware, using the same new/sparse vs persistent queue
>> distinction fq_codel does.
>>
>> 4) While I think I finally understand your longstanding criticism of
>> how aqm and scheduling technologies are indeed distinct, there is a
>> parameter that must be
>> shared globally between the two algorithms: the maximum overall queue
>> length (governing worst case drop behavior). This is the basic flaw of
>> applying
>> (at least in linux) sfq, drr, qfq, htb, etc naively with a drop tail
>> queue, as the maximum overall queue length is additive.
>>
>> Take for example a simple QoS setup
>>
>> filter that breaks up stuff into 4 QoS queues:
>>
>> drr 1 -> sfq limit 127 (prio)
>> drr 2 -> sfq limit 127 (video)
>> drr 3 -> sfq limit 127 (BE)
>> drr 4 -> sfq limit 127 (background)
>>
>> So you end up with worst case drop tail and delay behavior for drr +
>> sfq queue of 4*127 packets. If using weighted drr, the proportions
>> change, but the worst case drop behavior does not. If using something
>> like htb, the background queue has a worst case drop tail and delay
>> behavior of 4*127, be, 3*127, and so on. Having a shared overall queue
>> size is extremely important for being able to classify queues and get
>> sane behavior. You could, for example, try using 32 packet queues to
>> get the same overall worst case latency guarantee but you'd sacrifice
>> bandwidth if the majority of traffic was BE only.
>>
>> This is less important with a system that tries to measure latency and
>> be intelligent about drop behavior, but you still have worst case
>> behavior that is additive in the case of non-responsive flows.
>>
>> 4a) The problem with using individual queues for something like
>> pie-per-fq'd_queue, is that pie depends on being able to sample X
>> number of packets in order to determine it's drop decision, which it
>> may not get relevant to the overall load on the system for flows that
>> are too small to tweak pie's estimator, yet worth dropping a packet
>> from.
>>
>> 4b) and the opposite problem in codel, with a single codel queue
>> taking fq'd packets (rather than one codel queue per fq) is the
>> reliance on timestamps for dropping in and out of drop state, which
>> doesn't work if you don't do the timestamp in the right place.
>>
>>
>> (I'll no doubt find more nits later :) )
>>
>> On Fri, Jun 13, 2014 at 3:07 PM, Fred Baker (fred) <fred@cisco.com> wrote:
>>> I’d be interested in comments on this.
>>>
>>>> From: <internet-drafts@ietf.org>
>>>> Subject: New Version Notification for draft-baker-aqm-sfq-implementation-00.txt
>>>> Date: June 13, 2014 at 2:52:07 PM PDT
>>>> To: Fred Baker <fred@cisco.com>, Rong Pan <ropan@cisco.com>, Fred Baker <fred@cisco.com>, Rong Pan <ropan@cisco.com>
>>>>
>>>>
>>>> A new version of I-D, draft-baker-aqm-sfq-implementation-00.txt
>>>> has been successfully submitted by Fred Baker and posted to the
>>>> IETF repository.
>>>>
>>>> Name:         draft-baker-aqm-sfq-implementation
>>>> Revision:     00
>>>> Title:                On Queuing, Marking, and Dropping
>>>> Document date:        2014-06-13
>>>> Group:                Individual Submission
>>>> Pages:                14
>>>> URL:            http://www.ietf.org/internet-drafts/draft-baker-aqm-sfq-implementation-00.txt
>>>> Status:         https://datatracker.ietf.org/doc/draft-baker-aqm-sfq-implementation/
>>>> Htmlized:       http://tools.ietf.org/html/draft-baker-aqm-sfq-implementation-00
>>>>
>>>>
>>>> Abstract:
>>>>  This note discusses implementation strategies for coupled queuing and
>>>>  mark/drop algorithms.
>>>>
>>>>
>>>>
>>>>
>>>> Please note that it may take a couple of minutes from the time of submission
>>>> until the htmlized version and diff are available at tools.ietf.org.
>>>>
>>>> The IETF Secretariat
>>>>
>>>
>>>
>>> _______________________________________________
>>> aqm mailing list
>>> aqm@ietf.org
>>> https://www.ietf.org/mailman/listinfo/aqm
>>>
>>
>>
>>
>> --
>> Dave Täht
>>
>> NSFW: https://w2.eff.org/Censorship/Internet_censorship_bills/russell_0296_indecent.article
>



-- 
Dave Täht

NSFW: https://w2.eff.org/Censorship/Internet_censorship_bills/russell_0296_indecent.article