Product Documentation

Understanding Power and Capacity Management

Oct 09, 2015

For XenApp Power and Capacity Management, capacity is expressed as a number of sessions (or session count).

The XenApp servers being managed by Power and Capacity Management are called a farm. This farm may include some or all of the servers in a XenApp farm, or it may contain XenApp servers from different XenApp farms (for example, in a XenApp farm that covers multiple sites, you might have a Power and Capacity Management farm for the XenApp servers in each site). The Power and Capacity Management farm name is distinct from the XenApp farm name.

You define a workload, which is a logical grouping of servers that all host the same application or set of applications. (In XenApp terms, this is referred to as an application silo.) You use setpoints to control how servers are power managed and how load is consolidated within the workload.


Use Power and Capacity Management to observe and record utilization and capacity levels. Console monitoring and report generation provide valuable information, regardless of whether or not you enable power management and load consolidation.

Power and Capacity Management System Components

This illustration shows the major components of XenApp Power and Capacity Management: concentrator, agent, database, reporting, and management console.
The concentrator is a Windows service and the central component of the Power and Capacity Management system. The concentrator coordinates system states and operations for the managed XenApp servers. You can have one or two concentrators; if you have two and one fails, the other assumes control.
The database component is an instance of a Microsoft SQL Server database. It provides the common store for information such as managed server inventory, workload assignments, schedules, metric data, and configuration settings.
Power and Capacity Management reports are hosted on Microsoft SQL Server Reporting Services. The administrator generates reports for historical system loads, capacities, and utilization summaries.
Management Console
The management console is a Microsoft Managed Console (MMC) snap-in you use to manage, monitor, and configure the Power and Capacity Management system.
The agent is a Windows service installed on each XenApp server. The agent reports capacity and system states, and acts on operations and commands issued by the concentrator.

The concentrator, database, reporting, and management console components are referred to as administration components.


A setpoint defines either a target capacity level (number of sessions) or a target number of online servers. You specify setpoints for each workload. Power and Capacity Management uses four setpoints.
  • The power controller, which powers servers on and off, uses all four setpoints.
  • The load consolidator, which controls the load on online servers by enabling and disabling logons, uses only the minimum available servers setpoint. The load consolidator also uses a secondary optimal load value, which specifies how close to capacity a server can get before additional load should be directed to other servers.

Setpoint Descriptions

Online session reserve
The online session reserve setpoint specifies the amount of online but unused capacity that must be maintained above the current load. As the load ebbs and flows throughout the day, the system maintains this buffer; this is termed a load following model.
In practice, the Power and Capacity Management powers on the smallest number of servers that can hold the target online capacity.
Minimum session capacity and maximum session capacity
The minimum and maximum session capacity setpoints work as guards for the online session reserve. The online session reserve setpoint can raise and lower the online capacity, as long as it remains between the two guards.
  • The minimum session capacity setpoint causes servers to be powered up until the system has at least the amount of online capacity to meet or exceed the setpoint. After this setpoint is met or exceeded, the minimum session capacity has no effect; if the online session reserve setpoint drives online capacity above the minimum session capacity setpoint value, Power and Capacity Management ignores the minimum session capacity setpoint.
  • The maximum session capacity setpoint functions similarly to minimum session capacity; however, it causes servers to be powered off until the online capacity is at or below the setpoint. Although the maximum session capacity setpoint is used less frequently, it can be helpful when preparing for system maintenance. After online capacity is below the setpoint value, this setpoint has no effect.
Minimum available servers
The minimum available servers setpoint works on a per-server basis (the other three setpoints are capacity based). Use this setpoint to ensure a minimum level of service availability, in terms of servers. This can be helpful in handling:
  • Redundancy: Multiple servers ensure acceptance of new sessions if a server crashes.
  • Logon rates: Logging on new sessions can quickly increase server load to the point where existing sessions are degraded or new logons take significantly longer to complete. In such cases, using this setpoint can ensure you have a sufficient number of servers online to load balance the logon load.
The power controller attempts to keep this many servers online, while the load consolidator attempts to keep this number of servers available to accept new sessions. You usually increase this setpoint just before and throughout the morning rush to ensure sufficient available servers for the high rate of incoming sessions. If you do not increase this setpoint for the morning rush, the capacity setpoints may ensure there are enough servers online to host the expected load, but the load consolidator may keep too many servers disabled. Therefore, the servers that are enabled may become overloaded while new sessions are logging on.

Default Setpoints

A new workload has default setpoint values that place the workload in the most available configuration – all managed servers are online. Thus, a newly discovered workload cannot be power controlled until you define appropriate setpoints for it (and enable power management).
Setpoint Default
Online session reserve Infinite; all servers are kept online. The management console displays this value as an infinity symbol.
Minimum session capacity Zero, which is equivalent to unset.
Maximum session capacity infinite, which is equivalent to unset; the management console displays this value as an infinity symbol.
Minimum available servers Zero, which is equivalent to unset.

You specify setpoints in a workload schedule. Set the secondary optimal load value in global configuration settings.

Setpoint Priorities

The system attempts to meet the online session reserve setpoint first. It then bounds the output using the minimum and maximum session capacity setpoints. Finally, the system checks and ensures that the resulting number of online servers meets the minimum available servers setpoint.

Therefore, setpoints have the following order of importance, from highest to lowest:
  • Minimum available servers
  • Maximum session capacity
  • Minimum session capacity
  • Online session reserve

Power and Capacity Management Schedules

A schedule usually specifies the online session reserve and the minimum available servers setpoints.

For example, you have a deployment of 10 servers. Each server has a configured session capacity of 100, and peak session use occurs at 9:30 a.m.
  • To effectively handle demand, schedule the system to ramp up at 9:00 a.m. by setting the minimum available servers to 5, and the online session reserve to 300.
  • After peak use (9:30 a.m.), schedule the setpoints to lower values at 10:30 a.m., with minimum available servers set to 2 and the online session reserve set to 100.
  • After normal working hours, reduce these setpoint values further at 7:00 p.m., with minimum available servers set to 1 and the online session reserve set to 50.

After you initially set the online session reserve and minimum available servers setpoint values with scheduled changes throughout the day, observe server and session activity, and then fine-tune the schedule and setpoint values to optimize server capacity and use.

Manual Overrides

After you enable a workload for power management, you can manually override the schedule with different setpoint values.

For example, a manual override can be useful when there is an unexpected surge in demand on the XenApp workload that is likely to continue for a few hours. Instead of changing the schedule, you can initiate an override. When the surge has subsided and the normal conditions have returned, you can cancel the override, and the scheduled setpoint values are reapplied.

Using a manual override can be helpful when the schedule requires attention or maintenance.

Manual override differs from disabling power management. During a manual override, power management is still active, but the setpoints are controlled by the administrator instead of the schedule. Disabling power management for a workload is equivalent to turning off the Power and Capacity Management feature for that workload.

Server Profiles

Within a workload, servers are grouped by profiles. A server profile comprises information the agent discovers and information you configure.
  • The agent discovers hardware information such as the CPU type and the amount of memory, and sends it to the concentrator. The concentrator creates a profile entry in the database for a new profile (or, if the profile values are the same as those in an existing profile, the existing profile is reused).
  • Using the management console, you configure two server profile values that Power and Capacity Management uses (with other criteria) to measure server capacity:
    • Typical session capacity - specifies the number of XenApp sessions (on average) that server can host
    • Estimated session capacity limit - allows the dynamic session capacity feature to estimate capacity higher than the typical session capacity value when it detects spare computing resources

    In a server profile, you can also specify a power action timeout value, which is used when a power off or power on control is issued. If the operation does not complete successfully before the timer expires, Power and Capacity Management assumes the operation failed.

If the hardware configuration changes (for example, more RAM is added to a server), Power and Capacity Management creates a new profile. (The original profile is not altered, because other servers may still be using it. Also, when a hardware change occurs, server capacity can change.)

As new servers connect and report their profiles, they inherit any existing configured capacity value if they have the same profile as an existing configured server.

Server Control Mode

The control mode affects whether the server is eligible for power management or participating in load consolidation.

The server is not controlled by the Power and Capacity Management system, and is ignored by the workload to which it belongs. It does not contribute to the capacity of the workload. To quickly remove a server from the scope of system control without affecting the rest of the workload, setting this mode is the quickest and easiest way.
Managed (base load)
The server contributes to the capacity of the workload and meeting its current setpoints; however, it is not controlled. The power management controller does not power this server off or on, and the load consolidation controller does not disable this server in order to force load onto other servers.
Some XenApp servers that provide essential services should not be taken offline, such as the data collector or the server hosting the XenApp data store. Designate these servers as managed (base load). If power management has a target of keeping a certain number of servers online, the online managed (base load) servers contribute to meeting that target. Similarly, if load consolidation keeps two servers available, and there are two available base load servers, they can be used to meet the load consolidation need.
The server is fully controlled by the Power and Capacity Management system and can be powered on or off by the power management controller. While online, the load consolidation controller may enable or disable new sessions being placed on this server, in order to force sessions onto other servers.
When planning,
  • Identity which XenApp servers host critical services and do not host XenApp sessions. Set the server control mode for these servers to unmanaged (or do not install a Power and Capacity Management agent on them).
  • Identity which XenApp servers host critical services and host XenApp session. Set the server control mode for these servers to managed (base load).

Set the server control mode for existing servers in server properties, and for new servers in global configuration settings.

Concentrator Operations

You can install a Power and Capacity Management concentrator on two servers. This concentrator cluster has a master-slave relationship; one concentrator is the master and the other is a slave. All connections from agents on the XenApp servers go to the current master concentrator; there is no load balancing among multiple concentrators.

Important: Multiple concentrators share a common database. Implement effective SQL Server database clustering and redundancy management.

Concentrators negotiate for mastership and monitor the health of the current master via the database. If the current master stops updating the database, the slave concentrator becomes the master. Failover usually occurs within 60 seconds.

You can explicitly force a running slave concentrator to become the master concentrator. This may be necessary when a master concentrator has planned maintenance.

Each concentrator registers an Active Directory Service Connection Point (SCP) under the machine account where the concentrator is installed and records an entry in the database. When the agent on the XenApp server starts, it queries the SCP to discover all known concentrators. Each agent then tries to connect to each concentrator, looking for the master. The management console also performs the same discovery process and connection attempts.

To change the port the agent uses to communicate with the concentrator (the default port is 11168), edit the PCMConcentrator.exe.config file in the Install directory, then restart the PCM Concentrator service.

Virtual Machine Management

Power and Capacity Management uses virtual machine management to automatically locate virtual machines it manages; therefore, you do not need to manually configure associations between the virtual machines and their managing XenServer hosts.

Virtual machine management supports multiple concurrent XenServer resource pools. The concentrator automatically connects to the XenServer resource pool, and periodically queries the inventory of virtual machines. The management console displays the inventory poll results as a count of the number of virtual machines. The concentrator continually updates the results.

If you move a virtual machine image from one XenServer resource pool to another, Power and Capacity Management learns about this during its inventory polling.

Note: The list of discovered virtual machines does not necessarily match the servers being managed by Power and Capacity Management; each machine manager maintains a list of all virtual machines discovered.
When the concentrator selects a server to power on, it asks all virtual machine managers if they have the virtual machine with that server image.
  • If a match is found, the machine manager issues the appropriate XenAPI commands to the resource pool to start a virtual machine.
  • If no virtual machine is found (because its machine manager has not been configured or connected, or because the server image is hosted on a physical machine), Power and Capacity Management broadcasts the Wake-on-LAN packet on the network. Then, the concentrator waits a prescribed interval (power control timeout) for the Power and Capacity Management agent on the appropriate XenApp server to establish connection to the concentrator.

Dynamic Capacity Estimation

Dynamic Capacity Estimation calculates individual server capacities based on the load on each server. This enables the capacity of each server to more accurately reflect the actual number of sessions it is capable of handling.

The load on each server is determined by its assigned XenApp load evaluator. The assigned evaluator(s) should therefore be configured so that the desired load criteria are taken into account. The Power and Capacity Management agent regularly monitors the load and updates the estimated capacity on its server accordingly.

Depending on the load, the estimation may determine that a server is capable of holding more sessions than the configured typical capacity. To allow the dynamic capacity estimation to set capacities higher than the typical value, you can set the estimated capacity limit to any value higher than the typical capacity.

What Happens During Power Management Operations

When Power and Capacity Management determines a power on or power off operation is required, it considers a server's power controller preference (and site preference, for XenApp servers installed on XenServer virtual machines). For a power on operation, the selection algorithm chooses a server with a higher power controller preference before a server with a lower preference. For a power off operation, the algorithm chooses a server with a lower power controller preference before a server with a higher preference. Configure power controller preference in server properties. For best practice, specify the preference of more power-efficient servers higher than older, less power-efficient servers.

When Power and Capacity Management selects a XenApp server for power off and that server is currently hosting sessions, the server is placed into drain mode. While in drain mode, a server does not accept new sessions, but allows reconnection of disconnected sessions. (In meeting capacity setpoints, Power and Capacity Management ignores the load from servers that are currently draining or powering off, as well as servers currently being evaluated for draining/power off.) A server in drain mode powers off only when no sessions remain. If the agent loses connection to the concentrator, the agent reverts drain mode on draining servers and reenables logons.

When Power and Capacity Management issues a power off or power on control, a timer starts (set the value of this timer in the server profile). If the operation does not complete successfully before the timer expires, Power and Capacity Management reports the operation failed. The management console displays power control operation failures. When a power control operation completes successfully, all control errors associated with that server are cleared.

You can enable or disable power management on a global and per-workload basis. The global setting overrides the per-workload setting. When you disable power management for a workload, any servers currently in drain mode are reverted out of drain mode.

What Happens During Load Consolidation

Load consolidation has the opposite effect to traditional XenApp load balancing. It aims to consolidate sessions onto fewer servers instead of spreading load evenly across many servers. By consolidating sessions, there is greater opportunity to power down excess servers, saving power and reducing running costs. Greater consolidation of sessions equates to higher levels of utilization per server while online.

Load consolidation works by continually monitoring the number of active sessions and remaining capacity for each server. It aims to load up small groups of servers with new sessions to a level that the servers are comfortable with handling. In Power and Capacity Management, this level is called the optimal load. Once a server reaches optimal load, load consolidation will enable an additional server in the workload to accept new session load. When used in conjunction with Power Management, this additional server will be powered on automatically if it is currently powered off.

The optimal load is a configurable value expressed as a percentage, with a default value of 70%. That is to say, load consolidation will add sessions to a server until it reaches or exceeds 70% of full server capacity. The remaining 30% of capacity acts as a buffer to ensure existing sessions on the server have spare computing resources to work with. You can tune the optimal load threshold to find the right balance between performance and utilization.

For load consolidation to work effectively, the capacity level of each server needs to be measured. Because the remaining capacity can change as load on the server fluctuates, capacity levels need to be continually re-evaluated. This is the role of dynamic capacity estimation.