zl程序教程

您现在的位置是:首页 >  Java

当前栏目

windows nfs client list files/folders slowly

2023-02-18 16:48:02 时间

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句命令:

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Client for NFS\CurrentVersion\Users\Default\Cache" /v "AttributeTimeDelta" /d 0 /t REG_DWORD /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Client for NFS\CurrentVersion\Users\Default\Cache" /v "FileAttributeCache" /d 0 /t REG_DWORD /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Client for NFS\CurrentVersion\Users\Default\Cache" /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)

reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Lanmanworkstation\Parameters" /v "FileInfoCacheLifetime" /d 0 /t REG_DWORD /f
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Lanmanworkstation\Parameters" /v "FileNotFoundCacheLifetime" /d 0 /t REG_DWORD /f
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Lanmanworkstation\Parameters" /v "DirectoryCacheLifetime" /d 0 /t REG_DWORD /f