From owner-freebsd-fs@freebsd.org Tue Oct 30 04:57:35 2018 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3EF7010D4199; Tue, 30 Oct 2018 04:57:35 +0000 (UTC) (envelope-from avv314@gmail.com) Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 992F1723D6; Tue, 30 Oct 2018 04:57:34 +0000 (UTC) (envelope-from avv314@gmail.com) Received: by mail-lj1-x233.google.com with SMTP id z21-v6so10067513ljz.0; Mon, 29 Oct 2018 21:57:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cdbpjA3mf+ego3EpdU6NFImyQyexxEKRIDIWRjFwTBY=; b=u7lGBwR80m5mLYZcJdoklg96XCV3mXABRD0VxpNcnnRxiglPdDblXA5T9i5FpOILLr SdI07AaUNQ7AIs9H+nD0QHu1N+OJfYybPg9kahiMB+HgudUPplv0sxdKF9Uj08bZpoj8 NKTmMDp3WGL0SSKbuMANXNMlkzTIkBFMo9t+F1P4i/wPpXPCjy9f7QwHe8PGW1UsPW6E PlykQpTK8ZD/NiDnF7wasK+qCCcKcaYI1CrcA6Q2IX5qje1bDdcueUWoLNjAbpihu0ql hvnGnPhzdMRKuNWbsVNjCqE2NAxs1GrcdEpm3AnVfkTpz1tKUI0JMRxxD2AmxhsVIv4d YP1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cdbpjA3mf+ego3EpdU6NFImyQyexxEKRIDIWRjFwTBY=; b=LQOBsRC2fLOs0PSAdhJhEVOsCAAaM7BJMbNuzqaqH5QwNNz6M4tItlb/RWfQ61Jm4/ oD7IigRcRky21dA1NblNz3mPInDZ+F59772Hk+Ia0BVDT+xqGOaEaY4HXqfjwvs6nDFR xou8kKKGz4iwcPN+QMYXvi6XQnsFUqdM1wd5vZUX24GA0TPwSPPrTMPW0lFFUj3Ca3nG jEI6Af4p5hJ41V3fxi6FD6v0BjoVksmbHsau2wJX3snfwgZU7VFpV0seoGygHKzESE/o +8RFE7LXZuDUMp0uhtvAz9ppJRj3g8RVi771hCL5Kh2vFP8BcAaHF8XbYToqbYID1YyM Zgtg== X-Gm-Message-State: AGRZ1gIza7IjnxHbov+gHk1Td1RpVF+LkVGvnbdtrxqqZQYZQiVSt+T3 kSWnZqj+JZWc3d5ommluKHRptjVcYLAVPA83gfE0ea2V X-Google-Smtp-Source: AJdET5dtuDJuv0TEkMpcPkfAcnCjawYCi0lJiOK1UccPXTEVkMHbAUu0pKxvp+HpcS6Tgi7DKqj42LjY/l1cQXvvSBY= X-Received: by 2002:a2e:478f:: with SMTP id u137-v6mr395322lja.142.1540875452870; Mon, 29 Oct 2018 21:57:32 -0700 (PDT) MIME-Version: 1.0 References: <201810291506.w9TF6YAP057202@pdx.rh.CN85.dnsmgr.net> In-Reply-To: From: Andrew Vylegzhanin Date: Tue, 30 Oct 2018 07:57:21 +0300 Message-ID: Subject: Re: NFS + Infiniband problem To: rmacklem@uoguelph.ca Cc: "Rodney W. Grimes" , freebsd-fs@freebsd.org, freebsd-infiniband@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2018 04:57:35 -0000 > >> Some details: > >> [root@node4 ~]# mount_nfs -o wsize=30000 -o proto=tcp 10.0.2.1:/zdata2 /mnt > > ^^^^^^^^^^^^ > >I am not sure what the interaction between page sizes, TSO needs, > >buffer needs and all that are but I always use a power of 2 wsize > >and rsize. Again after some tests. I've tried 4096,8192,16384 wsize/rsize. Only 4096 value give some measurable result and it's extremely slow ~ 10-16MB/s for writing (depend on number of threads), 10-12 MB/s for reading. With other values NFS hangs (or almost hangs - couple kB/s in average) Changing sysctl net.inet.tcp.tso=0 (w/o reboot) on both sides had no effect. AFAIK, infiniband interface has no option for TSO,LRO: ib0: flags=8043 metric 0 mtu 65520 options=80018 lladdr 80.0.2.8.fe.80.0.0.0.0.0.0.e4.1d.2d.3.0.50.df.51 inet 10.0.2.1 netmask 0xffffff00 broadcast 10.0.2.255 nd6 options=29 BTW, hers is my sysctl.conf file with optimisation for congestion control and tcp buffers on 10/40 Gbit/s links (the server had 40 Gbit/s Intel ixl ethernet also): kern.ipc.maxsockbuf=16777216 net.inet.tcp.sendbuf_max=16777216 net.inet.tcp.recvbuf_max=16777216 net.inet.tcp.sendbuf_auto=1 net.inet.tcp.recvbuf_auto=1 net.inet.tcp.sendbuf_inc=16384 net.inet.tcp.recvbuf_inc=524288 net.inet.tcp.cc.algorithm=htcp > > You might try that. And as Rick suggested, turn of > >TSO, if you can. Is infiniband using RDMA to do this, if so then > >the page size stuff is probably very important, use multiples of > >4096 only. > RDMA is not supported by the FreeBSD NFS client. There is a way to use RDMA > on a separate connection with NFSv4.1 or later, but I've never written code > for that. (Not practical to try to implement without access to hardware that > does it.) > Hope I could help with testing. -- Andrew > rick > [performance stuff snipped]