If you have a file server system in your company, you may want to tune some parameters and settings to enhance its performance. For example, you may want the highest possible throughput on your server to meet the growing workload needs.
This article gives a set of guidelines that you can implement to optimize the file server settings in Windows Server 2016 and benefit from optimized performance.
How to Optimize File Server Performance?
1. Choose a Proper Hardware
Foremost, you should go for a good hardware that will sufficiently support your performance incremental efforts. If the hardware cannot meet the expected file server load, the software adjustments may not yield significant fruits.
Here are some important hardware parameters you should optimise.
- Response times
- Growth expectations
- Loading factors—such as average load and peak load
- Capacity level
2. Optimise SMB Parameters
The Server Message Block (SMB) protocol is included into the Windows server to enhance the sharing of files and other resources across the network. The latest version available on Windows Server 2016 is 3.1.1, and it comes with several helpful features you can optimise to get the most of it.
Here are some tips on how to optimise the various SMB parameters.
a) Practice “least privilege” principle
You can practice the principle of least privilege by limiting access to some services or features. If a file server or a file client do not need any feature, just disable it. Period.
Some of the features you can disable include:
- SMB signing
- SMB encryption
- NTFS encryption
- File system filters
- Client-side caching
- Scheduled tasks
Btw, check out our FolderSecurityViewer to analyze and report NTFS permissions. Download the Free Edition now!
b) Configure power management mode
A constant high workload will reduce the speed and performance of your server. Therefore, for a comfortable working experience, you should make sure that the configurations for any BIOS as well as operating system power management is done correctly.
For example, this may consist of High Performance mode or even modified C-State. To avoid any bottlenecks, remember to install the most up-to-date, robust, and quickest storage and networking device drivers.
c) Follow file copying best practices
Users usually copy files from one location to the other on file servers. There are some best practices you can follow to enhance the speed of transferring files.
Windows has numerous utilities you can run on the command prompt and conveniently transfer files. And, the recommended ones are Robocopy and Xcopy.
If using Robocopy, it’s advisable to include the /mt option to quickly copy and transfer several small files. It is also advisable to use the /log option to lessen console output by enabling redirection to NUL device or to a file.
If using Xcopy, you can significantly increase performance by including the /q option (which lowers CPU overhead) and /k option (which lowers network traffic) to your present parameters.
d) Practice SMB performance tuning
It is important to note that the performance of a file server will largely depend on the parameters set on the SMB protocol. If the parameters are well tuned, the file server performance can greatly improve.
Here is table giving some of the registry settings that can influence the operation of the SMB file servers, together with some recommended practices.
|The defaults are 512 and 8192 correspondingly.
Check SMB Client Shares\Credit Stalls /Sec to observe any problems with credits.
|AdditionalCriticalWorkerThreads||HKLM\System\CurrentControlSet\Control\Session Manager\Executive\AdditionalCriticalWorkerThreads||The default is 0. You could raise the value if the quantity of cache manager dirty data is consuming a larger percentage of memory.|
|MaxThreadsPerQueue||HKLM\System\CurrentControlSet\Services\LanmanServer\Parameters\MaxThreadsPerQueue||The default is 20. In case the SMB2 work queues are increasing significantly, raise the value.|
|AsynchronousCredits||HKLM\System\CurrentControlSet\Services\LanmanServer\Parameters\MaxThreadsPerQueue||The default is 512. In case a big quantity of concurrent asynchronous SMB commands is needed, raise the value.|
Here is an example of how the settings can be applied to achieve optimum file server performance on Windows server 2016. Note that the settings are not suited for all computing situations, and you should assess the effect of every individual settings before using them.
3. Optimise NFS Parameters
The Network File System (NFS) model available in Windows server 2016 is important for enabling client-server communications in mixed Windows and UNIX conditions.
Here is table giving some of the registry settings that can influence the operation of the NFS file servers, together with some recommended practices.
|OptimalReads||HKLM\System\CurrentControlSet\Services\NfsServer\Parameters\OptimalReads||The default is 0. Before making any changes to the setting, evaluate its effect on system file cache grow.|
|RdWrNfsHandleLifeTime||HKLM\System\CurrentControlSet\Services\NfsServer\Parameters\RdWrNfsHandleLifeTime||The default is 5. Appropriately set it to ensure optimal control of the lifetime of NFS cache.|
|CacheAddFromCreateAndMkDir||HKLM\System\CurrentControlSet\Services\NfsServer\Parameters\CacheAddFromCreateAndMkDir||The default is 1. Adjust the value to 0 to deactivate the inclusion of entries to the cache in CREATE and MKDIR directories.|
|MaxConcurrentConnectionsPerIp||HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Rpcxdr\Parameters\MaxConcurrentConnectionsPerIp||The default is 16. Raise it to the highest value of 8192 to increase the number of connections for every IP address.|
4. Uninstall Unused and Redundant Features
Windows server 2016 has dozens of logging, monitoring, and debugging tools, most of which you may not find useful.
The amount of space available on the server is critical and allowing unused and redundant tools to just sit there is not doing any justice to your server.
On a regular basis, you should visit the “Service Control Manager” section and remove services and features that do not add value to your file server.
You should uninstall any utility or application that you find not useful, and your file server performance will greatly improve.
For example, you should always deactivate the DOS 8.3 short file names. For backward compatibility, your Windows server 2016 may contain the DOS 8.3 file names, especially if you upgraded your server from an older version of Windows.
These days, the 8.3 short file name is unnecessary, and they do not add any value to the operation of the file servers. Therefore, disabling this feature will provide some additional speed to your Windows server 2016.
Microsoft. (2017). Performance tuning for SMB file servers. Retrieved from https://docs.microsoft.com/en-us/windows-server/administration/performance-tuning/role/file-server/smb-file-server
Apachelounge. (2017). Performance tuning guidelines for Windows Server 2016. Retrieved from https://www.apachelounge.com/download/contr/Perf-tun-srv-2016.pdf