When i mount a samba share with vers=2.0, 2.1 or 3.0 the file system behavior become very unresponsive. It seems like the file system is waiting for all other operations to complete before the current operation starts. Like all access is serialized for complete operations (i.e. copying a complete file, not only some blocks). This is especially noticeable on slow network connections (i have mounted the samba share over a vpn with 1MiB/s bandwidth and about 35msec rtt).
Example: I start copying a folder containing several larger files from the samba share to a local hard drive. The copy process of the first file starts. After this, i cd in a directory that lies on the samba share (in another terminal). This cd only returns after the complete first file is copied.
exact mount command used:
mount -t cifs -o vers=3.0,credentials=/somedir/somefile,uid=xxxxx,nosetuids,iocharset=utf8 //server/share /mnt/temp/
If i use vers=1.0 the problems are gone. The operations are slow (while copying a file) but interleaving.
The problem was reproduced using samba 3.6.24 (only vers=2.0) and 4.1.15 on the server side.
one further notice: i have tested with cache=none because it thought it might be related to opportunistic locking, but with NO success.
Now, since vers=3.0 has become the standard: this is still valid for kernel 4.14.8
possible duplicate: https://bugzilla.kernel.org/show_bug.cgi?id=198349
No one cares? Samba is almost unusable with this bug.
I think this one is related to wsize and rsize. The default values increased from 64k (vers=1.0) to 4M (kernel > 4.20, vers>=2.1). When I lower that value to 64k again the behaviour of a mount with vers=3.1.1. matches the one of vers=1.0.
What bothers me is that the delay until a mount reacts on new commands seems to be a multitude of the wsize / bsize.