From owner-freebsd-stable@freebsd.org Tue Aug 18 13:21:23 2015 Return-Path: Delivered-To: freebsd-stable@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 02CC69BB8C1; Tue, 18 Aug 2015 13:21:23 +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 B7BE86AF; Tue, 18 Aug 2015 13:21:22 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (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 B062F1FE023; Tue, 18 Aug 2015 15:21:20 +0200 (CEST) Subject: Re: ix(intel) vs mlxen(mellanox) 10Gb performance To: Rick Macklem , Daniel Braniss 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> <1721122651.24481798.1439902381663.JavaMail.zimbra@uoguelph.ca> Cc: FreeBSD Net , Slawa Olhovchenkov , FreeBSD stable , Christopher Forgeron From: Hans Petter Selasky Message-ID: <55D331A5.9050601@selasky.org> Date: Tue, 18 Aug 2015 15:22:45 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1721122651.24481798.1439902381663.JavaMail.zimbra@uoguelph.ca> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Aug 2015 13:21:23 -0000 On 08/18/15 14:53, Rick Macklem wrote: > If this is just a test machine, maybe you could test with these lines (at about #880) > in sys/netinet/tcp_output.c commented out? (It looks to me like this will disable TSO > for almost all the NFS writes.) > - around line #880 in sys/netinet/tcp_output.c: > /* > * In case there are too many small fragments > * don't use TSO: > */ > if (len <= max_len) { > len = max_len; > sendalot = 1; > tso = 0; > } > > 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). FYI: These lines are needed by other hardware, like the mlxen driver. If you remove them mlxen will start doing m_defrag(). I believe if you set the correct parameters in the "struct ifnet" for the TSO size/count limits this problem will go away. If you print the "len" and "max_len" and also the cases where TSO limits are reached, you'll see what parameter is triggering it and needs to be increased. --HPS