windows nfs client list files/folders slowly
微软很懒,20多年了,windows上的nfs client一直是v3版本
XP/2003时代沿用的文档(KB894071)也适用最新版Windows系统,但是XP/2003生命周期已尽,微软连相关文档都下掉了,而新的Windows系统想找对应文档都只能找别处的引用
https://www.betaarchive.com/wiki/index.php/Microsoft_KB_Archive/894071
https://social.technet.microsoft.com/Forums/windows/en-US/8eb5837f-618a-477a-8fcd-340dfbd42372/nfs-client-performance-readahead-writebehind-and-registry-key-definitions
https://social.technet.microsoft.com/Forums/office/en-US/e8317b0a-fd80-49fb-8bd9-a598b6dc569a/nfs-client-cache
https://www.ibm.com/docs/sl/zos/2.3.0?topic=clients-administering-windows-nfs-client
总结下,解决方案就是执行3句命令:
代码语言:javascript复制reg add "HKEY_LOCAL_MACHINESOFTWAREMicrosoftClient for NFSCurrentVersionUsersDefaultCache" /v "AttributeTimeDelta" /d 0 /t REG_DWORD /f
reg add "HKEY_LOCAL_MACHINESOFTWAREMicrosoftClient for NFSCurrentVersionUsersDefaultCache" /v "FileAttributeCache" /d 0 /t REG_DWORD /f
reg add "HKEY_LOCAL_MACHINESOFTWAREMicrosoftClient for NFSCurrentVersionUsersDefaultCache" /v "RemoteWriteCache" /d 0 /t REG_DWORD /f
smb client也有类似3句命令
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-7/ff686200(v=ws.10)
代码语言:javascript复制reg add "HKEY_LOCAL_MACHINESystemCurrentControlSetServicesLanmanworkstationParameters" /v "FileInfoCacheLifetime" /d 0 /t REG_DWORD /f
reg add "HKEY_LOCAL_MACHINESystemCurrentControlSetServicesLanmanworkstationParameters" /v "FileNotFoundCacheLifetime" /d 0 /t REG_DWORD /f
reg add "HKEY_LOCAL_MACHINESystemCurrentControlSetServicesLanmanworkstationParameters" /v "DirectoryCacheLifetime" /d 0 /t REG_DWORD /f