From owner-freebsd-net@freebsd.org Tue Aug 18 12:53:07 2015 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 0927A9BCD30; Tue, 18 Aug 2015 12:53:07 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.net.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 8F812A62; Tue, 18 Aug 2015 12:53:06 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) IronPort-PHdr: 9a23:12uXCRYSEKe6zyw54jqPidD/LSx+4OfEezUN459isYplN5qZo8q6bnLW6fgltlLVR4KTs6sC0LqN9fu+EUU7or+/81k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZvIaytQ8iJ35/xjL760qaQSjsLrQL1Wal1IhSyoFeZnegtqqwmFJwMzADUqGBDYeVcyDAgD1uSmxHh+pX4p8Y7oGx48sgs/M9YUKj8Y79wDfkBVGxnYCgI4tb2v0zDUReX/SlbFWEXiQZTRQbf4RzwRZu3tTH18e902S2fNMuxSbEvRTWk4aAsRgXlhS0cO3si7GjdjsEjsaRAvRj0pwBj25WGJ8aRNeFiZeXTZ94XT3FNGMFLWGtEC4K4aoIJSO4AJvpZqYf64FUUoBa0HgXpH//mwDtF1ULwxrAwhuQ9DRndjktnG9MVrG+Sos/4Oa0JXaay1qaPyDzCa/Zf33D56ZPUcxYvpraCR799e9HdjE8iC1D5iQC8oIrkMjfd/P4EtWmA9KI0WeupjX8PoBo3oiWtx4Elgc/IgtRG5ErD8HBDwY02bfixQ01/bNvsRIFVviqZM4Zzat4lTHxlvD46jLYP783oNBMWwYgqkkaMI8eMdJKFt1e6DL6c X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2AcAgBFKtNV/61jaINdDoNhaQaDHrpgAQmBbAqFL0oCgWUUAQEBAQEBAQGBCYIdggYBAQEDAQEBASAEJyALBQsCAQgOCgICDRYDAgIhBgEJFRECBAgHBAEcBId4AwoIDbpvkE8NhVcBAQEBAQEEAQEBAQEBGASBIoowgk+BaAEBBxUBMweCaYFDBYcijX6FBIUGdYM3kS+DT4NlAiaCDhyBFVoiMwd/CBcjgQQBAQE X-IronPort-AV: E=Sophos;i="5.15,701,1432612800"; d="scan'208";a="233131262" Received: from nipigon.cs.uoguelph.ca (HELO zcs1.mail.uoguelph.ca) ([131.104.99.173]) by esa-annu.net.uoguelph.ca with ESMTP; 18 Aug 2015 08:53:02 -0400 Received: from localhost (localhost [127.0.0.1]) by zcs1.mail.uoguelph.ca (Postfix) with ESMTP id 09B1F15F565; Tue, 18 Aug 2015 08:53:03 -0400 (EDT) Received: from zcs1.mail.uoguelph.ca ([127.0.0.1]) by localhost (zcs1.mail.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id sT5Pw9aDTzj7; Tue, 18 Aug 2015 08:53:02 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by zcs1.mail.uoguelph.ca (Postfix) with ESMTP id 0844315F56D; Tue, 18 Aug 2015 08:53:02 -0400 (EDT) X-Virus-Scanned: amavisd-new at zcs1.mail.uoguelph.ca Received: from zcs1.mail.uoguelph.ca ([127.0.0.1]) by localhost (zcs1.mail.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 3okoUCjgvaiq; Tue, 18 Aug 2015 08:53:01 -0400 (EDT) Received: from zcs1.mail.uoguelph.ca (zcs1.mail.uoguelph.ca [172.17.95.18]) by zcs1.mail.uoguelph.ca (Postfix) with ESMTP id DA91F15F565; Tue, 18 Aug 2015 08:53:01 -0400 (EDT) Date: Tue, 18 Aug 2015 08:53:01 -0400 (EDT) From: Rick Macklem To: Daniel Braniss Cc: FreeBSD Net , Christopher Forgeron , FreeBSD stable , Slawa Olhovchenkov Message-ID: <1721122651.24481798.1439902381663.JavaMail.zimbra@uoguelph.ca> In-Reply-To: <9D8B0503-E8FA-43CA-88F0-01F184F84D9B@cs.huji.ac.il> References: <1D52028A-B39F-4F9B-BD38-CB1D73BF5D56@cs.huji.ac.il> <20150817094145.GB3158@zxy.spb.ru> <17871443-E105-4434-80B1-6939306A865F@cs.huji.ac.il> <473274181.23263108.1439814072514.JavaMail.zimbra@uoguelph.ca> <7F892C70-9C04-4468-9514-EDBFE75CF2C6@cs.huji.ac.il> <805850043.24018217.1439848150695.JavaMail.zimbra@uoguelph.ca> <9D8B0503-E8FA-43CA-88F0-01F184F84D9B@cs.huji.ac.il> Subject: Re: ix(intel) vs mlxen(mellanox) 10Gb performance MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [172.17.95.10] X-Mailer: Zimbra 8.0.9_GA_6191 (ZimbraWebClient - FF34 (Win)/8.0.9_GA_6191) Thread-Topic: ix(intel) vs mlxen(mellanox) 10Gb performance Thread-Index: HIzeCIwOEaU79f03Ql6Ay7y4PoXZQw== X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Aug 2015 12:53:07 -0000 Daniel Braniss wrote: >=20 > > On Aug 18, 2015, at 12:49 AM, Rick Macklem wrote= : > >=20 > > Daniel Braniss wrote: > >>=20 > >>> On Aug 17, 2015, at 3:21 PM, Rick Macklem wrot= e: > >>>=20 > >>> Daniel Braniss wrote: > >>>>=20 > >>>>> On Aug 17, 2015, at 1:41 PM, Christopher Forgeron > >>>>> > >>>>> wrote: > >>>>>=20 > >>>>> FYI, I can regularly hit 9.3 Gib/s with my Intel X520-DA2's and Fre= eBSD > >>>>> 10.1. Before 10.1 it was less. > >>>>>=20 > >>>>=20 > >>>> this is NOT iperf/3 where i do get close to wire speed, > >>>> it=E2=80=99s NFS writes, i.e., almost real work :-) > >>>>=20 > >>>>> I used to tweak the card settings, but now it's just stock. You may > >>>>> want > >>>>> to > >>>>> check your settings, the Mellanox may just have better defaults for > >>>>> your > >>>>> switch. > >>>>>=20 > >>> Have you tried disabling TSO for the Intel? With TSO enabled, it will= be > >>> copying > >>> every transmitted mbuf chain to a new chain of mbuf clusters via. > >>> m_defrag() when > >>> TSO is enabled. (Assuming you aren't an 82598 chip. Most seem to be t= he > >>> 82599 chip > >>> these days?) > >>>=20 > >>=20 > >> hi Rick > >>=20 > >> how can i check the chip? > >>=20 > > Haven't a clue. Does "dmesg" tell you? (To be honest, since disabling T= SO > > helped, > > I'll bet you don't have a 82598.) > >=20 > >>> This has been fixed in the driver very recently, but those fixes won'= t be > >>> in 10.1. > >>>=20 > >>> rick > >>> ps: If you could test with 10.2, it would be interesting to see how t= he > >>> ix > >>> does with > >>> the current driver fixes in it? > >>=20 > >> I new TSO was involved! > >> ok, firstly, it=E2=80=99s 10.2 stable. > >> with TSO enabled, ix is bad, around 64MGB/s. > >> disabling TSO it=E2=80=99s better, around 130 > >>=20 > > Hmm, could you check to see of these lines are in sys/dev/ixgbe/if_ix.c= at > > around > > line#2500? > > /* TSO parameters */ > > 2572 =09 =09 ifp->if_hw_tsomax =3D 65518; > > 2573 =09 =09 ifp->if_hw_tsomaxsegcount =3D IXGBE_82599_SCATTER= ; > > 2574 =09 =09 ifp->if_hw_tsomaxsegsize =3D 2048; > >=20 > > They are in stable/10. I didn't look at releng/10.2. (And if they're in= a > > #ifdef > > for FreeBSD11, take the #ifdef away.) > > If they are there and not ifdef'd, I can't explain why disabling TSO wo= uld > > help. > > Once TSO is fixed so that it handles the 64K transmit segments without > > copying all > > the mbufs, I suspect you might get better perf. with it enabled? > >=20 >=20 > this is 10.2 : > they are on lines 2509-2511 and I don=E2=80=99t see any #ifdefs around i= t. >=20 > the plot thickens :-) >=20 If this is just a test machine, maybe you could test with these lines (at a= bout #880) in sys/netinet/tcp_output.c commented out? (It looks to me like this will d= isable TSO for almost all the NFS writes.) - around line #880 in sys/netinet/tcp_output.c: =09=09=09/* =09=09=09 * In case there are too many small fragments =09=09=09 * don't use TSO: =09=09=09 */ =09=09=09if (len <=3D max_len) { =09=09=09=09len =3D max_len; =09=09=09=09sendalot =3D 1; =09=09=09=09tso =3D 0; =09=09=09} This was added along with the other stuff that did the if_hw_tsomaxsegcount= , etc and I never noticed it until now (not my patch). rick > danny >=20 > > Good luck with it, rick > >=20 > >> still, mlxen0 is about 250! with and without TSO > >>=20 > >>=20 > >>>=20 > >>>>> On Mon, Aug 17, 2015 at 6:41 AM, Slawa Olhovchenkov >>>>> > wrote: > >>>>> On Mon, Aug 17, 2015 at 10:27:41AM +0300, Daniel Braniss wrote: > >>>>>=20 > >>>>>> hi, > >>>>>> I have a host (Dell R730) with both cards, connected to an HP8= 200 > >>>>>> switch at 10Gb. > >>>>>> when writing to the same storage (netapp) this is what I get: > >>>>>> ix0: ~130MGB/s > >>>>>> mlxen0 ~330MGB/s > >>>>>> this is via nfs/tcpv3 > >>>>>>=20 > >>>>>> I can get similar (bad) performance with the mellanox if I > >>>>>> increase > >>>>>> the file size > >>>>>> to 512MGB. > >>>>>=20 > >>>>> Look like mellanox have internal beffer for caching and do ACK > >>>>> acclerating. > >>>>>=20 > >>>>>> so at face value, it seems the mlxen does a better use of > >>>>>> resources > >>>>>> than the intel. > >>>>>> Any ideas how to improve ix/intel's performance? > >>>>>=20 > >>>>> Are you sure about netapp performance? > >>>>> _______________________________________________ > >>>>> freebsd-net@freebsd.org mailing li= st > >>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-net > >>>>> > >>>>> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.o= rg > >>>>> " > >>>>>=20 > >>>>=20 > >>>> _______________________________________________ > >>>> freebsd-stable@freebsd.org mailing list > >>>> https://lists.freebsd.org/mailman/listinfo/freebsd-stable > >>>> To unsubscribe, send any mail to > >>>> "freebsd-stable-unsubscribe@freebsd.org" > >>=20 > >> _______________________________________________ > >> freebsd-stable@freebsd.org mailing list > >> https://lists.freebsd.org/mailman/listinfo/freebsd-stable > >> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.o= rg" >=20 > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"