Fair Share Technologies in Remote Desktop Services (RDS)

When managing a Remote Desktop Services (RDS) environment, ensuring resources are distributed fairly among users is crucial for maintaining performance and user satisfaction. To achieve this, Microsoft has introduced “Fair Share,” a feature which helps regulate the allocation of resources like CPU, disk, and network bandwidth across multiple users connected to a server. This blog aims to provide a clear understanding of Fair Share, how it works, and its implications for your RDS environment.

What is Fair Share?

Fair Share is designed to ensure that no single user can consume a disproportionate amount of system resources in an RDS environment. In multi-user environments, such as those running Remote Desktop Session Hosts (RDSH), it’s common for some users’ workloads to temporarily spike, causing performance bottlenecks that affect other users. Fair Share dynamically distributes resources like CPU, memory, disk input/output (I/O), and network bandwidth based on current demand, ensuring all users get a balanced share of the server’s capacity.

Key Resources Managed by Fair Share:
  1. CPU Fair Share: Ensures equitable distribution of CPU resources. This prevents a situation where one user monopolizes CPU cycles, leaving others with limited processing power.
  2. Disk Fair Share: Manages the disk I/O bandwidth. This is especially important for environments where multiple users generate significant amounts of I/O activity, which could otherwise overwhelm the storage system.
  3. Network Fair Share: Distributes network bandwidth among users to prevent a single user from consuming too much network capacity, ensuring smoother performance for everyone.

By allocating resources fairly, users experience more consistent and reliable performance, even when the system is under high load.

Why Fair Share Matters in RDS Environments

In RDS scenarios, multiple users simultaneously share the server’s resources, which can create unpredictable demands. For example, one user running a resource-heavy application may inadvertently affect the performance of others. Fair Share provides a safeguard against such issues, automatically adjusting the resources based on real-time usage.

Without Fair Share, managing these dynamic workloads can be challenging. Administrators would need to manually monitor and adjust resource allocation, which is not only labor-intensive but also prone to error. Fair Share streamlines this process by automatically regulating the resources, requiring minimal intervention.

How Fair Share Works

Fair Share operates dynamically, constantly monitoring resource usage across active sessions. When one or more users require a higher share of resources (for example, during peak usage), the system temporarily adjusts the allocation to maintain fairness.

CPU Fair Share:

When users log in, they initially receive an equal portion of CPU resources. If one user consumes too many CPU cycles, Fair Share will throttle their usage to ensure other users receive enough CPU power to continue working smoothly. This dynamic adjustment occurs in real-time, so there’s no delay in performance corrections.

Disk Fair Share:

Disk Fair Share works similarly to CPU Fair Share but focuses on I/O operations. Users that generate significant disk activity (such as heavy file operations or database queries) are throttled, ensuring that other users on the system can still access disk resources without experiencing delays or slowdowns.

Network Fair Share:

Network Fair Share governs how bandwidth is allocated. For example, if one user is downloading large files or streaming data, their bandwidth usage will be automatically limited, allowing others to continue using the network without congestion. This avoids the scenario where a single user can hog all the available bandwidth, improving the overall experience for everyone.

Default Behavior and Configuration

Fair Share is being enabled by default on Windows Server 2016 and later versions. This default setting provides a balanced distribution of resources without requiring configuration. However, administrators have the flexibility to adjust or disable Fair Share if needed, depending on the specific requirements of their environment.

To verify that Fair Share is enabled or to modify its settings, administrators can adjust the following Group Policy settings:

  1. CPU Fair Share: Located in Group Policy at Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections.
  2. Disk Fair Share: Found in Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Disk Fair Share.
  3. Network Fair Share: Managed via Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Network Fair Share.

Each of these policies can be enabled, disabled, or configured to adjust the threshold values for resource distribution. It’s important to assess the workload characteristics of your environment when making these adjustments to ensure optimal performance.

Best Practices for Fair Share in RDS

While Fair Share generally works well out of the box, there are scenarios where fine-tuning or even disabling it might be beneficial:

  1. Monitor Resource Usage: Use monitoring tools to assess resource consumption trends in your RDS environment. This can help identify whether Fair Share is effectively balancing the load or if certain thresholds need adjusting.
  2. Test Before Making Changes: If you plan to modify the default Fair Share settings, test them in a controlled environment first to ensure they have the desired effect.
  3. Customize Based on Workloads: Different workloads may require different configurations. For example, environments with high CPU usage might benefit from stricter CPU Fair Share policies, while those with heavy network traffic might need tighter control on network Fair Share.
  4. Consider User Impact: Always consider the potential impact on user experience when adjusting Fair Share settings. While throttling resource-hungry users, the goal is to ensure a balanced environment where everyone can work efficiently.

Fair Share in Remote Desktop Services is an essential feature for maintaining balanced performance in multi-user environments. By dynamically distributing CPU, disk, and network resources, it prevents individual users from monopolizing resources, ensuring that everyone gets a fair share of system capacity. With Fair Share enabled by default, administrators can achieve smoother performance with minimal configuration effort, though adjustments can be made to suit specific needs.

For RDS environments with fluctuating workloads, Fair Share offers a hands-off way to maintain resource equity, allowing administrators to focus on other critical tasks while ensuring a consistent experience for all users.