Subject: Re: knob to disable locally-originating qdisc optimisation?

From: Stephen Hemminger <[email-masked]>
Date: Thu, 27 Apr 2023 16:37:15 -0700

On Thu, 27 Apr 2023 13:21:26 -0700
Jakub Kicinski <[email-masked]> wrote:

> On Wed, 26 Apr 2023 14:54:30 +0200 (CEST) Thorsten Glaser wrote:
> > when traffic (e.g. iperf) is originating locally (as opposed to
> > forward traffic), the Linux kernel seems to apply some optimisations
> > probably to reduce overall bufferbloat: when the qdisc is “full” or
> > (and especially) when its dequeue often returns NULL (because packets
> > are delayed), the sender traffic rate is reduced by as much as ⅓ with
> > 40 ms extra latency (30 → 20 Mbit/s).  
> 
> Doesn't ring a bell, what's your setup?
> 
> > This is probably good in general but not so good for L4S where we
> > actually want the packets to queue up in the qdisc so they get ECN
> > marking appropriately (I guess there probably are some socket ioctls
> > or something with which the sending application could detect this
> > state; if so, we’d be interested in knowing about them as well).
> > 
> > This is especially bad in a testbed for writing L4S-aware applications,
> > so if there’s a knob (sysctl or something) to disable this optimisation
> > please do tell (I guess probably not, but asking doesn’t hurt).  

It might be BQL trying to limit outstanding packets locally.