A common issue with terminal servers hosting multiple users is that a single user can start a resource-intensive process, which negatively impacts the performance of other users’ sessions. For example, if one user starts a process that uses more than 90% of the host’s CPU, the other users will not be able to work normally.
To prevent such situations, Windows Server with the Remote Desktop Services (RDSH) role, as well as Windows 10/11 Enterprise multi-session, supports the Dynamic Fair Share Scheduling (DFSS) feature. DFSS dynamically distributes available server computing resources fairly among user sessions, ensuring no single session can monopolize CPU, disk, or network resources, thus maintaining balanced performance for all users. DFSS can manage the use of the following host computing resources:
- CPU Fair Share – used to dynamically distribute available CPU time between sessions (taking into account both the number of active sessions and the CPU time usage of each session). This prevents situations where a single user monopolizes the CPU on an RDS host by running a heavy process.
- Disk Fair Share – it allows the available storage bandwidth for I/O operations to be distributed among users.
- Network Fair Share – allows the available network interface bandwidth to be distributed between sessions using a round-robin mechanism.
DFSS was first introduced in Windows Server 2008 R2, when it was initially only available for scheduling CPU resources. Starting with Windows Server 2012, Fair Share Scheduling was expanded beyond CPU to include dynamic network throughput and disk I/O balancing
The Fair Share feature is enabled on Windows Server 2016 and later versions when the Remote Desktop session host (RDSH) role is installed. Fair load balancing in Remote Desktop Services is applied by default only to CPU resources. The CPU Fair Share feature dynamically distributes available CPU time evenly among user sessions. If a user consumes too many CPU cycles, DFSS automatically reduces the CPU resources allocated to that user, freeing up processing power for other users.
Run the PowerShell command to check if DFSS is enabled:
(gwmi win32_terminalservicesetting -N "root\cimv2\terminalservices").enabledfss
1
– DFSS enabled
0
– Disabled
A separate Group Policy option called Turn off Fair Share CPU Scheduling is available to enable or disable the fair allocation of CPU resources on the RDS host (Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Connections)
By default, Windows Server RDS and Windows Enterprise multi-session versions have CPU Fair Share enabled, while Dynamic Disk Fair Share and Dynamic Network Fair Share are disabled unless manually enabled by an administrator. Check the value of the EnableCpuQuota registry parameter to confirm it:
Get-Itemproperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Quota System\" -name EnableCpuQuota
And the EnableFairShare parameter value is 0 (disabled) for disk and the network (there is no separate GPO parameter for them):
Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\TSFairShare\Disk\" -name EnableFairShare
Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\TSFairShare\NetFS\" -name EnableFairShare
Get the value of all three options:
Get-WmiObject -Class win32_terminalservicesetting -Namespace root\cimv2\terminalservices | FL EnableDFSS,EnableDiskFSS,EnableNetworkFSS
You can only enable Fairy Sharing for the network and disk through the Registry by changing the value of the ‘EnableFairShare’ key to You can only enable Fairy Sharing for the network and disk through the Registry by changing the value of the ‘EnableFairShare’ key to 1.
Or use the following PowerShell command:
Enable Fair Share CPU Scheduling:
$temp = (gwmi win32_terminalservicesetting -N "root\cimv2\terminalservices")
$temp.enableDFSS = 1
$temp.put()
Enable Dynamic Disk Fair Share:
$temp = (gwmi win32_terminalservicesetting -N "root\cimv2\terminalservices")
$temp.enableDiskFSS = 1
$temp.put()
Enable Network Fair Share:
$temp = (gwmi win32_terminalservicesetting -N "root\cimv2\terminalservices")
$temp.enableNetworkFSS = 1
$temp.put()
Accordingly, to disable each DFSS feature, change its value to 0.
In certain situations, it is recommended to disable Dynamic Fair Share Scheduling if it significantly impacts the performance of user apps on an RDS host. While DFSS helps ensure fair distribution of resources like CPU, disk, and network bandwidth among users, some workloads may experience throttling, leading to degraded app performance.