[Samba] Linux vs. Windows SMB buffering

Jeremy Allison jra at samba.org
Fri Oct 6 18:26:17 UTC 2017


On Fri, Oct 06, 2017 at 06:09:32PM +0000, Will Lucas via samba wrote:
> Hi all,
> 
> In our office we use a program that makes many small writes to a file. We
> have been trying to use this program with our NAS, which hosts a Samba
> share on the network. However, the performance of the program is
> staggeringly slow on Window 7, 8.1, and 10.
> 
> To make the problem easily repeatable, I created a small C++ program to
> just write 1 million lines to a file:
> https://github.com/mevatron/nas-write-test
> 
> Next, I performed a packet capture of the two OS conversations with
> Wireshark. I found the Linux SMB implementation buffer many hundreds of
> lines into each write; whereas, Windows decides to immediately flush it's
> buffer to disk on each line write, which obviously causes tremendous
> protocol overhead and thus abysmal performance.

Or alternatively, just use the Linux SMB client and don't port
the software to Windows :-).



More information about the samba mailing list