From owner-freebsd-net@freebsd.org Thu Aug 4 15:33:22 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 C9602BAF42E for ; Thu, 4 Aug 2016 15:33:22 +0000 (UTC) (envelope-from ben.rubson@gmail.com) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 699491EAF for ; Thu, 4 Aug 2016 15:33:22 +0000 (UTC) (envelope-from ben.rubson@gmail.com) Received: by mail-wm0-x22d.google.com with SMTP id f65so488257720wmi.0 for ; Thu, 04 Aug 2016 08:33:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=mQhP+eJi71vJ9hSLp4uJCL8OHK/lff5dYWrQnKXiRcU=; b=CtaCOa1p13fNjIbTta/Yl+tkR2l+emxHs1vJkj3HQYWQNcWfZbA/RkXof3GidLvvOa b64DGI+EgJM01ESQ5rFsryTyP/co1J/YL0k79drSkG3W6hdYLN1qkvLyCpfufKxl5pry NZATJhn4vlTUMtKtNQBujDmq7SLbBI+OK0or1ca70879ed/AI4XWZB88u5iS8nasVI+J jyAqTCnlnjE87bYzUOxEnn1nJ0ObGGz6qg2XHLId7m1xGdmoIOD0sFRNLPYvcV+fIoXt mRH4AouIsxEINoyjA147xYoV2lnxOZBAdyhap/W6b2hmkLfWPIQJKGFXETgcfalhgZNd kpRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=mQhP+eJi71vJ9hSLp4uJCL8OHK/lff5dYWrQnKXiRcU=; b=m2UwrjlOZLwYaCTaA4lq+puTAWwfjeK7pS6RvthYaMHstRL1XdTCkde8Ya5SnG9jNW QhQDhOTQ8YWVV7Pn2ahUYytQfzFWMoJfQNHXWXiCApTkNntFriIMx26O+dsse6H2GLfz 52d7glkpHiQWkF8lEVwQwPWk0hbjE/xPfmuDch1qJz6sBiAbs/9BmaXaMYyaIEsLcLGq b6zmTrhvF8j+2DDkdeYwj4RHXp8KcUT0Hd3hmOtEtilzseK0Dh8K1N1Uh2ySiF3K0KtQ zSW+8DWRs97+BEfJmo3NMk5t8yuZ2U9MpGFp9c32V8lsNKUSUK8DFmjH+XS5QwoVPt39 VUSQ== X-Gm-Message-State: AEkooutFzUD6VeWjbnHy9DukLHVTH80tB9PifDYhDwk+UqOwUyrAkUDHEVrkBhvzJ9akhA== X-Received: by 10.194.238.42 with SMTP id vh10mr66507672wjc.111.1470324800607; Thu, 04 Aug 2016 08:33:20 -0700 (PDT) Received: from macbook-air-de-benjamin-1.home (LFbn-1-7077-85.w90-116.abo.wanadoo.fr. [90.116.246.85]) by smtp.gmail.com with ESMTPSA id e65sm4194752wmg.3.2016.08.04.08.33.19 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Aug 2016 08:33:19 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Unstable local network throughput From: Ben RUBSON In-Reply-To: <0b14bf39-ed71-b9fb-1998-bd9676466df6@selasky.org> Date: Thu, 4 Aug 2016 17:33:19 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: 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> <0b14bf39-ed71-b9fb-1998-bd9676466df6@selasky.org> To: freebsd-net@freebsd.org X-Mailer: Apple Mail (2.3124) 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:33:22 -0000 > On 04 Aug 2016, at 17:33, Hans Petter Selasky wrote: >=20 > On 08/04/16 17:24, Ben RUBSON wrote: >>=20 >>> On 04 Aug 2016, at 11:40, Ben RUBSON wrote: >>>=20 >>>> On 02 Aug 2016, at 22:11, Ben RUBSON wrote: >>>>=20 >>>>> On 02 Aug 2016, at 21:35, Hans Petter Selasky = wrote: >>>>>=20 >>>>> 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. >>>>=20 >>>> My CPUs : 2x E5-2620v3 with DDR4@1866. >>>=20 >>> 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. >>>=20 >>> 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) >>>=20 >>>>> Are you using "options RSS" and "options PCBGROUP" in your kernel = config? >>>=20 >>> I will then give RSS a try. >>=20 >> Without RSS : >> A ---> B : 40Gbps (unidirectional) >> A <--> B : 45Gbps (bidirectional) >>=20 >> With RSS : >> A ---> B : 28Gbps (unidirectional) >> A <--> B : 28Gbps (bidirectional) >>=20 >> Sounds like RSS does not help :/ >>=20 >> Why, without RSS, do I have difficulties to reach 2x40Gbps = (full-duplex) ? >>=20 >=20 > Hi, >=20 > 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. But even without RSS, I should be able to go up to 2x40Gbps, don't you = think so ? Nobody already did this ?