[lkml]   [2003]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Subjecteffect of nfs blocksize on I/O ?
    >>>>> " " == Frank Cusack <> writes:

    > 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.

    Then you should use statfs64()/statvfs64(). Nobody is going to
    guarantee to you that the equivalent 32-bit syscalls will hold for
    arbitrary disk sizes.

    > 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.

    In NFS you need to distinguish between the 'block size' (bsize) and
    the 'fragment size' (frsize). The former is defined as the "optimal
    transfer block size", the latter is the "block size on the underlying
    filesystem" according to the manpages.

    These are SUS-mandated definitions...

    The VFS itself cares little about the blocksize, however programs like
    'df' are supposed to use the fragment size as their basic unit when
    reporting space usage. Putting arbitrary values in place of the true
    fragment size typically leads to rounding errors, and so is not

    OTOH, bsize is of informational interest to programs that wish to
    optimize I/O throughput by grouping their data into appropriately
    sized records.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:48    [W:0.038 / U:7.648 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site