From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lb0-x236.google.com (mail-lb0-x236.google.com [IPv6:2a00:1450:4010:c04::236]) (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 C36FF21F351 for ; Sat, 7 Nov 2015 02:51:36 -0800 (PST) Received: by lbbkw15 with SMTP id kw15so66926655lbb.0 for ; Sat, 07 Nov 2015 02:51:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=unMPeF4pLpFHv/1IBj1ous3ZWVKQvp+AP0xyIyyMhTY=; b=LejObiDCJNznFjen+PE5xXA5P2Vdvi2edMpC7AbthdT/ToM5LSsSrY3o2AuwnFw696 VbQlhj6x/7xECG7BIYt5fw4tSa0/lYAWdALTC3cSJh9bZmCfqlMZV8765ZwMSTFJIf9y qyRDpASbIVXk4iaIWYobsiOVyr7ARZF/VNSw8Q2T48AFG9xtzJ7VJUHjHacz5F4drZss W55FxyYSxM1UKn/Fwbc2CkZJ4S5tHChX7AbiZtkk1ddAy+L877QuqLdON5CBbghZPEY8 7YH2vuEzqBRYEkkZ2zINHHBRkySzrxlBetm5LWCEoJBtN097xvtfMYtvNE4a7RHQmNF+ 2nqg== X-Received: by 10.112.130.138 with SMTP id oe10mr9244642lbb.54.1446893494001; Sat, 07 Nov 2015 02:51:34 -0800 (PST) Received: from bass.home.chromatix.fi (83-245-237-101-nat-p.elisa-mobile.fi. [83.245.237.101]) by smtp.gmail.com with ESMTPSA id br10sm737257lbb.4.2015.11.07.02.51.29 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 07 Nov 2015 02:51:33 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) From: Jonathan Morton In-Reply-To: <87y4eambyd.fsf@alrua-karlstad.karlstad.toke.dk> Date: Sat, 7 Nov 2015 12:51:23 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <87pozspckj.fsf@toke.dk> <6A2609D9-7747-487B-9484-ECC69C50DE96@gmx.de> <874mh3pai9.fsf@toke.dk> <50C2A7B7-1B81-41E1-B534-CA449296FE77@gmail.com> <87ziysldij.fsf@toke.dk> <87vb9fl7ec.fsf@toke.dk> <87611fkyd7.fsf@toke.dk> <340E3F23-2F9C-449F-ACA7-86031FBE3B31@gmail.com> <87y4eambyd.fsf@alrua-karlstad.karlstad.toke.dk> To: =?utf-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?= X-Mailer: Apple Mail (2.3096.5) Cc: cake@lists.bufferbloat.net Subject: Re: [Cake] Long-RTT broken again 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: Sat, 07 Nov 2015 10:51:59 -0000 Okay, I=E2=80=99ve tracked down the problem. Turns out to be one of = C=E2=80=99s more subtle misfeatures. I calculate the desired buffer size as rate * interval * 4. Since = interval is in =C2=B5s, rate * interval is a 64-bit temporary. However, = I forgot to cast either of these operands to the new width first, so the = upper half of the product was never calculated. After dividing by = 250000, the resulting buffer size was 8918 bytes - which was clamped up = to 64KB by a sanity check immediately afterwards. It=E2=80=99s thus remarkable that we got as much throughput as we did. While fixing this, I=E2=80=99m also adding configurability of the buffer = limit and statistics of how much of the buffer was actually ever used. = Additionally, I=E2=80=99m choosing a saner default for =E2=80=9Cunlimited=E2= =80=9D mode. - Jonathan Morton