Windows OS Hub
  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange

 Windows OS Hub / Windows Server 2008 R2 / Slow Network Shared Folder Refresh on Windows Server

February 28, 2019 Windows 7Windows Server 2008 R2Windows Server 2012 R2

Slow Network Shared Folder Refresh on Windows Server

Users of one of my customer constantly complain that newly created files don’t appear immediately on the network shared folder on Windows Server 2008 R2, but with a long delay, even if they refresh the share folder contents by pressing F5. Regardless of whether a user opens the network share using the UNC path or it is connected as a network mapped drive, new files and folders after they have been copied or created appear only in 1-2 minutes, not immediately. However, if you specify the full name of the file using its UNC path (\\lon-file-srv1\public\new_file.docx), it will open, though will not be visible in the File Explorer.

Thus, at some moments the list of files and folders in the same network shared folder won’t match if viewed on two different computers. It should be noted that user computers are running Windows 7 as the desktop OS.

Slow shared folder refresh on windows server 2008 r2

The matter is that caching began to be used in SMB v2.x for Windows 2008 / Vista (see the table of SMB protocol versions) to reduce traffic and the number of SMB requests between an SMB client and server, and to provide quick access to network shared files and folders (it is quite effective when accessing the network shares using a slow channel or an untenable channel). Thus, Microsoft Redirector component on user computers uses a local cache containing network share metadata. By default the cache is cleared every 10 seconds.

If you face a problem when new files are slow to show up in a network shared folder, you can disable metadata caching for SMB v2 on the clients.

Tip. Please, note that computers running Windows 8 or Windows 10 are using SMB v2 client to access network shares on Windows Server 2008 R2, though they support a newer version of the protocol – SMB v3. To find the SMB protocol version a client is using to interact with a SMB server, run the following PowerShell command:

Get-SmbConnection

Get-SmbConnection - get smb version (dialect) used to access share

There are three registry parameters that manage network shares cache settings on the SMB client. Microsoft states that the default values of these keys provide the best performance for most environments. The parameters of SMB2 cache settings are located in the registry key HKLM\System\CurrentControlSet\Services\LanmanWorkstation\Parameters.

  1. DirectoryCacheLifetime is the lifetime of the shared folder metadata cache (10 seconds by default);
  2. FileNotFoundCacheLifetime is “File not found” response cache (5 seconds);
  3. FileInfoCacheLifetime is the time of keeping the cache with the file info (10 seconds).

Thus, the default lifetime of the SMBv2 cache in the network shared folder is 10 seconds. When a client updates the contents of the shared folder, the result of the last update is stored on a client for 10 seconds. When accessing this share, all apps are trying to use this cache first.

If you see that new files are not displayed immediately in the network share, check the value of DirectoryCacheLifetime registry key and replace it with the smaller value (or disable it completely).

To disable caching of the SMB folders, create a DWORD parameter with the name DirectoryCacheLifetime in HKLM\System\CurrentControlSet\Services\LanmanWorkstation\Parameters and change its value to 0. Then restart your computer. In the same way, you can change the values of FileInfoCacheLifetime and FileNotFoundCacheLifetime parameters to 0.

DirectoryCacheLifetime - smbv2 shared folder cache setting

After that all changes in the network shared folder will be immediately displayed on a client (the contents of the folder is refreshed each time it is accessed and the local cache is not used).

0 comment
1
Facebook Twitter Google + Pinterest
previous post
ESXi: Slow Disk Performance on HPE Gen8
next post
Copying Approved Updates Between WSUS Target Groups

Related Reading

Updating the PowerShell Version on Windows

December 24, 2020

Zerologon (CVE-2020-1472): Critical Active Directory Vulnerability

December 4, 2020

How to Run CMD/Program under SYSTEM (LocalSystem) in...

December 3, 2020

Remote Desktop Services Is Currently Busy

October 27, 2020

How to Reduce Windows.edb Huge File Size?

October 19, 2020

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange
  • Windows 10
  • Windows 8
  • Windows 7
  • Windows Server 2016
  • Windows Server 2012 R2
  • Windows Server 2008 R2
  • PowerShell
  • VMWare
  • MS Office

Recent Posts

  • Preparing Windows for Adobe Flash End of Life on December 31, 2020

    January 22, 2021
  • Checking User Logon History in Active Directory Domain with PowerShell

    January 22, 2021
  • How to Disable/Remove Thumbs.db File on Network Folders in Windows?

    January 21, 2021
  • MS SQL Server 2019 Installation Guide: Basic Settings and Recommendations

    January 19, 2021
  • USB Device Passthrough (Redirect) to Hyper-V Virtual Machine

    January 15, 2021
  • Windows 10: No Internet Connection After Connecting to VPN Server

    January 13, 2021
  • Updating the PowerShell Version on Windows

    December 24, 2020
  • How to Enable and Configure User Disk Quotas in Windows?

    December 23, 2020
  • Restoring Deleted Active Directory Objects/Users

    December 21, 2020
  • Fix: Search Feature in Outlook is Not Working

    December 18, 2020

Follow us

woshub.com
  • Facebook
  • Twitter
  • RSS
Popular Posts
  • How to Restore Deleted EFI System Partition in Windows 10?
  • Booting Windows 7 / 10 from GPT Disk on BIOS (non-UEFI) systems
  • Removable USB Flash Drive as Local HDD in Windows 10 / 7
  • Fix: BSOD Error 0x0000007B on Boot on Windows 7 and Server 2008 R2
  • How to increase KMS current count (count is insufficient)
  • How to Sign an Unsigned Driver for x64 Windows 10, 8.1 or 7 with a Self-signed Certificate
  • How to Disable UAC Prompt for Specific Applications in Windows 10?
Footer Logo

@2014 - 2018 - Windows OS Hub. All about operating systems for sysadmins


Back To Top