From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.toke.dk (mail.toke.dk [45.145.95.4]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 959003B2A4 for ; Sun, 10 Jan 2021 08:21:48 -0500 (EST) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=20161023; t=1610284906; bh=PqcxyZSQAeRiT0+VCUlNRJN1oRBPPgS751lbzgytQLA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Sm/SQWxhTYAke8iPHgkvyei5HovEhL9i36RW+MEDQL+1k/L7W6xCvxtcXdxE2BQsr k1TUzx+55sosZAIA+d1JOtEjgc08DMkQSPs0QxszlzEKjFEVeOpEI+m5M9tXY+qyaW YnaL2jOnGVgY6BlYPGytgtZDg2pZ5Rqp14yf9NRn3nrqRV/OzjLIetSYOe8SI/DXi1 h4f62K48YEYck3aHnYcaD2BtBbvJvr8zMZLc4SWIJuXOsbATWogqIvn+4PyAr7DijK t8o9EgB7wgqzrupAFQpcOAKaKAKFBoB04y9ZEtKLNvHygV9PWgrhUJsuBlkv9qKXKw dBmqaIdmqbdEw== To: Jonathan Morton , Erik Auerswald Cc: bloat@lists.bufferbloat.net, Jesper Dangaard Brouer In-Reply-To: References: <20210110053919.GA14073@unix-ag.uni-kl.de> Date: Sun, 10 Jan 2021 14:21:46 +0100 X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <87ft39gc5x.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Bloat] Rebecca Drucker's talk sounds like it exposes an addressable bloat issue in Ciscos X-BeenThere: bloat@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: General list for discussing Bufferbloat List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2021 13:21:48 -0000 Jonathan Morton writes: > The virtual-clock algorithm I implemented in Cake is essentially a > deficit-mode algorithm. During any continuous period of traffic > delivery, defined as finding a packet in the queue when one is > scheduled to deliver, the time of delivering the next packet is > updated after every packet is delivered, by calculating the > serialisation time of that packet and adding it to the previous > delivery schedule. As long as that time is in the past, the next > packet may be delivered immediately. When it goes into the future, > the time to wait before delivering the next packet is precisely known. > Hence bursts occur only due to quantum effects and are automatically > of the minimum size necessary to maintain throughput, without any > configuration (explicit or otherwise). Also, while CAKE's shaper predates it, the rest of the Linux kernel is also moving to a timing-based packet scheduling model, following Van Jacobson's talk at Netdevconf in 2018: https://netdevconf.info/0x12/session.html?evolving-from-afap-teaching-nics-about-time In particular, the TCP stack uses early departure time since 2018: https://lwn.net/Articles/766564/ The (somewhat misnamed) sch_fq packet scheduler will also obey packet timestamps and when scheduling, which works with both the timestamps set by the TCP stack as per the commit above, but can also be set from userspace with a socket option, or from a BPF filter. Jesper wrote a BPF-based implementation of a shaper that uses a BPF filter to set packet timestamps to shape traffic at a set rate with precise timing (avoiding bursts): https://github.com/xdp-project/bpf-examples/tree/master/traffic-pacing-edt The use case here is an ISP middlebox that can smooth out traffic to avoid tail drops in shallow-buffered switches. He tells me it scales quite well, although some tuning of the kernel and drivers is necessary to completely avoid microbursts. There's also a BPF implementation of CoDel in there, BTW. I've been talking to Jesper about comparing his implementation's performance to the shaper in CAKE, but we haven't gotten around to it yet. We'll share data once we do, obviously :) -Toke