Product Documentation

Using Preferential Load Balancing

Oct 09, 2015

Preferential Load Balancing assigns importance levels (Low, Normal, or High) to specific users and applications. For example, doctors and nurses in a hospital are specified as important users and MRI scans and X-rays are specified as important applications. These important users and applications with higher levels of service connect to their sessions more quickly and have more computing resources available to them. By default, a Normal level of service is assigned to all users and applications.

Preferential Load Balancing calculates importance levels based on the Resource Allotment for each session. The Resource Allotment is determined by the importance levels of both the session and the published application that the session is running.

To enable Preferential Load Balancing, configure the CPU management server level policy setting and select Preferential Load Balancing.

Continue by configuring the Session importance setting. Sessions with higher importance levels are directed to servers with lower resource allotments.

Finally, set the application importance level when publishing the application. You can modify an application's importance level in the Limits section of the application properties.

Resource Allotment

Resource Allotment is calculated based on the published application importance level and the result of the XenApp policy engine for that session. The policy engine bases the session result on the session importance policy setting.

A session’s Resource Allotment determines the level of service it experiences in comparison with other sessions on the same XenApp server, as well as sessions on other XenApp servers. The higher a session’s Resource Allotment, the higher service it receives compared with those other sessions.

The figure illustrates a XenApp farm running sessions with different Resource Allotments. It illustrates how a session’s Resource Allotment affects its competition with other sessions on the same server and on different servers. Session 1 on Server 2 has a relatively high Resource Allotment compared with all other sessions in the farm. As a result Session 1 gets the highest percentage of CPU cycles (90%) of any session running in the farm, and at the same time has to compete with fewer sessions on that server (there are only two sessions on Server 2, as opposed to three). Any new session would be assigned to Server 1 because it has the lowest Resource Allotment of the three servers.

The session with the highest Resource Allotment gets the highest percentage of CPU cycles of any sessions running in the farm.


The three application importance settings have Resource Allotment values associated with them, as do the three session importance policy settings. To determine the effective Resource Allotment associated with a session running the published application, multiply the application importance value by the session importance policy value. The most powerful session is one with a high importance policy setting (3) running a high importance application (3), with a total Resource Allotment of 9 (3x3). Conversely, the least powerful session is one with a low importance policy setting (1) running a low importance application (1), with a total Resource Allotment of 1 (1x1).

Use this table to help determine how to set your importance levels for applications and sessions.

Resource Allotments based on importance levels
Application Importance Session Importance (from policy) Session Resource Allotment
Low (1) Low (1) 1
Low (1) Normal (2) 2
Low (1) High (3) 3
Normal (2) Low (1) 2
Normal (2) Normal (2) 4
Normal (2) High (3) 6
High (3) Low (1) 3
High (3) Normal (2) 6
High (3) High (3) 9

Multiple Published Applications in the Same Session

Session sharing allows multiple published applications to run in the same session. During session sharing, the Resource Allotment is calculated based on the maximum application importance level setting of all the published applications running in the session multiplied by the session importance policy setting.

When an application is launched in an existing session, the importance level of the new application is compared with the maximum of all current application importance levels. If the importance level of the new application is greater, the session’s Resource Allotment is recalculated and the session’s CPU entitlement adjusted upwards. Similarly, when an application is closed, if the maximum importance level of the remaining applications is lower, the session’s Resource Allotment is recalculated and the session’s CPU entitlement adjusted downward.