SMB Block Size Negotiation When Copying Files with Windows NT ExplorerID: Q223140
|
When you copy or move a file, the negotiated Server Message Block (SMB) size is different. The block size depends on a number of factors including:
The factors listed below determine which transfer mode is chosen. However, in this example, what's happening is not getting exclusive use of the Virtual Circuit (VC), which is created when setting up the connection between the two computers. When you cut or copy a file in Windows NT Explorer, make a folder, or perform some other file system changes, Windows NT Explorer will show that change quickly by updating the display. The update in the display is triggered by a call called ChangeNotify.
When copying a file to a remote computer, a long distance ChangeNotify call is triggered. This call goes over the network. This call also prevents getting exclusive use of the VC to copy the file. When copying a file from a remote computer back to the client (command issued locally), the ChangeNotify call is still triggered, but it's now a local call. So the call is not sent over the wire, therefore, the copy operation gets exclusive use of the VC.
Because ChangeNotify is not called for to copy or move a file when you use an MS-DOS command prompt command, these transfers typically use Raw mode.
From the specifications for Core versus Raw mode data transfers:
The Windows NT redirector has the following requirements for performing raw mode I/O, all of which must be satisfied for raw mode I/O to occur.Core Mode Data Transfer:
- The Server Message Block (SMB) protocol negotiated between the client and server must support Raw mode.
- The server must be configured to support Raw mode.
- The client redirector must be configured to allow Raw mode.
- No other SMB requests are pending on the same Virtual Circuit (VC).
- The I/O is not on a blocking named pipe.
- For a READ request: the requested data size is equal to or greater than 2 times the currently configured request buffer size, and the read offset is not past the redirector's currently configured end-of-file.
- For a WRITE request: the requested data size is equal to or greater than 1.5 times the currently configured request buffer size, and the write offset is not more than approximately 1 MB past the current end-of-file.
- The I/O is to take no longer than 5 seconds to complete."
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services \LanmanServer\Parameters NOTE: The above registry key is one path; it has been wrapped for readability.
Value Name: SizReqBuf
Data Type : REG_DWORD
Data : 512 - 65536 (bytes in decimal)
Default : 4096
NOTE: Small buffers use less memory and large buffers can improve performance. The exact value that works best in a given environment will depend on the specific configuration of that environment, but 14596 is a value that has been shown to work well in a fairly standard Ethernet environment. Setting this parameter to the maximum value will make server to transfer data in 60 KB blocks. Q152081 Use of Raw Data Transfer Mode Influenced by Application
Additional query words: data transfer raw core SMB negotitate slow
Keywords :
Version : winnt:4.0
Platform : winnt
Issue type : kbinfo
Last Reviewed: April 30, 1999