From owner-freebsd-net@freebsd.org Mon Feb 3 22:23:24 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F1C60230914 for ; Mon, 3 Feb 2020 22:23:24 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 48BMmD5xxjz4Cqr; Mon, 3 Feb 2020 22:23:24 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1iyk7l-000Q02-GY; Tue, 04 Feb 2020 01:23:21 +0300 Date: Tue, 4 Feb 2020 01:23:21 +0300 From: Slawa Olhovchenkov To: Navdeep Parhar Cc: freebsd-net@freebsd.org Subject: Re: Chelsio NETMAP performance Message-ID: <20200203222321.GB8012@zxy.spb.ru> References: <20200203201728.GC8028@zxy.spb.ru> <863de9e1-42cc-6f3a-5c1f-1bf737714c9f@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <863de9e1-42cc-6f3a-5c1f-1bf737714c9f@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 48BMmD5xxjz4Cqr X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.990,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Feb 2020 22:23:25 -0000 On Mon, Feb 03, 2020 at 01:39:52PM -0800, Navdeep Parhar wrote: > On 2/3/20 12:17 PM, Slawa Olhovchenkov wrote: > > I am try to use Chelsio T540-CR in netmap mode and see poor (compared > > to Intel 82599ES) performance. > > What approximate FreeBSD version is this? 12.1-STABLE > > > > Same application ac receive only about 8.9Mpss, compared to 12.5Mpps > > at Intel. > > > > pmc profile show mostly time spend in: > > > > 49.76% [17802] service_nm_rxq @ /boot/kernel/if_cxgbe.ko > > 100.0% [17802] t4_vi_intr > > 100.0% [17802] ithread_loop @ /boot/kernel/kernel > > 100.0% [17802] fork_exit > > > > > > to be exact at line > > > > while ((d->rsp.u.type_gen & F_RSPD_GEN) == nm_rxq->iq_gen) { > > > > Is this maximum limit for this vendor? > > No, a T540 should be able to sink full 10Gbps (14.88Mpps) on a single rx > queue. Try adding this to your loader.conf: > > hw.cxgbe.toecaps_allowed="0" > > Then try simple netmap "pkt-gen -f rx" instead of any custom app and see > how many pps it's able to sink. Thanks! `hw.cxgbe.toecaps_allowed="0"` allow recive 14Mpps for may application too! Now I am got only 10% less performance compared to Intel, as I see by higher Chelsio interrupt cpu time (top show about 30% for every interrupt handler). Is this normal? Is this posible to optimize? This is interrupt rate I see: 54651 t5nex0:3b0 56475 t5nex0:3b1 55181 t5nex0:3b2 56577 t5nex0:3b3