The CPU optimization functionality allows you to optimize CPU load balancing according to your requirements. When configured, the CPU load balancer will lower the priority of a process when its CPU usage exceeds a specified value for a specified number of seconds. The load balancer will revert the priority to its original level when the process has been running below a certain percentage for a certain number of seconds.
To configure CPU optimization, select the Enable CPU Optimization option and then specify the values as described below.
Specifies when the CPU optimization should be activated. The Total CPU usage exceeds field specifies the system wide CPU usage in percent.
Specifies thresholds per process when a specific process exceeds or falls below the specified CPU percentage. Here you can specify Critical and Idle values. The CPU load balancer will adjust other priorities with respect to these values.
Please note that CPU usage values are attenuated and calculated based on the agent refresh time configured on the Load Balancing tab.
Use the Exclusions list to specify processes that should be excluded from CPU optimization. Click Tasks > Add to select a process. To remove a process from the list, select it and click Tasks > Delete.
Irregular values for critical/idle may cause issues (processes set to idle due to incorrect configuration). If there are issues with getting the CPU usage counter, optimizations cannot be applied.
Log files can be found in %ProgramData%\Parallels\RASLogs\cpuloadbalancer.log. Use the log to confirm thresholds. You can check the CPU usage performance counter on Windows.
Note: Since the critical/idle thresholds are calculated based on the highest process CPU usage (not the absolute CPU usage), this value is not reflected in the logs when changing priorities. Absolute CPU usage equals to total CPU usage. For example, if there are 2 processes taking 30% each, the total CPU usage is 60%. The usage threshold when CPU load balancer kicks in is 25% (default). The highest process CPU usage is the CPU usage of the process taking the most CPU. For example, if you have three processes, two taking 10% and the third taking 40%, the highest CPU usage is 40%.
Load Balancer in Parallels RAS is designed to balance RD Session Host connections from Parallels Clients.
The following types of load balancing are available:
Resource based. Distributes sessions to servers depending on how busy the servers are. A new incoming session is always redirected to the least busy server.
Round robin. Redirects sessions in sequential order. For example, let's say there are two RD Session Hosts in the Farm. The first session is redirected to server 1, the second session is redirected to server 2, and the third session is redirected to server 1 again.
Both methods are explained in this and the following subsections. Load Balancing options can be configured from the Load Balancing category in the RAS Console.
Load balancing is enabled by default when more than one server is available in a Site. The resource based load balancing is the default method. Load balancing method can be selected from the Method drop-down list.
Resource-based load balancing uses the following counters to determine if a given server is busier than other servers and vice versa:
User sessions: Redirect users to a server with the least number of sessions.
Memory: Redirect users to the server with the best free/used RAM ratio.
CPU: Redirect users to the server with the best free/used CPU time ratio.
When all of the counters are enabled, the Load Balancer adds the counter ratios together and redirects the session to the server with the most favorable combined ratio.
To remove a counter from the equation, clear the checkbox next to the counter name in the Counters section.
Reconnect to disconnected sessions: Enable this option to redirect incoming user sessions to a previously disconnected session owned by the same user.
Reconnect sessions using client’s IP address only: When reconnecting to a disconnected session, the Parallels RAS will match the username requesting reconnection with the username of the disconnected session to match the sessions. With this option enabled, Parallels RAS will determine to which disconnected session to reconnect the session by matching the source IP address.
Limit each user to one session per desktop: Enable this option to ensure that the same user does not open multiple sessions. Please note that for this option to work, your session host must also be configured to restrict each user to a single session. In Windows Server 2012(R2), it's the "Restrict Remote Desktop Services users to a single Remote Desktop Services session" option in Local Group Policy \ Remote Desktop Services \ Remote Desktop Session Host \ Connections.
Disable Microsoft RD Connection Broker: If this option is enabled, the Microsoft RD Connection Broker will not interfere with the RAS brokering done by the RAS Connection Broker if it is installed. Please note that this option will only work with Windows Server 2012 and above.
You can also change the default timeout and refresh time for RAS agents running on the servers. If you believe that it takes too long to wait for an agent to respond or if the timeout is not long enough, you can specify your own values.
To change default timeouts:
Click the Configure button.
In the dialog that opens, specify the time period in seconds in the Declare agent dead if not responding for field. If the agent is not responding within this time period, the server is excluded from the load balancer.
In the Agent Refresh Time field, specify the number of seconds needed to check if the agent is reachable.