From owner-freebsd-fs@FreeBSD.ORG Mon Jul 29 12:37:43 2013 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 96EBDACF; Mon, 29 Jul 2013 12:37:43 +0000 (UTC) (envelope-from ali@transip.nl) Received: from mailwww.transip.nl (mailwww.transip.nl [80.69.67.60]) by mx1.freebsd.org (Postfix) with ESMTP id 5957C240E; Mon, 29 Jul 2013 12:37:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mailwww.transip.nl (Postfix) with ESMTP id BE9A33458437; Mon, 29 Jul 2013 14:37:42 +0200 (CEST) X-Virus-Scanned: amavisd-new at mailwww.transip.nl Received: from mailwww.transip.nl ([127.0.0.1]) by localhost (mailwww.transip.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mc73Kh7PJoFM; Mon, 29 Jul 2013 14:37:42 +0200 (CEST) Received: from [10.2.6.4] (kantoor.transip.nl [80.69.69.100]) by mailwww.transip.nl (Postfix) with ESMTP id 9A0D53458422; Mon, 29 Jul 2013 14:37:42 +0200 (CEST) Message-ID: <51F66217.5080505@transip.nl> Date: Mon, 29 Jul 2013 14:37:43 +0200 From: Ali Niknam Organization: Transip BV User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: freebsd-fs@FreeBSD.org Subject: nfsclient: incorrect st_blksize (bug?) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: rmacklem@FreeBSD.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 12:37:43 -0000 Hi All, I've come across a problem that has proven to be unsolvable for me so far. It might be a bug in the NFS Client code, it also be my general lack of knowledge :). Can someone please give me a hint in the right direction? This is the case: mount_nfs -o rsize=32768 -o wsize=32768 -o nfsv4 -o tcp host:/path /mnt/nfs stat /mnt/nfs gives st_blksize of 4096 bytes. statfs /mnt/nfs gives an iosize of 4096 bytes. Mounting with nfsv3 gives the same results, regardless of udp or tcp protocol. NFSv2 however seems to give a st_blksize of 128k, with an iosize of 8192 bytes. In short: it seems that with BSD 9.1 the rsize/wsize's arent passed along correctly. I tried to debug it by looking in the kernel code but I got lost unfortunately in the abstraction layers (everything seems to set NFS_FABLKSIZE). Mounting the same host on a linux machine gives the correct st_blksize (32k). The disadvantage is ofcourse that apache/etc adhere to the 4k st_blksize by only reading 4k chunks so that nfs io slows down substantially. Ofcourse I'm also prepared to do further testing if that's needed. Kind Regards, Ali -- Transip BV | http://www.transip.nl/