From owner-freebsd-net@freebsd.org Thu Aug 4 15:28:54 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DC2FBAF2CC for ; Thu, 4 Aug 2016 15:28:54 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (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 48E3B1B8F for ; Thu, 4 Aug 2016 15:28:54 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 5AEA61FE022; Thu, 4 Aug 2016 17:28:52 +0200 (CEST) Subject: Re: Unstable local network throughput To: Ben RUBSON , freebsd-net@freebsd.org References: <3C0D892F-2BE8-4650-B9FC-93C8EE0443E1@gmail.com> <3B164B7B-CBFB-4518-B57D-A96EABB71647@gmail.com> <5D6DF8EA-D9AA-4617-8561-2D7E22A738C3@gmail.com> <06E414D5-9CDA-46D1-A26F-0B07E76FDB34@gmail.com> From: Hans Petter Selasky Message-ID: <0b14bf39-ed71-b9fb-1998-bd9676466df6@selasky.org> Date: Thu, 4 Aug 2016 17:33:10 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <06E414D5-9CDA-46D1-A26F-0B07E76FDB34@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Aug 2016 15:28:54 -0000 On 08/04/16 17:24, Ben RUBSON wrote: > >> On 04 Aug 2016, at 11:40, Ben RUBSON wrote: >> >>> On 02 Aug 2016, at 22:11, Ben RUBSON wrote: >>> >>>> On 02 Aug 2016, at 21:35, Hans Petter Selasky wrote: >>>> >>>> The CX-3 driver doesn't bind the worker threads to specific CPU cores by default, so if your CPU has more than one so-called numa, you'll end up that the bottle-neck is the high-speed link between the CPU cores and not the card. A quick and dirty workaround is to "cpuset" iperf and the interrupt and taskqueue threads to specific CPU cores. >>> >>> My CPUs : 2x E5-2620v3 with DDR4@1866. >> >> OK, so I cpuset all Mellanox interrupts to one NUMA, as well as the iPerf processes, and I'm able to reach max bandwidth. >> Choosing the wrong NUMA (or both, or one for interrupts, the other one for iPerf, etc...) totally kills throughput. >> >> However, full-duplex throughput is still limited, I can't manage to reach 2x40Gb/s, throttle is at about 45Gb/s. >> I tried many different cpuset layouts, but I never went above 45Gb/s. >> (Linux allowed me to reach 2x40Gb/s so hardware is not a bottleneck) >> >>>> Are you using "options RSS" and "options PCBGROUP" in your kernel config? >> >> I will then give RSS a try. > > Without RSS : > A ---> B : 40Gbps (unidirectional) > A <--> B : 45Gbps (bidirectional) > > With RSS : > A ---> B : 28Gbps (unidirectional) > A <--> B : 28Gbps (bidirectional) > > Sounds like RSS does not help :/ > > Why, without RSS, do I have difficulties to reach 2x40Gbps (full-duplex) ? > Hi, Possibly because the packets are arriving at the wrong CPU compared to what RSS expects. Then RSS will invoke a taskqueue to process the packets on the correct CPU, if I'm not mistaken. The mlx4 driver does not fully support RSS. Then mlx5 does. --HPS