Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Jul 2013 14:37:43 +0200
From:      Ali Niknam <ali@transip.nl>
To:        freebsd-fs@FreeBSD.org
Cc:        rmacklem@FreeBSD.org
Subject:   nfsclient: incorrect st_blksize (bug?)
Message-ID:  <51F66217.5080505@transip.nl>

next in thread | raw e-mail | index | archive | help
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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51F66217.5080505>