NFSv3, ZFS, 10GE performance
bfriesen at simple.dallas.tx.us
Mon Mar 26 16:57:07 UTC 2012
On Mon, 26 Mar 2012, Sven Brandenburg wrote:
> Hopefully, readahead doesn't kill performance for smaller files.. :-)
You are right to be concerned. There are plenty of cases where
read-ahead damages application performance. Reading data which is
never actually used is expensive.
It would be useful if FreeBSD would support posix_fadvise() so that
applications can specify the type of access they will use, and if this
advice can be used by NFS and the filesystem layer to decide if
read-ahead should be used, and how much.
Here are some notes as to how Linux treats the avise options:
"Under Linux, POSIX_FADV_NORMAL sets the readahead window to the
default size for the backing device; POSIX_FADV_SEQUENTIAL doubles
this size, and POSIX_FADV_RANDOM disables file readahead entirely.
These changes affect the entire file, not just the specified region
(but other open file handles to the same file are unaffected).
POSIX_FADV_WILLNEED initiates a non-blocking read of the specified
region into the page cache. The amount of data read may be decreased
by the kernel depending on virtual memory load. (A few megabytes will
usually be fully satisfied, and more is rarely useful.)"
The system can learn how an application performs its accesses, but it
takes time and many accesses before correct tunings can be learned,
and by then it may be too late to be of benefit since the I/Os have
bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
More information about the freebsd-fs