netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Dave Taht <dave.taht@gmail.com>
Cc: Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	Jason Wang <jasowang@redhat.com>,
	hengqi@linux.alibaba.com, netdev@vger.kernel.org
Subject: Re: virtio-net + BQL
Date: Sun, 25 Feb 2024 13:36:28 -0500	[thread overview]
Message-ID: <20240225133416-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CAA93jw7G5ukKv2fM3D3YQKUcAPs7A8cW46gRt6gJnYLYaRnNWg@mail.gmail.com>

On Fri, Feb 23, 2024 at 07:58:34AM -0500, Dave Taht wrote:
> On Fri, Feb 23, 2024 at 3:59 AM Xuan Zhuo <xuanzhuo@linux.alibaba.com> wrote:
> >
> > Hi Dave,
> >
> > We study the BQL recently.
> >
> > For virtio-net, the skb orphan mode is the problem for the BQL. But now, we have
> > netdim, maybe it is time for a change. @Heng is working for the netdim.
> >
> > But the performance number from https://lwn.net/Articles/469652/ has not appeal
> > to me.
> >
> > The below number is good, but that just work when the nic is busy.
> >
> >         No BQL, tso on: 3000-3200K bytes in queue: 36 tps
> >         BQL, tso on: 156-194K bytes in queue, 535 tps
> 
> That is data from 2011 against a gbit interface. Each of those BQL
> queues is additive.
> 
> > Or I miss something.
> 
> What I see nowadays is 16+Mbytes vanishing into ring buffers and
> affecting packet pacing, and fair queue and QoS behaviors. Certainly
> my own efforts with eBPF and LibreQos are helping observability here,
> but it seems to me that the virtualized stack is not getting enough
> pushback from the underlying cloudy driver - be it this one, or nitro.
> Most of the time the packet shaping seems to take place in the cloud
> network or driver on a per-vm basis.
> 
> I know that adding BQL to virtio has been tried before, and I keep
> hoping it gets tried again,
> measuring latency under load.
> 
> BQL has sprouted some new latency issues since 2011 given the enormous
> number of hardware queues exposed which I talked about a bit in my
> netdevconf talk here:
> 
> https://www.youtube.com/watch?v=rWnb543Sdk8&t=2603s
> 
> I am also interested in how similar AI workloads are to the infamous
> rrul test in a virtualized environment also.
> 
> There is also AFAP thinking mis-understood-  with a really
> mind-bogglingly-wrong application of it documented over here, where
> 15ms of delay in the stack is considered good.
> 
> https://github.com/cilium/cilium/issues/29083#issuecomment-1824756141
> 
> So my overall concern is a bit broader than "just add bql", but in
> other drivers, it was only 6 lines of code....
> 
> > Thanks.
> >
> 
> 

It is less BQL it is more TCP small queues which do not
seem to work well when your kernel isn't running part of the
time because hypervisor scheduled it out. wireless has some
of the same problem with huge variance in latency unrelated
to load and IIRC worked around that by
tuning socket queue size slightly differently.



-- 
MST


  reply	other threads:[~2024-02-25 18:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-23  8:49 virtio-net + BQL Xuan Zhuo
2024-02-23 12:58 ` Dave Taht
2024-02-25 18:36   ` Michael S. Tsirkin [this message]
2024-02-25 18:58     ` Dave Taht
2024-02-25 20:26       ` Michael S. Tsirkin
2024-02-26  5:03         ` Jason Wang
2024-02-26 11:42           ` Michael S. Tsirkin
2024-02-27  2:32           ` Xuan Zhuo
2024-02-27  2:20   ` Xuan Zhuo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240225133416-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=dave.taht@gmail.com \
    --cc=hengqi@linux.alibaba.com \
    --cc=jasowang@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=xuanzhuo@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).