SMB2.0 读写文件优化

转自:

http://blogs.citrix.com/2010/10/21/smb-tuning-for-xenapp-and-file-servers-on-windows-server-2008/

http://blogs.msdn.com/b/openspecification/archive/2009/04/10/smb-maximum-transmit-buffer-size-and-performance-tuning.aspx


SMB 2.0 File Server Tuning

HKLM\System\CurrentControlSet\Services\LanManServer\Parameters

  • TreatHostAsStableStorage (REG_DWORD). This key does not exist by default and has an assumed of value 0. If your file server provides storage that is protected with battery backed write cache, then this can be set to 1. Setting this to 1 will cause the server to ignore write flush operations initiated from client computers. This will improve performance and reduce overhead on the file server.
  • MaxThreadsPerQueue (REG_DWORD). This key does not exist by default and has an assumed value of 20. On servers that support a large number of users and have multiple processors, this value should be increased to 64 decimal.
  • Smb2 (REG_DWORD). This key does not exist by default and has an assumed value of 1. Settings this to zero will disable SMB 2 and force the server to use SMB 1.0. It is recommended that this key be set to 1 to ensure that SMB 2.0 is enabled.
  • Smb2CreditsMin (REG_DWORD). This key does not exist by default and has an assumed value of 64. This value determines the minimum amount of credits to which a file server will forcibly limit an SMB session. This key should not need to be modified.
  • Smb2CreditsMax (REG_DWORD). This key does not exist by default and has an assumed value of 1024. This value determines the maximum amount of credits a file server will allow for a single SMB session. This key should not need to be modified.

HKLM\System\CurrentControlSet\Control\Session Manager\Executive

  • AdditionalCriticalWorkerThreads (REG_DWORD). The default value is 0. On high usage file servers with multiple processors, especially 4 or more, you can add additional kernel threads that can be used by the System Cache to improve storage performance. This value should be increased to 64 decimal.

SMB 2.0 Client Tuning

Below are some important new registry keys that can be tuned on an SMB 2.0 Client computer.

HKLM\System\CurrentControlSet\Services\LanManWorkstation\Parameters

  • DisableBandwidthThrottling (REG_DWORD). This key does not exist by default and has an assumed value of 0. The SMB 2 client will try to limit its network throughout on links that it perceives as latent. Since most XenApp deployments should be mapping drives to file servers that are highly connected, there is no need to try and limit the throughput of the SMB sessions. This value should be set to 1.
  • MaxCredits (REG_DWORD). This key does not exist by default and has an assumed value of 128. By default a single user’s SMB 2.0 session will be limited to 128 credits. This is similar to the old MaxCmds settings under SMB 1.0. However, since each user gets their own queue of 128 credits, there is not typically a requirement to increase this value unless there are network intensive applications running off file servers. There may be a need to increase this value when running the App-V shared cache from a UNC path. More research will need to be done to determine an optimal value. However, since the file server by default supports up to 1024 credits per session, this value may need to be increased.


你可能感兴趣的:(SMB2.0 读写文件优化)