Use SMB vers=2.1 instead of vers=1.0 when mountain Windows shares #66
Comments
Hi @xinity, I did not realize there were different SMB protocol versions around... Looks like they are up to SMB 3.0 in Windows 8: Unfortunately, my quick googling did not bring any decent result on how exactly one can check the protocol version in use and how to enforce a specific one. Can you provide examples (check protocol version, enforce protocol version)? |
kind of simple they are all activated by default : the server (windows hosts) talks to the client using the version supported by the client . to test, you can change in the vagrantfile, the mount options to force smb version with the parameter: hoping this helps, |
@xinity I tried those with no luck. Only
I assume the Tinycore Linux distro (used by boot2docker) only supports SMB 1.0 ... |
Strange as smb implementation is related to kernel version which is 4.0.9 on tiny core..... I'll see what I can find |
@lmakarov
|
thanks alexei, i'll try mouting this morning and so how it goes i'll let you know guys, Le mar. 29 déc. 2015 à 02:12, Alexei Chekulaev notifications@github.com a
|
update: |
So I tried this with
The result is the same - I'm not able to set the @xinity did you do some tests to compare the performance difference SMB 1.0 vs 2.1? Switching off of tinycore to debian would mean a major overhaul of the project and a custom docker-machine/boot2docker image, and I'm not up to that (yet). |
until, we haven't found (very strangely) any performance boost switching from smb1 to smb2 ou smb2.1 (using debian jessie VM with docker installed). FWIW tinycore seems to be too restrictive and not docker oriented, maybe we can switch to coreOS ou rancherOS which uses docker built-in .... |
@lmakarov Daniel Schuhmann wrote(actually that was almost 9 years ago!):
Meaning SMB1 in the very concept is just slow, according to today's standards. The same man also run some comparison tests. Well, we don't know the exact test environment, it was done 9 years ago and even on Windows Server 2008, but I guess it can give some insights. What we want is actually protocols comparison, anyway. Daniel Schuhmann's test: So, as far as insights go, then... Well, you know. Anyway, I've been trying to install/use/force/select/whatever later versions of SMB protocol for several days now, and still no success. If you happen to succeed please, give me a bump. |
@Koriit we run some tests using a debian jessie with the docker engine installed and made some performance test. test were made with symphony apps i can't figure out why , if you guys have any clues, please share with us :) |
@xinity I understand that you are sharing between linux and win hosts, then linux uses cifs mount with vers=2.0/2.1 and what about windows? Which windows and how configured is the SMB protocol? As far as I know Win7 has support for SMB in versions 1.0, 2.0, 2.1 and probably 2.2 which is almost equivalent to 3.0. Then, Win7 should seamlessly adjust to the connected peer but I don't know how it works with Win8+. |
windows 7 host (server) and linux (client) we have also adjusted parameters of SMB on windows like max queue et frame size, to allow bigger transfer the server adjust regarding options used on the client. |
What volumes of data were you sharing? |
several GB from 2 to 5gb at max ! Le jeu. 14 janv. 2016 à 11:39, Aleksander Stelmaczonek <
|
Then I have no other ideas. Might be funky implementation, some other related(or not) mechanisms or environment or anything, rly. :/ |
I did some testing with the
Strangely, the debian box overall performance was slower than the TinyCore one in the same test case. Based on the testing done here there seems to be no point in perusing this any further. Closing. Feel free to reopen if anyone figures out a way to get more out of a newer (v2.0+) SMB protocol version. |
Thanks, @lmakarov https://github.com/lmakarov |
Thanks, @lmakarov who help me to solve the problem. Better than installing an old samba protocol (v1.0), it's better to compile a new boot2docker iso which contents new samba version 2 and above. Go to https://github.com/boot2docker/boot2docker and clone the project. Modify the kernel.config file to enable samba 2. Set CONFIG_CIFS_SMB2=y. Build the docker image as usual and get the new boot2docker iso as described. We can now use the command with vers parameter : mount -t cifs ...., ,vers=2.1 without error and share folders with windows 10. |
@fabricek huge thanks for pointing to the Using I also tried the experimental Anyway, anything newer than SMB1.0 is good, since SMB1.0 is now deprecated and disabled by default starting with Windows 10 Fall Creators Update 1709. It has to be enabled manually and possess security risks for the host machine (see docksal/docksal#382). |
I think we have to update the linux kernel in dockerfile to have vers=3.xx working. I thought modify the dockerfile with this value "ENV KERNEL_VERSION 4.4.116" to the last version. You can see it at https://www.kernel.org/pub/linux/kernel/v4.x and linux-4.9.9.tar.gz for example. So ENV KERNEL_VERSION should be 4.9.9 in dockerfile. Take a look at it. |
Mountain :D |
hi,
reading a lot about smb support on linux kernel and windows 7/8, i found that shared folders using smb are mounted using smb vers=1.0 which far slower than smb >2
see here:
http://blogs.technet.com/b/josebda/archive/2008/12/09/smb2-a-complete-redesign-of-the-main-remote-file-protocol-for-windows.aspx
why not providing an option to use a better protocol than smb1 on windows computer ?
what do you think ?
The text was updated successfully, but these errors were encountered: