Received: by 10.223.185.116 with SMTP id b49csp1037305wrg; Fri, 16 Feb 2018 11:14:44 -0800 (PST) X-Google-Smtp-Source: AH8x225aziyCniI3UgtqUUe/XK1bQTd4AMVpyUSrfPkVTgPjCyQQnwojS9kHCjorVgdcxJMKZD9H X-Received: by 10.98.31.79 with SMTP id f76mr3180733pff.60.1518808483940; Fri, 16 Feb 2018 11:14:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1518808483; cv=pass; d=google.com; s=arc-20160816; b=zMZSABDVT0HEHK0bcFo8HZSQbc+M2EIh2Ly72RrIudP/KboCP+k18jynzoerHog4bh 52C0lwQr3egYOqJydNzMmZPTXMWwo+mClZDNgKH92thGnouq5eFu8+EsXdy0RiyCC15x RZLrqC47yFLQ6OkSBH+Aq8AmFm8wStbzfmHtjitHglTBuNetrYQQwFEqQmon3PwZytha hDaBC9FX2oDV4pWHQWHPAmochnn6Pf5ABaDjXVZUQiF3VfHsMr4KOE8M6eHkJF+KzfK2 hsX4+YjZe9YWLkjstxRlGdef5NYyXgckdUDxgHnswaHuPUam2tuf60DUnKwjjcV61YFS 8muw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:arc-authentication-results :arc-message-signature:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dmarc-filter:arc-authentication-results; bh=aXWm3PoC35jSDJ09cLzbO9l3BqzGTa1DSwhNF6GUhAg=; b=HLC2uBEiAPXpkv4pVNy/zeYdkyujdFklVDwNIJQxfor4aL1KW4NAUuTUeThuU2Yep0 N1qU/4ojiijai+HKZ6o/WaUB5vHIhOaMh9SjokRuwD+U3ox7TjB1nOaep/f82QlxMdKF qKOSuP1bql/M4I+PWYpoIBNesZmblhITy7Zw9v0LBEioMfb2WLt8RekE5oFDXXticW4k a6bwK6TMmiDCD+PnvBa8+EfQvF67JPVSsezLRW9p2rJqFpEnDRTcn/Tbfkz1yU0A305T ted6fXNpJ9zZHkt0Rh/4s3d54y+NK6bbgttQ7nyjdjkTL51J2k/xQWlzCOyoBeAfU5hI QHkQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@natalenko.name header.s=dkim-20170712 header.b=W/Sth+Es; arc=pass (i=1); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=natalenko.name Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n6si1681934pgr.31.2018.02.16.11.14.29; Fri, 16 Feb 2018 11:14:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@natalenko.name header.s=dkim-20170712 header.b=W/Sth+Es; arc=pass (i=1); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=natalenko.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967061AbeBPPP5 (ORCPT + 99 others); Fri, 16 Feb 2018 10:15:57 -0500 Received: from vulcan.natalenko.name ([104.207.131.136]:38616 "EHLO vulcan.natalenko.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752192AbeBPPPz (ORCPT ); Fri, 16 Feb 2018 10:15:55 -0500 Received: from spock.localnet (unknown [IPv6:2001:470:5b39:28:d9be:599a:83a5:fae4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by vulcan.natalenko.name (Postfix) with ESMTPSA id 88D1A2F8C77; Fri, 16 Feb 2018 16:15:52 +0100 (CET) DMARC-Filter: OpenDMARC Filter v1.3.2 vulcan.natalenko.name 88D1A2F8C77 Authentication-Results: vulcan.natalenko.name; dmarc=fail (p=none dis=none) header.from=natalenko.name From: Oleksandr Natalenko To: "David S. Miller" Cc: Alexey Kuznetsov , Hideaki YOSHIFUJI , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Eric Dumazet , Soheil Hassas Yeganeh , Neal Cardwell , Yuchung Cheng , Van Jacobson , Jerry Chu Subject: Re: TCP and BBR: reproducibly low cwnd and bandwidth Date: Fri, 16 Feb 2018 16:15:51 +0100 Message-ID: <2189487.nPhU5NAnbi@natalenko.name> In-Reply-To: <1697118.nv5eASg0nx@natalenko.name> References: <1697118.nv5eASg0nx@natalenko.name> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=natalenko.name; s=arc-20170712; t=1518794152; h=from:subject:date:message-id:to:cc:mime-version:content-type:content-transfer-encoding:in-reply-to:references; bh=aXWm3PoC35jSDJ09cLzbO9l3BqzGTa1DSwhNF6GUhAg=; b=0RelFhp9kE7M95tpPwQY5GI+QajuLqhFbFKkEt5sWD9Y2pvlRacZFoKhnwVOWNjxOP7B/W v3N7/xhltV3ziZuRQ/xOruUmFqdfGFwuXAxCVAhHAWO6OHxZoOYQ7/Ga6gzAOePdYWYLjC ZwIfpvnb10MwxNHApFS+Mtemfmo2Xk0= ARC-Seal: i=1; s=arc-20170712; d=natalenko.name; t=1518794152; a=rsa-sha256; cv=none; b=bEw5NvLEQUqGv8Jci7Q0LwgEm2Jw1NL9CSxkPHRTvDVYF8iQA3Groyy7ToeimUWdkHa+YtiJsU60wIsipdnGijbiTVThCvw7HF9DNc8xBW2gGcLn0XGYMakkeu9/7mLCXA7+nS794RSPIPmlz6danj2FMze9ZHXQHeD5nqNYtbc= ARC-Authentication-Results: i=1; auth=pass smtp.auth=oleksandr@natalenko.name smtp.mailfrom=oleksandr@natalenko.name DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=natalenko.name; s=dkim-20170712; t=1518794152; h=from:subject:date:message-id:to:cc:mime-version:content-type:content-transfer-encoding:in-reply-to:references; bh=aXWm3PoC35jSDJ09cLzbO9l3BqzGTa1DSwhNF6GUhAg=; b=W/Sth+Eso2KHANqofWQNfYxzg8FBNgd1edcTEtwiOm/DxWcs4RPCvBqmQ7V604wxWoiAck Nf7oX+pqTYy1pd1p8yyGb7A1+Xus/aYpXNttbNUu4zSIMrGyO/O4i31+tAyqaOzLN5de+5 QUC5aAbVwayOy1QkRXDWEabNh5K9uJs= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, David, Eric, Neal et al. On =C4=8Dtvrtek 15. =C3=BAnora 2018 21:42:26 CET Oleksandr Natalenko wrote: > I've faced an issue with a limited TCP bandwidth between my laptop and a > server in my 1 Gbps LAN while using BBR as a congestion control mechanism. > To verify my observations, I've set up 2 KVM VMs with the following > parameters: >=20 > 1) Linux v4.15.3 > 2) virtio NICs > 3) 128 MiB of RAM > 4) 2 vCPUs > 5) tested on both non-PREEMPT/100 Hz and PREEMPT/1000 Hz >=20 > The VMs are interconnected via host bridge (-netdev bridge). I was running > iperf3 in the default and reverse mode. Here are the results: >=20 > 1) BBR on both VMs >=20 > upload: 3.42 Gbits/sec, cwnd ~ 320 KBytes > download: 3.39 Gbits/sec, cwnd ~ 320 KBytes >=20 > 2) Reno on both VMs >=20 > upload: 5.50 Gbits/sec, cwnd =3D 976 KBytes (constant) > download: 5.22 Gbits/sec, cwnd =3D 1.20 MBytes (constant) >=20 > 3) Reno on client, BBR on server >=20 > upload: 5.29 Gbits/sec, cwnd =3D 952 KBytes (constant) > download: 3.45 Gbits/sec, cwnd ~ 320 KBytes >=20 > 4) BBR on client, Reno on server >=20 > upload: 3.36 Gbits/sec, cwnd ~ 370 KBytes > download: 5.21 Gbits/sec, cwnd =3D 887 KBytes (constant) >=20 > So, as you may see, when BBR is in use, upload rate is bad and cwnd is lo= w. > If using real HW (1 Gbps LAN, laptop and server), BBR limits the throughp= ut > to ~100 Mbps (verifiable not only by iperf3, but also by scp while > transferring some files between hosts). >=20 > Also, I've tried to use YeAH instead of Reno, and it gives me the same > results as Reno (IOW, YeAH works fine too). >=20 > Questions: >=20 > 1) is this expected? > 2) or am I missing some extra BBR tuneable? > 3) if it is not a regression (I don't have any previous data to compare > with), how can I fix this? > 4) if it is a bug in BBR, what else should I provide or check for a proper > investigation? I've played with BBR a little bit more and managed to narrow the issue down= to=20 the changes between v4.12 and v4.13. Here are my observations: v4.12 + BBR + fq_codel =3D=3D OK v4.12 + BBR + fq =3D=3D OK v4.13 + BBR + fq_codel =3D=3D Not OK v4.13 + BBR + fq =3D=3D OK I think this has something to do with an internal TCP implementation for=20 pacing, that was introduced in v4.13 (commit 218af599fa63) specifically to= =20 allow using BBR together with non-fq qdiscs. Once BBR relies on fq, the=20 throughput is high and saturates the link, but if another qdisc is in use, = for=20 instance, fq_codel, the throughput drops. Just to be sure, I've also tried= =20 pfifo_fast instead of fq_codel with the same outcome resulting in the low=20 throughput. Unfortunately, I do not know if this is something expected or should be=20 considered as a regression. Thus, asking for an advice. Ideas? Thanks. Regards, Oleksandr