Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1277660pxj; Wed, 19 May 2021 02:19:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPRyA6+6tcLNYXUb+3Vg+bQxf7Zub6il09JoZiAheY0nFpRD2YtmeYpke1044Faz68GVrB X-Received: by 2002:a05:6e02:1b83:: with SMTP id h3mr8646879ili.199.1621415940903; Wed, 19 May 2021 02:19:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621415940; cv=none; d=google.com; s=arc-20160816; b=aq+H1GllFySxpoeDt0VWcbyDzyXwbzav2YdnT66nkSoNW/kUUR1JkfG9xWF5SRbFfH pqrH8eBVST0muxdo7RMv/gE0BnV9G20cFP+vyxutR/uBuA+0bFmw2ve9DLt/tDJ1algG xW7WIQJK7Dl1k6GLbPO5Y8Y51m2LXe+UxMukavu6U5l77Y/ms4U/hhWkS04JCdR+wFCX GFWmnMNE3Uo0O4I5wpSJK1QjSUFpvDSqYHTrOkFg/6ofC/mna/nYVnoRSFtUIiuoHYF9 w3XUKuaM5fjKEVQiEejF0Ks4C5NrvSHZHb4UWHsLpfbEmj3iVdGG3eQoQKrZUIsYVQfS +RDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=h13rmsMrSOuIdoaAkAi4bIZZYwWsQNek+pOTNI52ZT4=; b=iGHvKrY2HRkyZIySiJ4c4WIH6soatRHVsi6KbXHFhm6X8Kq5NzzcxAHuU/PvpPV97c PW+H4nrHzYP80HyCyETYSXYWA0tuPmfxrbzPmDe8HkfVg3WLesdQvo2V9jFDOCDHSkRo yyzxZ/18sjo1bEPxepu6/vE0zUIiEX4o/Y8bPj0o3QPYbp9Tal3yYDg4Cqf1OEWRx2UI JMXSaihIEpspZf4wwiXKR/dOKdE1XdeTqdaE1ErB5XuFO6PCHzf5K1PVveas5KJxL62z tOOoNVy0mQQUOVlUD83SAPCp3TF+9Lx436D0nbkDOj0k6iXgeSZuYefxRoiJniTsHsBe P+uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O51onOmU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i17si12093283ioi.33.2021.05.19.02.18.48; Wed, 19 May 2021 02:19:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O51onOmU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239040AbhEQXdy (ORCPT + 99 others); Mon, 17 May 2021 19:33:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231543AbhEQXdw (ORCPT ); Mon, 17 May 2021 19:33:52 -0400 Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3730C061573; Mon, 17 May 2021 16:32:34 -0700 (PDT) Received: by mail-io1-xd2a.google.com with SMTP id n40so7576087ioz.4; Mon, 17 May 2021 16:32:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=h13rmsMrSOuIdoaAkAi4bIZZYwWsQNek+pOTNI52ZT4=; b=O51onOmUelD618wNr4Hbm5Ht3MdcvVMDQHpfv2HY5g+UBbJwnXTRoktDI/UNa0x5hS DxiqD0OSyj0L0wXWoTV1A+zsD/xVKzKGp2nuHEQRza2NCdIMiuwzGaJROhAin2DIOMfT CrOKJiVgVYagXyMXLVDkYQLq0Gn1g15I+/rTxCI7bmO9m0muo27objmJLLTYjb9xzwEB ZtGyzZ7tmy2pndzhvd6EEYIQPKsVuQjf+d7tax17kj9mavQzw8l6WbrXxDFndA0oZQsf TKO51cdRVb8WAnWB5d9VC0KCBRG6BBQsiH0GjT3GFDCpqhn0hYauQAYhBUhxlrgIvCvm eXQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=h13rmsMrSOuIdoaAkAi4bIZZYwWsQNek+pOTNI52ZT4=; b=BzzVhGZ5pBPxLB8XxhlOP1cir7Y8zpDnmXzT9MIhHuy/CLlWm5LkFQLh++r/0Ae1T/ aiB6M0pxI7hxFz2QcJYiq5Gk5mD2E4lio0KEHYXtGWFQK7orGT2k4kNvMQIIyiJNktkF T68nDbLEBjK21g2LtENslhv3vpd3bJL5D1oIF8OV9d5CoCj+jJh4btpJH8s80BJK/6z+ uQ+ezZdszpCEbaNZ/rlpL4IpuHy0WQCH5E+6UUkS4Ev64nB8R8DudoHdQaHRFwY+ZOuf CFQkXXtfKk9ExZ7UVbdqpGeoMmq0PYPxSZx/x2/kAH3W7L7PFrYoyLrbmTAHjIN9X/5D KA6w== X-Gm-Message-State: AOAM532PiKgD0JmOMg46UUgb36jXPXI+5e3qMzqGEL5Qb7qrVmMN4UpD nQ5EyUMbn5MCK2ukuP0kCZppboxnWiJnErQ4UuOIMKsX3rE= X-Received: by 2002:a6b:6905:: with SMTP id e5mr2019219ioc.100.1621294354111; Mon, 17 May 2021 16:32:34 -0700 (PDT) MIME-Version: 1.0 References: <56270996-33a6-d71b-d935-452dad121df7@linux.alibaba.com> <20210517160036.4093d3f2@hermes.local> In-Reply-To: <20210517160036.4093d3f2@hermes.local> From: Dave Taht Date: Mon, 17 May 2021 16:32:21 -0700 Message-ID: Subject: Re: [Bloat] virtio_net: BQL? To: Stephen Hemminger Cc: Willem de Bruijn , "Michael S. Tsirkin" , Xianting Tian , Linux Kernel Network Developers , LKML , virtualization , bloat , Jakub Kicinski , "David S. Miller" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 17, 2021 at 4:00 PM Stephen Hemminger wrote: > > On Mon, 17 May 2021 14:48:46 -0700 > Dave Taht wrote: > > > On Mon, May 17, 2021 at 1:23 PM Willem de Bruijn > > wrote: > > > > > > On Mon, May 17, 2021 at 2:44 PM Dave Taht wrote= : > > > > > > > > Not really related to this patch, but is there some reason why virt= io > > > > has no support for BQL? > > > > > > There have been a few attempts to add it over the years. > > > > > > Most recently, https://lore.kernel.org/lkml/20181205225323.12555-2-ms= t@redhat.com/ > > > > > > That thread has a long discussion. I think the key open issue remains > > > > > > "The tricky part is the mode switching between napi and no napi." > > > > Oy, vey. > > > > I didn't pay any attention to that discussion, sadly enough. > > > > It's been about that long (2018) since I paid any attention to > > bufferbloat in the cloud and my cloudy provider (linode) switched to > > using virtio when I wasn't looking. For over a year now, I'd been > > getting reports saying that comcast's pie rollout wasn't working as > > well as expected, that evenroute's implementation of sch_cake and sqm > > on inbound wasn't working right, nor pf_sense's and numerous other > > issues at Internet scale. > > > > Last week I ran a string of benchmarks against starlink's new services > > and was really aghast at what I found there, too. but the problem > > seemed deeper than in just the dishy... > > > > Without BQL, there's no backpressure for fq_codel to do its thing. > > None. My measurement servers aren't FQ-codeling > > no matter how much load I put on them. Since that qdisc is the default > > now in most linux distributions, I imagine that the bulk of the cloud > > is now behaving as erratically as linux was in 2011 with enormous > > swings in throughput and latency from GSO/TSO hitting overlarge rx/tx > > rings, [1], breaking various rate estimators in codel, pie and the tcp > > stack itself. > > > > See: > > > > http://fremont.starlink.taht.net/~d/virtio_nobql/rrul_-_evenroute_v3_se= rver_fq_codel.png > > > > See the swings in latency there? that's symptomatic of tx/rx rings > > filling and emptying. > > > > it wasn't until I switched my measurement server temporarily over to > > sch_fq that I got a rrul result that was close to the results we used > > to get from the virtualized e1000e drivers we were using in 2014. > > > > http://fremont.starlink.taht.net/~d/virtio_nobql/rrul_-_evenroute_v3_se= rver_fq.png > > > > While I have long supported the use of sch_fq for tcp-heavy workloads, > > it still behaves better with bql in place, and fq_codel is better for > > generic workloads... but needs bql based backpressure to kick in. > > > > [1] I really hope I'm overreacting but, um, er, could someone(s) spin > > up a new patch that does bql in some way even half right for this > > driver and help test it? I haven't built a kernel in a while. > > > > The Azure network driver (netvsc) also does not have BQL. Several years a= go > I tried adding it but it benchmarked worse and there is the added complex= ity > of handling the accelerated networking VF path. I certainly agree it adds complexity, but the question is what sort of network behavior resulted without backpressure inside the vm? What sorts of benchmarks did you do? I will get setup to do some testing of this that is less adhoc. --=20 Latest Podcast: https://www.linkedin.com/feed/update/urn:li:activity:6791014284936785920/ Dave T=C3=A4ht CTO, TekLibre, LLC