Written by Daniel Mundy on Wednesday, 02 February 2011 10:48.
See also: Windows 7 Networking Problems
Windows Vista introduced a new SMB protocol, version 2. It often causes problems:
- Opening 2007 files from a network share takes a long time. The first file takes minutes to open, but subsequently closed it will re-open quickly
- Browsing mapped drives is slow - each directory takes more than a few seconds to open
- Data corruption in Line-of-Business applications that access a shared database on a file share / mapped network drive. The connections to the database time out and cause data corruption.
This affects Windows 7 too.
Turning off SMBv2 fixes these problems for me. If you are not having problems, however, the recommendation is to leave SMBv2 turned on.
Turning SMBv2 Off
Run the following two commands from an elevated command prompt:
sc config lanmanworkstation depend= bowser/mrxsmb10/nsi
This sets the following registry value:
HKLM\System\CurrentControlSet\services\LanmanWorkstation\DependOnService
Type: REG_MULTI_SZ
Data: bowser, mrxsmb10, nsi
sc config mrxsmb20 start= disabled
This sets the following registry value:
HKLM\System\CurrentControlSet\services\mrxsmb20\Start
Type: REG_DWORD
Data: 4
Turning SMBv2 On Again
Run the following two commands from an elevated command prompt:
sc config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi
This sets the following registry value:
HKLM\System\CurrentControlSet\services\LanmanWorkstation\DependOnService
Type: REG_MULTI_SZ
Data: bowser, mrxsmb10, mrxsmb20, nsi
sc config mrxsmb20 start= auto
This sets the following registry value:
HKLM\System\CurrentControlSet\services\mrxsmb20\Start
Type: REG_DWORD
Data: 2
Thanks
Thanks to Richard at axon IT for his blog post which helped me solve this problem.
More Info
Some really good info about the differences between SMBv1 and v2 here: http://www.danieletosatto.com/2010/10/22/smb-tuning-for-xenapp-and-file-servers-on-windows-server-2008/
This also mentions that SMB 2.0 Sessions are per user NOT per computer - this means that for example a terminal server or virtualised server will only open one connection on SMBv1. In this example SMBv2 will bring a great performance boost.