# SMB block size negotiation (a.k.a file copy slow over WAN)



## O111111O (Aug 27, 2005)

I just wanted to post this as an FYI. I thought users that read this forum may benefit. I won't include the gory details, the TCPDumps, SMB analysis, etc - but here's the synopsis.

Over VPN, WAN, or any link that increases latency between nodes above typical "LAN" speeds - CIFS/SMB file access for Windows systems can be typically slow.

This is a constant support question. "Why can I achieve 70Mbps when I copy the file locally, but across my [insert super fast connection across the planet] I'm only seeing 3-5Mbps"

Answer: TCP windowing, and SMB block size negotiation. Microsoft has published it's myriad of Windows releases to achieve decent performance across the lowest common denomination of users. Therefore tuning is required whenever latent connections are introduced.

Case study:
Customer with GigEthernet LAN and Layer3 metro switched access. Everything inside the Metro area was 1-3ms MTTR. File copies/general SMB access was great. Typically any one user could open a file upwards of 60-70MBps.
Customer introduced some national offices. Serial DS3's, and POS OC-3's were installed across Cisco 7200 and 3800 series routers.
Customer immediately started complaining about file access across WAN. Even if WAN was unutilized (less than 1Mbps of traffic), file copies would never exceed 5-6Mbps.

Solution: RTFM
http://support.microsoft.com/kb/q223140
http://www.microsoft.com/technet/itsolutions/network/deploy/depovg/tcpip2k.mspx

Registry changes made:

Key: HKLM\SYSTEM\CurrentControlSet\Services\
LanmanServer\Parameters
Value: SizReqBuf (Reg_Dword)
Data: 65535 (decimal)

Key: HKLM\SYSTEM\CurrentControlSet\Services\
LanmanServer\Parameters
Value: TcpWindowSize (Reg_Dword)
Data: 64240 (decimal)

File copy access is now fast as any one LAN connection.

Regards.


----------

