From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH 17/24] test/perf: Work-around for virtio_net hang before long streams from guest Date: Fri, 25 Mar 2022 23:52:53 +0100 Message-ID: <20220325225300.2803584-18-sbrivio@redhat.com> In-Reply-To: <20220325225300.2803584-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5162160492850337099==" --===============5162160492850337099== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable I didn't have time to investigate the root cause for the virtio_net TX hang yet. Add a quick work-around for the moment being. Signed-off-by: Stefano Brivio --- test/perf/passt_tcp | 15 +++++++++++++++ test/perf/passt_udp | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/test/perf/passt_tcp b/test/perf/passt_tcp index 99d8fb1..f13fdfc 100644 --- a/test/perf/passt_tcp +++ b/test/perf/passt_tcp @@ -16,6 +16,11 @@ gtools sysctl ip jq nproc seq sleep bc iperf3 tcp_rr tcp_c= rr # From neper nstools sysctl ip jq nproc seq sleep bc iperf3 tcp_rr tcp_crr htools bc head sed seq =20 +# In this setup, virtio_net TX queue sometimes hangs, still under investigat= ion +def virtio_net_workaround +guest modprobe -r virtio_net; modprobe virtio_net napi_tx=3D1; dhclient; dhc= lient -6; sleep 3 +endef + test passt: throughput and latency =20 guest /sbin/sysctl -w net.core.rmem_max=3D536870912 @@ -52,18 +57,22 @@ tr TCP throughput over IPv6: guest to host bw - bw - =20 +virtio_net_workaround guest ip link set dev __IFNAME__ mtu 1280 iperf3c guest __GW6__%__IFNAME__ 100${i}2 __THREADS__ __OPTS__ -w 4M iperf3s BW ns 100${i}2 __THREADS__ bw __BW__ 1.2 1.5 +virtio_net_workaround guest ip link set dev __IFNAME__ mtu 1500 iperf3c guest __GW6__%__IFNAME__ 100${i}2 __THREADS__ __OPTS__ -w 4M iperf3s BW ns 100${i}2 __THREADS__ bw __BW__ 1.6 1.8 +virtio_net_workaround guest ip link set dev __IFNAME__ mtu 9000 iperf3c guest __GW6__%__IFNAME__ 100${i}2 __THREADS__ __OPTS__ -w 8M iperf3s BW ns 100${i}2 __THREADS__ bw __BW__ 4.0 5.0 +virtio_net_workaround guest ip link set dev __IFNAME__ mtu 65520 iperf3c guest __GW6__%__IFNAME__ 100${i}2 __THREADS__ __OPTS__ -w 16M iperf3s BW ns 100${i}2 __THREADS__ @@ -91,26 +100,32 @@ lat __LAT__ 500 400 =20 =20 tr TCP throughput over IPv4: guest to host +virtio_net_workaround guest ip link set dev __IFNAME__ mtu 256 iperf3c guest __GW__ 100${i}2 __THREADS__ __OPTS__ -w 1M iperf3s BW ns 100${i}2 __THREADS__ bw __BW__ 0.2 0.3 +virtio_net_workaround guest ip link set dev __IFNAME__ mtu 576 iperf3c guest __GW__ 100${i}2 __THREADS__ __OPTS__ -w 1M iperf3s BW ns 100${i}2 __THREADS__ bw __BW__ 0.5 0.8 +virtio_net_workaround guest ip link set dev __IFNAME__ mtu 1280 iperf3c guest __GW__ 100${i}2 __THREADS__ __OPTS__ -w 4M iperf3s BW ns 100${i}2 __THREADS__ bw __BW__ 1.2 1.5 +virtio_net_workaround guest ip link set dev __IFNAME__ mtu 1500 iperf3c guest __GW__ 100${i}2 __THREADS__ __OPTS__ -w 4M iperf3s BW ns 100${i}2 __THREADS__ bw __BW__ 1.6 1.8 +virtio_net_workaround guest ip link set dev __IFNAME__ mtu 9000 iperf3c guest __GW__ 100${i}2 __THREADS__ __OPTS__ -w 8M iperf3s BW ns 100${i}2 __THREADS__ bw __BW__ 4.0 5.0 +virtio_net_workaround guest ip link set dev __IFNAME__ mtu 65520 iperf3c guest __GW__ 100${i}2 __THREADS__ __OPTS__ -w 16M iperf3s BW ns 100${i}2 __THREADS__ diff --git a/test/perf/passt_udp b/test/perf/passt_udp index ff4c73a..cc5711b 100644 --- a/test/perf/passt_udp +++ b/test/perf/passt_udp @@ -16,6 +16,11 @@ gtools sysctl ip jq nproc sleep iperf3 udp_rr # From neper nstools ip jq sleep iperf3 udp_rr htools bc head sed =20 +# In this setup, virtio_net TX queue sometimes hangs, still under investigat= ion +def virtio_net_workaround +guest modprobe -r virtio_net; modprobe virtio_net napi_tx=3D1; dhclient; dhc= lient -6; sleep 3 +endef + test passt: throughput and latency =20 guest /sbin/sysctl -w net.core.rmem_max=3D16777216 @@ -45,18 +50,22 @@ th MTU 256B 576B 1280B 1500B 9000B 65520B tr UDP throughput over IPv6: guest to host bw - bw - +virtio_net_workaround guest ip link set dev __IFNAME__ mtu 1280 iperf3c guest __GW6__%__IFNAME__ 100${i}2 __THREADS__ __OPTS__ -b 2G iperf3s BW ns 100${i}2 __THREADS__ bw __BW__ 0.8 1.2 +virtio_net_workaround guest ip link set dev __IFNAME__ mtu 1500 iperf3c guest __GW6__%__IFNAME__ 100${i}2 __THREADS__ __OPTS__ -b 3G iperf3s BW ns 100${i}2 __THREADS__ bw __BW__ 1.0 1.5 +virtio_net_workaround guest ip link set dev __IFNAME__ mtu 9000 iperf3c guest __GW6__%__IFNAME__ 100${i}2 __THREADS__ __OPTS__ -b 5G iperf3s BW ns 100${i}2 __THREADS__ bw __BW__ 4.0 5.0 +virtio_net_workaround guest ip link set dev __IFNAME__ mtu 65520 iperf3c guest __GW6__%__IFNAME__ 100${i}2 __THREADS__ __OPTS__ -b 7G iperf3s BW ns 100${i}2 __THREADS__ @@ -74,26 +83,32 @@ lat __LAT__ 200 150 =20 =20 tr UDP throughput over IPv4: guest to host +virtio_net_workaround guest ip link set dev __IFNAME__ mtu 256 iperf3c guest __GW__ 100${i}2 __THREADS__ __OPTS__ -b 500M iperf3s BW ns 100${i}2 __THREADS__ bw __BW__ 0.0 0.0 +virtio_net_workaround guest ip link set dev __IFNAME__ mtu 576 iperf3c guest __GW__ 100${i}2 __THREADS__ __OPTS__ -b 1G iperf3s BW ns 100${i}2 __THREADS__ bw __BW__ 0.4 0.6 +virtio_net_workaround guest ip link set dev __IFNAME__ mtu 1280 iperf3c guest __GW__ 100${i}2 __THREADS__ __OPTS__ -b 2G iperf3s BW ns 100${i}2 __THREADS__ bw __BW__ 0.8 1.2 +virtio_net_workaround guest ip link set dev __IFNAME__ mtu 1500 iperf3c guest __GW__ 100${i}2 __THREADS__ __OPTS__ -b 3G iperf3s BW ns 100${i}2 __THREADS__ bw __BW__ 1.0 1.5 +virtio_net_workaround guest ip link set dev __IFNAME__ mtu 9000 iperf3c guest __GW__ 100${i}2 __THREADS__ __OPTS__ -b 6G iperf3s BW ns 100${i}2 __THREADS__ bw __BW__ 4.0 5.0 +virtio_net_workaround guest ip link set dev __IFNAME__ mtu 65520 iperf3c guest __GW__ 100${i}2 __THREADS__ __OPTS__ -b 7G iperf3s BW ns 100${i}2 __THREADS__ --=20 2.35.1 --===============5162160492850337099==--