[Samba] poor performance when copying files with windows client

awl1 awl1 at mnet-online.de
Tue Sep 5 09:10:55 UTC 2017

Hello Nicolas,

in case your testing scenario includes a large number of small files, 
and directories with a huge number of files, I would also think that it 
is possible that you are hitting the exact same issue that I have uncovered:


Base line is that there are two big root causes that make SMB2 behave 
much worse than SMB1 with a huge number of small files even in an 
unencrypted scenario:

(a) as you seem to have uncovered as well, the Microsoft SMB2 client 
uses very inefficient SMB2 Find commands (always with Pattern "*")
(b) if the SMB2 server is Samba (as opposed to running on Windows), the 
fact that Samba does not yet implement "directory handle leases" is 
especially detrimental to performance due to the fact that issue (a) in 
the Windows client requires re-reading the whole directory structure for 
each and every inefficient SMB2 Find request sent by the Windows client

I am about to post a detailed testing scenario and Wireshark traces on 
samba-technical (during the next couple of days) in order to properly 
document this and make the Samba team and their colleagues at Microsoft 
aware of the issue(s).

So what does your testing scenario look like when it comes to number of 
files per directory and file sizes? Also, what maximum speed do you get 
from a Linux "mount.cifs vers=3" client as opposed to a Windows client 
when accessing the Samba server? And finally, will your scenario run 
faster when you use the same Windows client, but store your files on a 
Windows 10 SMB2 server share (only for testing purposes)?

Hope this helps & best regards

Am 04.09.2017 um 20:25 schrieb Nicolas Zuber via samba:
> Hello everyone,
> in my setup I have two samba file server with clustered samba 4.6.7 and
> glusterfs 3.10. The server are connected via a 10 Gb network (one for
> clients and an extra network for gluster). When I am copying files from
> different server ( centos 7 1611, samba 4.4.4, connected with 10Gb) to
> the file servers with scp, the maximum speed is 70 MB/s (for small files
> this is decreasing). However if I create a samba share on the
> fileservers and a samba share on the other server and use a windows 7
> client to copy the same files, the speed is decreased to less than 10
> MB/s. While capturing the the network traffic, I noticed several access
> denied messages in response to a file request message. But in the end
> the file is still written and the permissions (windows acl) are set
> correctly. Does anybody know if this is an intended behaviour and how
> one could increase the performance when copying files with a windows
> client from network shares? If you need more informations please let me
> know.
> Best regards,
> Nicolas

More information about the samba mailing list