From nobody Fri Aug 4 18:56:30 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHZgf453Gz4gtZy for ; Fri, 4 Aug 2023 18:56:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHZgf22HYz4MTs for ; Fri, 4 Aug 2023 18:56:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691175390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ClqsSy3nsSWw6HkpuiJIBjP72zpnphIKxHBuUpRlsN4=; b=rh5z5KRcoHfPlM83QwAjBvflCVYjKXjxtIYN5X65zEiK86+sMa0Gp+rajpWYB7Jhpg9SJV 6eCk8uwTMtyAMH0Dq8wq2PU9gBOtDVgu4U3jM83rxo7MJtVfldU1MVU+0I2zQrIMB9ImHe ZQ9od3NBZKSt5en3zLtUkxuAtUt3IFA/nDMdFLBl8AoC7SudaFFhquKI3B9yyylAof1W6W zQYpKnlK24XKGwX5tbjqdWOW3bzawK/o9/fCuCJXd946bFLqAIJzEr4NFCv1/+WUkRE6L5 FwcWcsBgn7sp0RqGnxI99xwzg6s5mMelb45RderHuNT16M+HhsARjpuvHkxFvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691175390; a=rsa-sha256; cv=none; b=oOHAROchY8LCc7JLAMuQ4bTsYqAw2Si2LwrwB751KVnZRYA3wFuHo9cjvA+2niFUvuX3ao NqFbbu8cqOEBxi7mipSacS96AAMqCwufWnZw/n4F1PnlyTO0toKmecQpocmyneHa4Jkv4u E2uNeT4hy760lkFfFEHwNXHJus+Yjy6MmbHJvwxsMF/AFWwGQ2XiFz7XTVTgUDjE5ngJWK OcApxZvGY9ZZeQFCuljTzYps5qK1d6R8CkK/BKWq3THYPNoHMKt/iwffil7nIOtd3bMYzL w0nGXhI2JaR5ygmEITZMZRx8nS57dmhuCLG/zlyKkKN+Z9Zhk24EDnigROuzEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHZgf0t1gz1D0x for ; Fri, 4 Aug 2023 18:56:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 374IuUIS032457 for ; Fri, 4 Aug 2023 18:56:30 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 374IuUDR032456 for bugs@FreeBSD.org; Fri, 4 Aug 2023 18:56:30 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 272944] Vnet performance issues Date: Fri, 04 Aug 2023 18:56:30 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jSML4ThWwBID69YC@protonmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272944 Bug ID: 272944 Summary: Vnet performance issues Product: Base System Version: 13.2-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: jSML4ThWwBID69YC@protonmail.com Hello,=20 During testing, it was noted that switching to Vnet jails causes a signific= ant reduction in network performance. I tested using Iperf3 from the jail to another node on the local network. Here's the results.=20 This is the performance on a shared network interface. Test is run from ins= ide a freshly created jail with no services running.=20 Command: iperf3 -c 192.168.1.24 -4 -P 10 [SUM] 0.00-10.00 sec 42.6 GBytes 36.6 Gbits/sec 21 sender [SUM] 0.00-10.00 sec 42.6 GBytes 36.6 Gbits/sec recei= ver This is the results on the same jail using Vnet. [SUM] 0.00-10.00 sec 17.6 GBytes 15.1 Gbits/sec 363 sender [SUM] 0.00-10.00 sec 17.5 GBytes 15.0 Gbits/sec recei= ver Here's the relevant jail configuration for the shared network vs Vnet.=20 # Shared network configuration=20 interface =3D "lagg0"; ip4.addr =3D 192.168.1.140; # Vnet configuration $id =3D "140"; $ipaddr =3D "192.168.1.${id}"; $mask =3D "255.255.255.0"; $gw =3D "192.168.1.1"; vnet; vnet.interface =3D "epair${id}b"; exec.prestart =3D "ifconfig epair${id} create up"; exec.prestart +=3D "ifconfig epair${id}a up descr vnet-${name}"; exec.prestart +=3D "ifconfig epair${id}a mtu 9000"; exec.prestart +=3D "ifconfig epair${id}b mtu 9000"; exec.prestart +=3D "ifconfig bridge0 addm epair${id}a up"; exec.start =3D "/sbin/ifconfig lo0 127.0.0.1 up"; exec.start +=3D "/sbin/ifconfig epair${id}b ${ipaddr} netmask ${mas= k} up"; exec.start +=3D "/sbin/route add default ${gw}"; Other data. Underlying network is a LACP (lagg0) based 40Gb with vlans. Configured as follows on the base system, with IP address removed. Note, the Vlans are not used in the jail at all.=20 ifconfig_mlxen0=3D"up mtu 9000" ifconfig_mlxen1=3D"up mtu 9000" cloned_interfaces=3D"lagg0 vlan0 vlan1 vlan2 bridge0" ifconfig_lagg0=3D"laggproto lacp laggport mlxen0 laggport mlxen1 IP-ADDR/24" ifconfig_bridge0=3D"addm lagg0 up" ifconfig_vlan0=3D"inet IP-ADDR/24 vlan 3 vlandev lagg0" ifconfig_vlan1=3D"inet IP-ADDR/24 vlan 4 vlandev lagg0" ifconfig_vlan2=3D"inet IP-ADDR/24 vlan 5 vlandev lagg0" defaultrouter=3D"192.168.1.1" Epair interfaces:=20 For some reason the epair0(A|B) interfaces show 10GB even though they are o= n a 40GB bridge. Even though they show 10Gb, the test sends data faster than the interface speed. EX: 15.1Gb/s from above.=20 My question is why the huge performance difference?=20 Is it my configuration that is wrong?=20 Is the Vnet overhead simply that high?=20 Are there network interface flags I should be using for Vnet? (tx|rxsum, lr= o, tso, etc?) Reporting it as bug because I'm guessing a 50%+ reduction in performance is= not intended. --=20 You are receiving this mail because: You are the assignee for the bug.=