From nobody Thu Sep 12 18:00:14 2024 X-Original-To: freebsd-net@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 4X4QG04xnPz5WPHW for ; Thu, 12 Sep 2024 18:00:24 +0000 (UTC) (envelope-from SRS0=L5lp=QK=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4X4QG02lL9z4Z4y for ; Thu, 12 Sep 2024 18:00:24 +0000 (UTC) (envelope-from SRS0=L5lp=QK=quip.cz=000.fbsd@elsa.codelab.cz) Authentication-Results: mx1.freebsd.org; none Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id ED39BD78A8; Thu, 12 Sep 2024 20:00:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quip.cz; s=private; t=1726164015; bh=jwsugpb7Xg9kP3xIdNIdSoPUYlzkgWYROxYMuaUdtXQ=; h=Date:Subject:To:References:From:In-Reply-To; b=HelzxkWprzbahL06Vg/me3l/0SAS8/36FF5CGKlh9ZBy0NW0BpYqWmNjz1n6Cwxws nZ+RrqhsF3dB6thwPIKDdReyxYKeHHayKrJ+2/EX6a6bq7Vc4dLHShYLP49e7reG+z LjNR7kBP+NVjlWW9ns3lBIW8vUeUdA4KvVf/NqvU= Received: from [192.168.145.49] (ip-89-177-27-225.bb.vodafone.cz [89.177.27.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id 802FBD78AA; Thu, 12 Sep 2024 20:00:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quip.cz; s=private; t=1726164014; bh=jwsugpb7Xg9kP3xIdNIdSoPUYlzkgWYROxYMuaUdtXQ=; h=Date:Subject:To:References:From:In-Reply-To; b=i80cLI44cWNhK1GgsDZz7TD8uPL5B17VLKKhP1K3vZ/e/JZL9tOHxWZBAnQ40Z2di Oxp5KD09NK3iSH8Dln/N40BOnW52XPqtgEBTiRzD3CofDtfwl0zgqi8kc+RqEz+MB5 Nvm1/NJ0hW7FVyXRrVIevigpm8luRl8+efASf6sU= Message-ID: Date: Thu, 12 Sep 2024 20:00:14 +0200 List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Performance issues with vnet jails + epair + bridge To: Sad Clouds , freebsd-net@FreeBSD.org References: <20240912181618.7895d10ad5ff2ebae9883192@gmail.com> Content-Language: en-US From: Miroslav Lachman <000.fbsd@quip.cz> In-Reply-To: <20240912181618.7895d10ad5ff2ebae9883192@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:42000, ipnet:94.124.104.0/21, country:CZ] X-Rspamd-Queue-Id: 4X4QG02lL9z4Z4y On 12/09/2024 19:16, Sad Clouds wrote: > Hi, I'm using FreeBSD-14.1 and on this particular system I only have a > single physical network interface, so I followed instructions for > networking vnet jails via epair and bridge, e.g. > > devel > { > vnet; > vnet.interface = "e0b_devel"; > exec.prestart += "/jails/jib addm devel genet0"; > exec.poststop += "/jails/jib destroy devel"; > } > > The issue is bulk TCP performance throughput between this jail and the > host is quite poor, with one CPU spinning 100% in kernel and others > sitting mostly idle. > > It seems there is some lock contention somewhere, but I'm not sure if > this is around vnet, epair or bridge subsystems. Are there > other alternatives for vnet jails? Can anyone recommend specific > deployment scenarios? I've seen references to netgraph which could be > used with jails. Does it have better performance and scalability and > could replace epair and bridge combination? You can try to disable one of (or all of) the following: LRO, TSO, RXCSUM, TXCSUM by ifconfig on you NIC. ifconfig em0 -rxcsum -txcsum -tso -lro" to disable The same thing without dashes "-" to enable Use your NIC name instead of em0. If some part disabled fixes you problem, put it into your rc.conf ifconfig line. Or you can try netgraph buddy https://github.com/bellhyve/ngbuddy Kind regards Miroslav Lachman