Windows Server - Data copy slow - Action plan to minimize the SMB slowness.

Windows Server - Data copy slow 

We had a problem with one server while copying the data to another server it was very slow. 

Solutions:  

action plan to minimize the SMB slowness. 

 

1.      Test storage speed, as file copy speeds are limited by storage speed

a.      File copies will sometimes start fast and then slow down

                                                                          i.            This usually happens when the initial copy is cached/buffered (either in memory or the RAID controller’s memory cache) and the cache runs out, forcing data to be written directly to disk (write-through) which is slower

                                                                         ii.            Use storage performance monitor counters to see if storage performance degrades over time

https://blogs.technet.microsoft.com/askcore/2012/02/07/measuring-disk-latency-with-windows-performance-monitor-perfmon/

                                                                       iii.            Use RAMMap (SysInternals) to see if “Mapped File” usage in memory stops growing due to free memory exhaustion

 

2.      [SMB Client] Enable large MTU in SMB (EnableLargeMtu = 1)

 

3.      [SMB Client] Disable bandwidth throttling (EnableBandwidthThrottling = 0)

4.       

HKLM\system\CurrentControlSet\Services\lanmanworkstation\parameters

 

Set-SmbClientConfiguration -EnableBandwidthThrottling 0 -EnableLargeMtu 1

 

For further analysis I need ETL logs of server and client Simultaneously at the time of issue.

Below is the method to collect ETL logs:- 

 

1.      Start the capture (Run from an administrative command prompt)

netsh trace start scenario =netconnection capture =yes report =yes maxSize =512 fileMode =circular

 

After running this command Reproduce the issue so that it can be captured in the trace,

 

1.      stop the logging:

Netsh trace stop

 

Along with ETL logs I need,

IP address of Server and Client ?

Exact time/time interval of the issue ?

 

Disabling SMB Redirector cache can help in slowness

 

Kindly disable SMB Redirector cache on client by making below registry keys [if they do not exist] and share the outcome.

 

·         FileInfoCacheLifetime

 

HKLM\System\CurrentControlSet\Services\LanmanWorkstation\Parameters

 

DWORD: FileInfoCacheLifetime

Value: 0

·         DirectoryCacheLifetime

 

HKLM\System\CurrentControlSet\Services\LanmanWorkstation\Parameters

 

DWORD: DirectoryCacheLifetime

Value: 0

 

·         FileNotFoundCacheLifetime

 

HKLM\System\CurrentControlSet\Services\LanmanWorkstation\Parameters

 

DWORD: FileNotFoundCacheLifetime

Value: 0

 

 

set -smbclientconfiguration -EnableLargeMtu $true

 

 

  This is expected, to a point, and a well-known behavior

a.      Small file copies are slow because there is both a high protocol and a high file system cost to creating a file

b.      Large files transfer fast because the file creation cost only happens once

c.       When a large number of small files are copied the cost is repetitive and causes slow transfers

 

1.      Perform the file copy locally between two disks

a.      This will be faster than over the network, as there is no protocol overhead or network latency, but still much slower than copying larger files locally

b.      This is a good visual demonstration of how small file copies are slow, even locally




If it's helpful, please like and follow. 

Comments

Popular posts from this blog

User Account not shwoing in Azure Metaverse - Azure Sync Issues

Could not communicate with the VM agent for snapshot status.

Hidden or corrupted Outlook inbox Rule