From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-la0-x22f.google.com (mail-la0-x22f.google.com [IPv6:2a00:1450:4010:c03::22f]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by huchra.bufferbloat.net (Postfix) with ESMTPS id 310C221F259 for ; Sun, 3 May 2015 20:58:19 -0700 (PDT) Received: by labbd9 with SMTP id bd9so96149381lab.2 for ; Sun, 03 May 2015 20:58:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=b8a10xGT64fSP1hTEmZHq0h1l5Ua/OOkMYKeCH1aGOg=; b=obNXFfx+valAIDih5Wwz+feYWsVcril5Z/mpd6XhFNukZWu+RZ+zMjLAkVqg816ISy /Za+De2AGet+812uDcznjMtqsQHx5qznTG7MKQVm3Cdb5wvpXFk95x/Xuz70EAL0nkNi xka+zG9S78K94whuGsBjrpNSHRdCkulMrJTJaOa/TOPjpJYYWZtWBG5NyRwyEBQHURkg VuowH1bN2YHLdy1sJW2wpUxR/6EQ8T0SZRRNP/F3SfqXxFpozwSH7jqP3Bt66Cb+5Zqd mT+8BsL07soSCdoKpi2tOVpVkiWxC6W0asuWHg4Cbp7iwzHmaRnc9W6WletNGHjECKEr RM5A== X-Received: by 10.152.26.130 with SMTP id l2mr18073448lag.20.1430711897179; Sun, 03 May 2015 20:58:17 -0700 (PDT) Received: from bass.home.chromatix.fi (87-93-2-196.bb.dnainternet.fi. [87.93.2.196]) by mx.google.com with ESMTPSA id f4sm3077013lbd.49.2015.05.03.20.58.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 03 May 2015 20:58:16 -0700 (PDT) From: Jonathan Morton Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-Id: <7D56E9A0-E611-47D6-996D-798700F7D050@gmail.com> Date: Mon, 4 May 2015 06:58:08 +0300 To: cake@lists.bufferbloat.net Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) X-Mailer: Apple Mail (2.2098) Subject: [Cake] Cake fix: diffserv4 priority quanta X-BeenThere: cake@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: Cake - FQ_codel the next generation List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2015 03:58:48 -0000 My preferred cake fix is Death By Chocolate - and it=E2=80=99s been = quite a while since I=E2=80=99ve had any. But this will have to do for = now. While drafting a paper to go with the code, I had to go back and think = about the rationale for quite a few things, and this revealed that the = quanta used for the priority layer in diffserv4 mode were incorrect. = There are two sets of quanta here: - The one used when the allocated bandwidth for the class has not been = exceeded, which sets a priority balance. The ratios here need to be at = least sufficient to allow any higher-priority class to force any = lower-priority class out of the higher class's allocation; in practice = it=E2=80=99s only necessary to consider adjacent pairs for this purpose. - The one used when the allocated bandwidth for the class *has* been = exceeded, which sets a bandwidth balance. The ratios here should = correspond to the effective allocations when *all* classes are fully = saturated; transitions between the bandwidth and priority balance states = take care of any other case. The effective saturated allocation is the = class=E2=80=99s own allocation *minus* the allocation of the class above = it. The basic allocations of the four classes in diffserv4 are: Background: 100% Best Effort: 15/16 Video: 3/4 Voice: 1/4 The effective saturated allocations are therefore: Background: 1/16 Best Effort: 3/16 Video: 1/2 Voice: 1/4 It is now obvious that the quantum ratio between Best Effort and = Background needs to be at least 16:1 in the priority balance, and should = be 3:1 in the bandwidth balance. Ratios of 4:1 for the = elevated-priority classes in priority balance are sufficient. The quanta for the diffserv8 and precedence modes are already sane = (although the bandwidth-balanced quantum for the highest class turns out = low, but this doesn't matter in practice; exercise for the reader is to = work out why). It helped, there, that the bandwidth allocations proceed = geometrically (7:8 ratio in each step up) and are thus easier to = calculate intuitively. I=E2=80=99ve just pushed a corresponding patch to the net-next derived = repo. I don=E2=80=99t have push access to the out-of-tree version. - Jonathan Morton