Re: [aqm] Codel's count variable and re-entering dropping state at small time intervals

Polina Goltsman <polina.goltsman@student.kit.edu> Fri, 14 August 2015 15:25 UTC

Return-Path: <polina.goltsman@student.kit.edu>
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 993511AC426 for <aqm@ietfa.amsl.com>; Fri, 14 Aug 2015 08:25:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
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 hZHqIf7NzdDD for <aqm@ietfa.amsl.com>; Fri, 14 Aug 2015 08:25:22 -0700 (PDT)
Received: from scc-mailout-kit-02.scc.kit.edu (scc-mailout-kit-02.scc.kit.edu [IPv6:2a00:1398:9:f712::810d:e752]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 963371AC418 for <aqm@ietf.org>; Fri, 14 Aug 2015 08:25:21 -0700 (PDT)
Received: from kit-msx-27.kit.edu ([2a00:1398:9:f612::27]) by scc-mailout-kit-02.scc.kit.edu with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (envelope-from <polina.goltsman@student.kit.edu>) id 1ZQGr6-0002ki-PM; Fri, 14 Aug 2015 17:25:18 +0200
Received: from scc-wkit-clx-224-41.scc.kit.edu (2a00:1398:9:fb00:1acf:5eff:fe15:5525) by smtp.kit.edu (2a00:1398:9:f612::106) with Microsoft SMTP Server (TLS) id 15.0.1076.9; Fri, 14 Aug 2015 17:25:16 +0200
Message-ID: <55CE085F.5080700@student.kit.edu>
Date: Fri, 14 Aug 2015 17:25:19 +0200
From: Polina Goltsman <polina.goltsman@student.kit.edu>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
MIME-Version: 1.0
To: Jonathan Morton <chromatix99@gmail.com>
References: <55AD2695.8050605@kit.edu> <07D540E8-1184-4DBD-B372-40C55A485C40@gmail.com> <55CDE8E3.4080207@student.kit.edu> <9EEB70FD-2B99-49AC-8C58-A74CFC0DEFC2@gmail.com>
In-Reply-To: <9EEB70FD-2B99-49AC-8C58-A74CFC0DEFC2@gmail.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8bit
X-Originating-IP: [2a00:1398:9:fb00:1acf:5eff:fe15:5525]
Archived-At: <http://mailarchive.ietf.org/arch/msg/aqm/F6teUQBuouvk8Zt4mlIIYs6gdjE>
Cc: Anil.Agarwal@viasat.com, Roland Bless <roland.bless@kit.edu>, codel@lists.bufferbloat.net, aqm@ietf.org
Subject: Re: [aqm] Codel's count variable and re-entering dropping state at small time intervals
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: <https://mailarchive.ietf.org/arch/browse/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: Fri, 14 Aug 2015 15:25:25 -0000

first, thanks again...

I forgot one thing though:

What is the default value of "threshold" for default interval and target?

-- Best Regards

On 08/14/2015 04:52 PM, Jonathan Morton wrote:
>> 1. in Cake, count saturates at 2^32-1, am I right (https://github.com/dtaht/sch_cake/blob/master/codel5.h#L352).
>>
>> could it make sense to saturate count when interval/sqrt(count) and interval/sqrt(count+1) are indistinguishable in timer resolution?
> Actually it saturates at 2^16-1, since count is declared as u16 (though it could reasonably be a wider type, too).
>
> At that point, there are about 2560 drops (or marks) per second; if it did go up to 2^32-1, that would be 655360 drops/marks per second.  Linux timers on modern hardware generally have microsecond resolution or better, so there is no reason to saturate early even in the latter case.
>
>> 2. I found three more changes from the original Codel:
>>
>> 2.1 Line292:  if (sojourn_time < target || queue is empty) instead of (sojourn_time < target || there is less than MTU bytes in the queue).
>>
>> was it changed because queue_length_in_bytes < MTU causes sojourn_time < target ?
> We found no reason to special-case the last packet in the queue, so we simplified the code by removing it.  Detecting MTU (via the “maxpacket” statistic) was rather fragile in the face of GRO and GSO, with some common hardware regularly producing 64K aggregates.
>
> Instead of special-casing the last packet, Cake constrains the target to 1.5 hardware MTUs (detected via the interface API, not via maxpacket) at the shaped rate.  This has more nearly the desired effect.
>
>> 2.2. Line 304:
>>
>> else if (vars->count > 1 && now - vars->drop_next < 8 * interval) {
>>   /* we were recently dropping; be more aggressive */
>>   return now - vars->first_above_time >
>>      codel_control_law(now, interval, vars->rec_inv_sqrt);
>> }
>>
>> 2.3. Line 308:
>>
>> else if (((now - vars->first_above_time) >> 15) * ((now - codel_get_enqueue_time(skb)) >> 15) > threshold) { return true; }.
>> This line is explained in this email from Cake mailing list: https://lists.bufferbloat.net/pipermail/cake/2015-May/000227.html
>>
>>
>> My question is - are these changes valid for a standalone Codel or are they specifically made to optimize Cake's scheduler?
> I believe they could be.  The intent is to bias interval according to how quickly the queue is growing, so as to react more aggressively to slow-start’s rapid growth than to congestion-avoidance slow growth.  It might be worth testing in a standalone context.
>
>   - Jonathan Morton
>