Knowledge Base

TreeSize



Question / Problem

TreeSize shows incorrect number of hardlinks for files, stored on a network share. What can I do?

Answer / Solution

With Windows Vista / Server 2008 Microsoft introduced "Client Caches" with the SMB2 protocol in order to speed up the queries about gathering file and directory meta information on network drives. This approach helps also to utilize the available network bandwidth more efficient. However, these caches do always return an incorrect value for the NTFS hardlinks (always shown as "1").The responsible caches can be disabled by the following steps:

  1. Run "regedit.exe".
  2. Open the path "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters".
  3. Choose "New > DWORD value" in the right click menu and set the name to "FileInfoCacheLifetime" and the value to "0".
  4. Restart Windows

After these steps TreeSize should work properly with hardlinks. For further information about client caches please visit https://technet.microsoft.com/en-us/library/ff686200(WS.10).aspx