Terrible NFS performance under 9.2-RELEASE?
Rick Macklem
rmacklem at uoguelph.ca
Fri Jan 24 03:18:03 UTC 2014
J David wrote:
> Rick,
>
> If iozone wants to do a 4kiB write in the middle of a 1GiB file and
> the rsize/wsize are both set to 32kiB, does NFS read a 32k block over
> the wire, modify it, and send it back? Or does it just send "write
> this 4k at offset X" and let the server sort it out?
>
This depends on the client. For FreeBSD, if the rest of the 32K block
has not been modified recently, it will mark that 4K byte range as
dirty (b_dirtyoff, b_dirtyend in "struct buf") and it will do a 4Kbyte
write at the correct offset.
For Linux, I don't know. (Take a look at a wireshark trace of it and find
out. You could write a simple program that does this once, so that the
packet trace is short. Sorry, I couldn't resist;-)
An NFS server must always be able to handle a write of any length starting
at any byte offset. The performance effects on the server are largely
defined by the type of exported file system on the server.
I didn't mention this before, but using UFS will give you more realistic
results than using mfs, since mfs would never be used for a real NFS
server and never gets tested as an exported NFS file system.
rick
> Some of the tests I'm running are producing very strange results, and
> I'm trying to understand what might be happening.
>
> Thanks!
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to
> "freebsd-net-unsubscribe at freebsd.org"
>
More information about the freebsd-net
mailing list