Messages in this thread Patch in this message | | | Date | Sun, 28 Sep 2003 23:42:36 -0700 | From | Frank Cusack <> | Subject | effect of nfs blocksize on I/O ? |
| |
I am not talking about rsize/wsize, rather the fs blocksize.
2.4 sets this to MIN(MAX(MAX(4096,rsize),wsize),32768) = 8192 typically. 2.6 sets this to nfs_fsinfo.wtmult?nfs_fsinfo.wtmult:512 = 512 typically.
(My estimation of "typical" may be way off though.)
At a 512 byte blocksize, this overflows struct statfs for fs > 1TB. Most of my NFS filesystems (on netapp) are larger than that.
But more importantly, what does the VFS *do* with the blocksize? strace seems to show that glibc/stdio does consider it. If I fprintf() two 4096 byte strings, libc does a single write() with 8192 blocksize, and 3 write()'s for 512 blocksize. I haven't looked to see what goes over the wire, but I assume that still follows rsize/wsize.
Does any NFS server report wtmult?
Here's a patch.
/fc
--- a/fs/nfs/inode.c 2003-09-28 23:41:13.000000000 -0700 +++ b/fs/nfs/inode.c 2003-09-28 23:40:18.000000000 -0700 @@ -323,8 +323,8 @@ server->wsize = nfs_block_size(fsinfo.wtpref, NULL); if (sb->s_blocksize == 0) { if (fsinfo.wtmult == 0) { - sb->s_blocksize = 512; - sb->s_blocksize_bits = 9; + sb->s_blocksize = nfs_block_bits(server->rsize > server->wsize ? server->rsize : server->wsize, + &sb->s_blocksize_bits); } else sb->s_blocksize = nfs_block_bits(fsinfo.wtmult, &sb->s_blocksize_bits); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |