Advertisement

Tweaks LAN

top computer

LAN Tweaks for Windows 7, 8, 10

Fix issues and improve local area network and file sharing performance2014-04-08 (updated: 2017-01-13) by 
The information in this article focuses on improving local area network performance and file sharing under Windows 7, 8, 10, as well as 2008/2012 Server. The tweaks below can be used in addition to our general broadband tweaks. Some proficiency in editing the Windows Registry is expected.

Network Memory Allocation (Event ID 2017 error)

This tweak applies to Windows 7, 8, 10, 2008 server, and 2012 Server. It can be applied using the SG TCP Optimizer as well.
When using Windows to serve many/large files over the local network, it is possible to sometimes run into memory allocation errors related to the Windows share, especially with clients that use different operating systems. When this happens, you can usually see the following error in the Event Viewer System log:
Event ID: 2017  "The server was unable to allocate from the system nonpaged pool because the server reached the configured limit for nonpaged pool allocations." It is also possible to get an error indicating that "Not enough server storage is available to process this command". To avoid those errors, you need to change the way Windows allocates memory for network services and file sharing. The below settings optimize the machine as a file server so it would allocate resources accordingly. There are two related registry settings:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
LargeSystemCache=1 (DWORD, default value: 0, recommended value: 1 for LAN transfers, 0 for gaming)
A value of zero establishes a cache of ~8 MB, a value of 1 allows the cache to expand up to the amount of physical memory minus 4 MB, as necessary. It improves large file transfers over Gigabit LANS, reportedly some ATI videocards' drivers have an issue with it so we recommend to leave it off/zero for gaming.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
Size=3 (DWORD, default value: 1, recommended value: 3)
1 - minimizes used memory
2 - balance used memory
3 - optimal setting for file sharing and network applications

Network Throttling Index

Applies to Windows 7, 8, 10, 2008 Server, and 2012 Server. Setting can be applied using the TCP Optimizer as well.
By default, Windows implements a network throttling mechanism to restrict the processing of non-multimedia network traffic to 10 packets per millisecond (a bit over 100 Mbits/second). The idea behind such throttling is that processing of network packets can be a resource-intensive task, and it may need to be throttled to give prioritized CPU access to multimedia programs. In some cases, such as Gigabit networks and some online games, for example, it is beneficial to turn off such throttling all together for achieving maximum throughput.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile
NetworkThrottlingIndex=ffffffff  (DWORD, default: 10, recommended: 10 for media sharing, ffffffff for gaming and max throughput, valid range: 1 through 70 decimal or ffffffff to completely disable throttling)
It is only recommended to change this setting in saturated Gigabit LAN environments, where you do not want to give priority to multimedia playback. Reportedly, disabling throttling can also help reduce ping spikes in some online games.

Other Common Issues and Fixes


Lost Connection to Mapped Drive
Mapped drive is disconnected after inactivity, Windows Explorer shows a red "X" on the icon of the mapped drive, but you can browse the mapped drive and it reconnects.
Change the default time-out period on the shared network computer.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
autodisconnect = ffffffff (DWORD, default: 15, recommended: ffffffff)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\lanmanworkstation\parameters
KeepConn = 32000 (DWORD, default: not present)
Note: Setting applies to Windows 7, 8, 10, 2008 Server, 2012 Server

Not Enough Server Storage
is Available to Process this Command error
The server's IRPStackSize is too small for the server to use a local device. You may experience the following error messages:
Not enough server storage is available to process this command
Not enough memory to complete transaction. Close some applications and retry
Increase IRPStackSize to fix this:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
IRPStackSize = 30 (DWORD, default: 15, recommended: 30, maximum value: 50)
Note: Setting can ve applied to Windows 7, 8, 10, 2008 Server, 2012 Server

Disable SMB2 on Windows 7 File Server with Windows XP Clients
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
SMB2 = 0
 (DWORD, default: not present assumes 1, recommended: 0 if using clients with older Windows variants)
SMB1 = 1 (DWORD, default: not present assumes 1-enabled, recommended: 1 - no need to add or change)
Under Windows 8/10/2012 Server, you can also disable SMB2/3 using PowerShell cmdlets:
Set-SmbServerConfiguration -EnableSMB2Protocol $false
References: MS KB2696547

See Also