Manage Resource Usage with VMware Horizon Application Pools
VMware Horizon is known for its virtual desktop infrastructure, which offers Windows desktops to end users on many types of devices. However, there is another component: Remote Desktop Session Hosts also provide a single point of maintenance, a single installation process, and easier configuration workflows.
With an RDS host, end users access a desktop as a session and launch individual applications from any device. The screen output is on the user’s device, but the executable runs on the RDS host. With an RDS host, each user can have their own virtual machine without increasing the work of the virtualization administrator.
How to deploy RDS hosts
RDS host deployments are called cultivate. The server farm is a collection of Windows servers with the RDS role installed. Each collection should have the same configurations and applications, and an automated pool of instant-clone RDS hosts that share a common master image. Running clones on one machine guarantees that they will all be identical. Clones should also deploy with the same CPU quantity and RAM resources. If a host is equipped with more capacity, it creates an imbalance in session placement. If hosts are created equally, clones can, by default, support the same number of users.
After IT administrators create a server farm, they must configure load balancing settings because these are not preconfigured in Horizon. This does not mean that sessions are not balanced across hosts. This means that the server load is not taken into account.
Figure 1 shows the default load balancing settings for a server farm. The checkbox Include number of sessions is enabled by default.
To place new sessions on hosts, first look at the number of sessions already connected. Disconnected sessions count because those users will reconnect. Over time, the same number of users will connect to each host. For homogeneous environments, this may be a sufficient placement method. If all sessions consume the same amount of CPU and memory resources, the user experience will be the same for all. It might not meet expected or required levels of performance, but at least the uniformity gives an equal experience. But if all hosts are created with enough resources, performance should be fine for all users.
Load Balance Configured Hosts
With the default values configured, the monitoring dashboard output shows a load index of -1 for each host, as shown in Figure 2, representing a farm of nine hosts. the -1 indicates that no load balancing settings are configured.
If loads seem different on all hosts and user experiences vary depending on which host they are connected to, reconfigure the load balancer thresholds. This can be done in the farm settings. Figure 3 shows the same settings page as in Figure 1, with the recommended thresholds configured. The checkbox for the number of sessions is always enabled because if no selection is made based on resource usage, the selection is based on the number of sessions.
VMware configures the CPU and memory utilization thresholds with the recommended value of 90%. Any value greater than 0 activates the count of these resources to calculate the placement of new sessions. The software default load sampling interval is every 30 seconds. Resource usage may increase, sometimes suddenly. This could be a problem because the algorithm that chooses a host bases its decision on older information.
The new threshold – added in Version 8.4.0 (2111) — prevent adding excessive sessions to a host. This is the login session threshold. The recommended value is 20: if there are pending sessions for the host placement, hosts cannot support more than 20 sessions.
Choose a number here that is appropriate for the number of hosts and user sessions. In a larger environment with more than 10 hosts, a lower number will work. With fewer hosts, 20 or more might be better.
In this example, thresholds are not enabled for storage disk queue length and latency. There are no recommended values for the thresholds, and there are only realistic options if the applications are Storage I/O intensivebut most applications hosted on RDS consume the most CPU and memory.
After IT administrators enable load balancing settings, the load index is generated every 30 seconds. This is listed on the Horizon Administrator console dashboard. Figure 4 shows the same nine hosts as before, but with generated loads and configured load balancing thresholds. All hosts generate a load index between 0 and 100. Two hosts have a load index of 97. In this situation, no new sessions will be connected to the hosts.
Version 8.4.0 (2111) added the load index threshold setting. This setting allows administrators to configure the load index value that will stop placing new sessions on hosts. For example, if the setting is set to 90, all hosts will have a load index of 90 or greater, so no new sessions will be placed on any host in the farm.
Previous user sessions that were disconnected from the Horizon display protocol remain connected to the Windows session and will reconnect to the same server, even if new sessions are not permitted on the host. If a disconnected user’s applications and files are still open, they must connect to this environment.
Users are not limited to the thresholds created by Horizon to calculate the load index. The first checkbox on the settings page allows users to create a custom script. To create a script on each RDS host, enable the VMware Horizon Scripting Host service and save your script, which the Scripting Host service will run. VMware View Agent provides sample scripts in the installation directory on each RDS host. The script created should generate the load index based on an IT team’s own formulas.