Re: [aqm] I-D Action: draft-ietf-aqm-codel-03.txt

Jonathan Morton <chromatix99@gmail.com> Thu, 07 July 2016 13:54 UTC

Return-Path: <chromatix99@gmail.com>
X-Original-To: aqm@ietfa.amsl.com
Delivered-To: aqm@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4B42D12D761 for <aqm@ietfa.amsl.com>; Thu, 7 Jul 2016 06:54:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.45
X-Spam-Level:
X-Spam-Status: No, score=-1.45 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, FSL_HELO_HOME=1, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 va_mEQjPJXuQ for <aqm@ietfa.amsl.com>; Thu, 7 Jul 2016 06:54:35 -0700 (PDT)
Received: from mail-lf0-x243.google.com (mail-lf0-x243.google.com [IPv6:2a00:1450:4010:c07::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4A61812D09F for <aqm@ietf.org>; Thu, 7 Jul 2016 06:54:35 -0700 (PDT)
Received: by mail-lf0-x243.google.com with SMTP id l188so1523925lfe.0 for <aqm@ietf.org>; Thu, 07 Jul 2016 06:54:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=xjAkjsQpm5hitYsNjlnlwAGg8I1I//U5/WNbOQAH7C0=; b=yaSEK0hE1qMjY0FOOXD4tJ7Y2CtbN51Ke78fEDrYNaxe3+p0baqP37CQo257KmMdi7 8MbE70dG9cf2jViZUpMprTueOXldPP0ZEv0PcVndnApvjbK0iIU/xaXWOGFDda+DTBik pxatf8sUBvBv65WdPmQB09H/OcjMXcdw3mG8Uw2E0giRfVuVnWnxH8MThELwMqIEOBuI ehI9G8rjxc9Lo8QG5dGvNBuNY9+lU79Bkoz0Gy4Xkv0yY/Tz3X8bQ/ZryAKmz+5SvUJ4 QwnOPVnwLYHg+8/vOIgeUxUo439jmwbx6dhjc+yt+gS4f4k/yPEKEWF+yzMzpgQeujgJ h15g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=xjAkjsQpm5hitYsNjlnlwAGg8I1I//U5/WNbOQAH7C0=; b=ZhqYfCYhmi6Huvji81THe9iL8GWR4hjcxfoGQFVOwmpMGMR3ATeeZstJAUMz9eCCLr 4MH57zNcyVXK7+BtM5iBpzaR5QcP3xuWoCKDeF4ifECWwKds1yAPgSeE1eOwpPdqzMb/ ocBGgyRY+AJcOVvLRlqpxci3+zNPt0xH/Sz/R8TyUmOi+MqVMwg8QqpCGy2xtlVw436w /OYAjEv2uacBxBEnJh4j8ivBFnPD40yPjXc1LJhFR8MokJKzXkioxGpRmbFIrSnywkIn dFUzE1U/t4kHSb1oQUSyv80OKjvVnT8CdlhpllWEe7Ncn+pW+hecqYUO6KOkrnbDbduS Eq+Q==
X-Gm-Message-State: ALyK8tILZWrdorB3RbwS+dpKXuWyHvSYFd2RsSkXZF9O0TmX9Z65HAga8yUzfELzwuQ8rQ==
X-Received: by 10.46.1.27 with SMTP id 27mr102603ljb.26.1467899673410; Thu, 07 Jul 2016 06:54:33 -0700 (PDT)
Received: from bass.home.chromatix.fi (37-33-96-207.bb.dnainternet.fi. [37.33.96.207]) by smtp.gmail.com with ESMTPSA id g16sm994742lji.44.2016.07.07.06.54.31 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Jul 2016 06:54:32 -0700 (PDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
From: Jonathan Morton <chromatix99@gmail.com>
In-Reply-To: <577E4C53.9030909@uni-tuebingen.de>
Date: Thu, 07 Jul 2016 16:54:28 +0300
Content-Transfer-Encoding: quoted-printable
Message-Id: <88A51A3A-64EE-4A6C-99A5-7EA8DC33CC8B@gmail.com>
References: <20160316000053.5163.88345.idtracker@ietfa.amsl.com> <56EEC35B.3000007@mti-systems.com> <56F0635A.7060004@student.kit.edu> <CAPRuP3k9NuTpK7WsRfOymJbTSup5aY7RgUtEDd-wsapXJxbKVg@mail.gmail.com> <1467892048445.64588@student.kit.edu> <577E4C53.9030909@uni-tuebingen.de>
To: Michael Menth <menth@uni-tuebingen.de>
X-Mailer: Apple Mail (2.3124)
Archived-At: <https://mailarchive.ietf.org/arch/msg/aqm/6JH6qNdkydfWKHfdedX6zw3i2_E>
Cc: "Goltsman, Polina" <polina.goltsman@student.kit.edu>, Andrew Mcgregor <andrewmcgr@google.com>, Fabian Schwarzkopf <f.schwarzkopf@yahoo.de>, Wesley Eddy <wes@mti-systems.com>, Dave Taht <dave.taht@gmail.com>, Jana Iyengar <jri@google.com>, "Bless, Roland (TM)" <roland.bless@kit.edu>, "aqm@ietf.org" <aqm@ietf.org>
Subject: Re: [aqm] I-D Action: draft-ietf-aqm-codel-03.txt
X-BeenThere: aqm@ietf.org
X-Mailman-Version: 2.1.17
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: Thu, 07 Jul 2016 13:54:37 -0000

> On 7 Jul, 2016, at 15:34, Michael Menth <menth@uni-tuebingen.de> wrote:
> 
>> Based on our evaluations, with pure CoDel (without FQ-CoDel),
>> "reentering" is actually a common case. I think Dave and Toke should
>> have more experimental results to answer this question. (I included Dave
>> in CC)
> 
> We also studied this issue about one or two years ago. The algorithm
> controlling the reentering of the dropping mode may have a significant
> impact on control variables, drop rates, drop pattern depending on the
> traffic. It can also impact utilization. Most interesting is probably
> Fig. 6 on page 7 in
> https://atlas.informatik.uni-tuebingen.de/~menth/papers/Menth16e.pdf

That’s a very interesting paper for Codel enthusiasts.  IMHO, Codel-ACT performs much better on the important metrics than plain Codel, especially when faced with multiplexed flows.

I had also noticed the potential for Codel’s count to increase unboundedly while working on Cake; in fact when implemented as a 16-bit counter, it would wrap around on certain workloads, causing apparently chaotic behaviour.  I therefore modified the variant of Codel that Cake used to *halve* the count on re-entry, a much more aggressive reduction than Codel-ACT uses, as well as using a saturating increment to prevent wraparound.  However, I kept the basic behaviour of waiting a full interval before re-entry.

More recently, I have changed Cake over to use COBALT, which is a combination of Codel and BLUE; Codel is intended to handle responsive flows which behave in a TCP-like manner, and BLUE to take over if the flow proves to be unresponsive (by running into the queue length limit).

COBALT uses a re-implemented version of Codel with a much simplified main loop.  It also has a novel re-entry behaviour: the count is reduced while the queue length is below target by running the algorithm in reverse, without marking or dropping.  This means that very short non-dropping periods result in a slight reduction in count, and longer periods result in a larger reduction; the reduction also occurs faster when count is high.

With your paper in mind, I may also change it to use the shorter re-entry delay of Codel-ACT, as you explain very clearly how it may be beneficial, and this shows in the graphs as a lower peak delay and a reduction in loss synchronisation between flows.  I also think it will allow Codel to adapt more cleanly to RTTs significantly shorter than it is configured for - this is important where the defaults are set for internet-scale traffic, and people unthinkingly rely on those defaults in a LAN environment.

Here is the relevant part of COBALT’s Codel implementation, showing the re-entry count reduction strategy:

if(next_due && vars->dropping) {
	/* Use ECN mark if possible, otherwise drop */
	drop = !(vars->ecn_marked = INET_ECN_set_ce(skb));

	vars->count++;
	if(!vars->count)
		vars->count--;
	cobalt_invsqrt(vars);
	vars->drop_next = cobalt_control_law(vars->drop_next, p->interval, vars->rec_inv_sqrt);
} else {
	while(next_due) {
		vars->count--;
		cobalt_invsqrt(vars);
		vars->drop_next = cobalt_control_law(vars->drop_next, p->interval, vars->rec_inv_sqrt);
		schedule = now - vars->drop_next;
		next_due = vars->count && schedule >= 0;
	}
}

The full code can be found here:
	https://github.com/dtaht/sch_cake/blob/master/cobalt.c

 - Jonathan Morton