Jonathan Morton <[email protected]> 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 _______________________________________________ Bloat mailing list [email protected] https://lists.bufferbloat.net/listinfo/bloat
