samba on freebsd.
Following is description made by one of the Samba developers:
"The problem is we switched to using recv() with the MSG_WAITALL flag
instead of read(). This makes Samba faster on most systems. On FreeBSD it
causes a massive slowdown and I don't know why. To fix it, change
the definition of MSG_WAITALL to be zero in lib/util_sock.c and
recompile 2.0.5a. I'm hoping someone from FreeBSD will get back to me
with some explanation. Regards, Jeremy Allison, Samba Team."
This problem where observed by almost all samba-2.0.5a users and typically
it led to 10-20x decrease in write speed.
PR: 13894
Submitted by: Maxim Sobolev <sobomax@altavista.net>