The SMB Redirector component implements the client portion of the file-and-print sharing functionality exposed by Windows through Microsoft Networking. The implementation is based on the Server Message Block (SMB) protocol. The SMB protocol allows the client computer to access files on another computer that implements the SMB server portion of the file-and-print sharing functionality, as well as access to a shared printer. The SMB protocol also establishes caches on a client which allow the client to more efficiently satisfy file data, metadata (file attributes, presence or absence of files) and directory enumeration.
With the release of SMB 2.0 in Windows Vista® and Windows Server 2008, three file metadata caches were implemented to speed up the return of the most recently accessed file and directory information. These caches also reduce the number of interactions a client requires with a SMB server for common file browsing operations. This has value in a scenario such as a client browsing a network file directory while connected via a low bandwidth or high latency connection. For common network file browsing scenarios, the default values are sufficient and should not be altered. Changing these cache timeout values can have significant performance implications to many network file scenarios. As each of these caches is designed to reduce the number of SMB server requests, they are important not only in client response time evaluation, but also in overall SMB server scalability and performance.
If changes are deemed necessary to these default values, they may be altered by creating these client registry keys and changing to the appropriate setting. Each cache is independent and controls specific information. It is not necessary to change all of the caches if a change to any one of the caches is necessary, as they operate independently and control different redirector optimizations.The default values were selected for the broadest range of SMB file access scenarios. However these default settings may not be appropriate for all network application usage.
Applications which require a high level of file information consistency across clients which may utilize creation or changing of a file as a notification mechanism to other nodes may encounter delays or consistency issues with these default values. There are other programmatic recommendations for an application to be notified of a change on a file, or directory such as the FindFirstChangeNotification, FindNextChangeNotification, or the ReadDirectoryChangesW APIs which are described within the Win32 and Com Development File Systems documentation on the Microsoft Developer Network. For more information on the specific reference to Obtaining Directory Change, see Obtaining Directory Change Notifications in the Microsoft Developer Network (http://go.microsoft.com/fwlink/?LinkId=187242).
There are three different caches utilized by the client SMB network redirector if SMB 2.0 is the negotiated protocol.
If you suspect metadata caching in the redirector as cause for misbehaving applications, disable the caches in the following order to determine which of these caches is affecting the application. Disabling the File information cache can have significant effect on client performance and show an increase in the number of metadata requests that are sent to the server.
Directory cache, by setting DirectoryCacheLifetime to ZERO.
File Not Found cache, by setting FileNotFoundCacheLifetime to ZERO.
File information cache, by setting FileInfoCacheLifetime to ZERO.