On 3/29/07, Bruce Evans <[EMAIL PROTECTED]> wrote:
On Wed, 28 Mar 2007, Ulrich Spoerlein wrote:
> hostA # scp 500MB hostB:/net/share/
> ...
> If I run the scp again, I can see X MB/s going out from HostA, 2*X
> MB/s coming in on HostB and X MB/s out plus X MB/s in on HostC. What's
> happening is, that HostB issues one NFS READ call for every WRITE
> call. The traffic flows like this:
>
> -----> ----->
> A B C
> <-----
At least under FreeBSD-~5.2 with an old version of scp, this is caused
by blocksize bugs in the kernel and/or scp, and an open mode bug or
feature in scp. The blocksize used by scp is 4K. This is smaller
than the nfs block size of 8K, so nfs has to read-ahead 1 8K block for
each pair of 4K- blocks written so as to have non-garbage in the top
half of each 8K- block after writing 4K to the bottom half. It only
has to read-ahead if there is something there, but repeated scp's
ensure this by not truncating the file on open (open mode (O_WRONLY |
O_CREAT) without O_TRUNC according to truss(1)).
[snip - all you ever wanted to know about block sizes]
Thanks for the in-depth answer, Bruce. Greatly appreciated.
I can now tweak all kinds of block sizes to make the final combination
of Windows 2003, Samba and NFS work well. I hope that samba can be
adjusted in the right places for this task.
I'll post a summary, once I have it working. It seems that other
people don't have these problems (as they are not running SMB+NFS)
Uli
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"