[Samba] Linux vs. Windows SMB buffering

Jeremy Allison jra at samba.org
Sat Oct 7 00:09:11 UTC 2017

On Fri, Oct 06, 2017 at 07:26:29PM +0000, Will Lucas wrote:
>     Does the wireshark trace show the Windows client asking for and
>     getting a RWH lease under SMB2 ? If so, then there's no reason
>     it can't be caching the entire file locally. Seems strange
>     behaviour from the Windows redirector here.
> I have uploaded the Linux packet capture here (14MB): https://drive.google.com/
> open?id=0B6UHr3GQEkQwWXJ1NjVwMkJXOEU
> Also, here is the corresponding Windows packet capture as well (375MB): https:/
> /drive.google.com/open?id=0B6UHr3GQEkQwbFhOY0lCcEFjZkU
> to Windows :-).

The Linux client is asking for SMB1 and using 1MB write sizes.

The Windows client is using SMB2 and *NOT ASKING FOR LEASES*.

This is why the performance is terrible. Because the file
as no lease, the Windows redirector must pass every single
WriteFile() system call onto the wire, no matter how small
the size.

If you can get the Windows SMB2 client to request a lease,
the performance problem will be solved.

What is your server ? Is it Samba ? If so what version ?

More information about the samba mailing list