Citrix Virtual Apps and Desktops service

Autoscale

Autoscale is a feature exclusive to Citrix Virtual Apps and Desktops service that provides a consistent, high-performance solution to proactively power manage your machines. It aims to balance costs and user experience. Autoscale incorporates the deprecated Smart Scale technology into the Manage console’s power management solution.

Autoscale enables proactive power management of all registered single-session and multi-session OS machines in a delivery group.

Supported VDA hosting platforms

Autoscale supports all the platforms that Virtual Apps and Desktops service supports. This includes various infrastructure platforms including Citrix Hypervisor, Amazon Web Services, Google Cloud Platform, Microsoft Azure Resource Manager, VMware vSphere, and many more. For a complete list of supported platforms, see System requirements for Citrix Virtual Apps and Desktops Service.

Supported workloads

Autoscale supports both multi-session OS and single-session OS delivery groups. There are three user interfaces to be aware of:

  • Autoscale user interface for multi-session OS delivery groups (formerly RDS delivery groups)

  • Autoscale user interface for single-session OS random (pooled) delivery groups (formerly pooled VDI delivery groups)

  • Autoscale user interface for single-session OS static delivery groups (formerly static VDI delivery groups)

For more information about the user interfaces for different delivery groups, see Autoscale user interfaces.

Benefits

The Autoscale feature delivers the following benefits:

  • Provide you with a single, consistent mechanism to power manage machines in a delivery group.

  • Ensure availability and control costs by powering machines with load-based or schedule-based power management, or a combination of both.

  • To monitor metrics such as cost savings and capacity utilization, and to enable notifications, use Director, available on the Monitor tab.

Watch a 2-minute video

The following video provides a quick tour of Autoscale.

Autoscale features

Autoscale features include:

Autoscale user interfaces

There are three types of Autoscale user interfaces to be aware of.

Autoscale user interface for single-session OS static delivery groups:

Autoscale single-session OS static - general

Autoscale user interface for single-session OS random delivery groups:

Autoscale single-session OS random - general

Autoscale user interface for multi-session OS delivery groups:

Autoscale multi-session OS - general

Enable or disable Autoscale for a delivery group

Note:

In the legacy console, Autoscale is enabled by default when you create a delivery group. In the web-based console, Autoscale is disabled by default when you create a delivery group.

  1. From Manage > Full Configuration, select Delivery Groups in the left pane.

  2. Select the delivery group you want to manage and then click Manage Autoscale.

    Cloud UI

  3. On the Manage Autoscale page, select the Enable Autoscale check box to enable Autoscale. After you enable Autoscale, the options on the page are enabled.

    Cloud UI

  4. To disable Autoscale, clear the Autoscale check box. The options on the page turn gray to indicate that Autoscale is disabled for the selected delivery group.

Important:

  • If you disable Autoscale, all machines managed by Autoscale remain in the state they are in at the time of disabling.
  • After you disable Autoscale, the machines in drain state are taken out of drain state. For more information about drain state, see Drain state.

Monitoring metrics

You can monitor the following metrics of Autoscale-managed machines from the Monitor tab.

  • Machine usage

  • Estimated savings

  • Alert notifications for machines and sessions

  • Machine status

  • Load evaluation trends

For more information about the metrics, see Monitor Autoscale-managed machines.

Broker PowerShell SDK commands

You can configure Autoscale for delivery groups using the Broker PowerShell SDK. To configure Autoscale using PowerShell commands, you must use Remote PowerShell SDK version 7.21.0.12 or later. For more information about the Remote PowerShell SDK, see SDKs and APIs.

Set-BrokerDesktopGroup

Disables or enables an existing BrokerDesktopGroup or alters its settings. For more information about this cmdlet, see https://citrix.github.io/delivery-controller-sdk/Broker/Set-BrokerDesktopGroup/.

New-BrokerPowerTimeScheme

Creates a BrokerPowerTimeScheme for a delivery group. For more information about this cmdlet, see https://citrix.github.io/delivery-controller-sdk/Broker/New-BrokerPowerTimeScheme/.

Examples

See the following examples for details about how to use the PowerShell cmdlets.

Enable Autoscale

  • Suppose you want to enable Autoscale for the delivery group whose name is “MyDesktop.” Use the Set-BrokerDesktopGroup PowerShell command. For example:
    • PS C:\> Set-BrokerDesktopGroup "MyDesktop" -AutoscalingEnabled $true

Configure the capacity buffer separately for peak and off-peak times

  • Suppose you want to set the capacity buffer to 20% for peak times and 10% for off-peak times for a delivery group whose name is “MyDesktop.” Use the Set-BrokerDesktopGroup PowerShell command. For example:
    • PS C:\> Set-BrokerDesktopGroup "MyDesktop" -PeakBufferSizePercent 20 -OffPeakBufferSizePercent 10

Configure the when disconnected timeout

  • Suppose you want to set the when disconnected timeout to 60 minutes for peak times and 30 minutes for off-peak times for a delivery group whose name is “MyDesktop.” Use the Set-BrokerDesktopGroup PowerShell command. For example:
    • PS C:\> Set-BrokerDesktopGroup "MyDesktop" -PeakDisconnectTimeout 60 -OffPeakDisconnectTimeout 30

Configure the when logged off timeout

  • Suppose you want to set the when logged off timeout to 60 minutes for peak times and 30 minutes for off-peak times for a delivery group whose name is “MyDesktop.” Use the Set-BrokerDesktopGroup PowerShell command. For example:
    • PS C:\> Set-BrokerDesktopGroup "MyDesktop" -PeakLogOffTimeout 60 -OffPeakLogOffTimeout 30

Configure the power-off delay

  • Suppose you want to set the power-off delay to 15 minutes for a delivery group whose name is “MyDesktop.” Use the Set-BrokerDesktopGroup PowerShell command. For example:
    • PS C:\> Set-BrokerDesktopGroup "MyDesktop" -PowerOffDelay 15

Configure a time period during which the power-off delay does not take effect

  • Suppose you want the power-off delay to take effect until 30 minutes have elapsed for a delivery group whose name is “MyDesktop.” Use the Set-BrokerDesktopGroup PowerShell command. For example:
    • C:\PS> Set-BrokerDesktopGroup "MyDesktop" -SettlementPeriodBeforeAutoShutdown 30.

Configure the machine instance cost

  • Suppose you want to set the machine instance cost per hour to 0.2 dollars for a delivery group whose name is “MyDesktop.” Use the Set-BrokerDesktopGroup PowerShell command. For example:
    • PS C:\> Set-BrokerDesktopGroup "MyDesktop" -MachineCost 0.2

Create a power time scheme

  • Suppose you want to create a power time scheme for a delivery group whose UID value is 3. The new scheme covers weekend, Monday, and Tuesday. The 8:00 AM to 6:30 PM time slot is defined as peak times for the days included in the scheme. For peak times, the pool size (the number of machines kept powered on) is 20. For off-peak times, it is 5. You can use the Set-BrokerDesktopGroup PowerShell command. For example:
    • PS C:\> $ps48=(0..47 | %{ if ($_ -lt 16 -or $_ -gt 37) { 5 } else { 20 } } )
    • PS C:\> $pt48=(0..47 | %{ if ($_ -lt 16 -or $_ -gt 37) { $false } else { $true } } )
    • PS C:\> New-BrokerPowerTimeScheme -Name 'First Half Week' -DaysOfWeek Weekend,Monday,Tuesday -DesktopGroupUid 3 -PeakHalfHours $pt48 -PoolSize $ps48

Drain state

Autoscale always attempts to scale down the number of powered-on machines in the delivery group to the configured pool size and capacity buffer. It does so by putting the excess machines with the fewest sessions into “drain state” and powering them off when all sessions are logged off. This occurs when session demand lessens and the schedule requires fewer machines than are powered on.

Autoscale puts excess machines into “drain state” one by one. If two or more machines have the same number of active sessions, Autoscale drains the machine that has been powered on for the specified power-off delay. Doing so avoids putting recently powered-on machines into drain state because those machines are more likely to have the fewest sessions. If two or more machines have been powered on for the specified power-off delay, Autoscale drains those machines one by one at random.

Machines in drain state no longer host new session launches and are waiting for the existing sessions to be logged off. A machine becomes a candidate for shutdown only when all sessions are logged off. However, if there are no machines immediately available for session launches, Autoscale prefers directing the session launches to a machine in drain state over powering on a machine.

A machine is taken out of drain state when one of the following conditions is met:

  • The machine is powered off.
  • Autoscale is disabled for the delivery group to which the machine belongs.
  • Autoscale utilizes the machine to meet schedule or load demand requirements. This case occurs when the schedule (schedule-based scaling) or the current demand (load-based scaling) requires more machines than the number of machines that are currently powered on.

Important:

If no machines are immediately available for session launches, Autoscale prefers directing session launches to a machine in drain state over powering on a machine. A machine in drain state that hosts a session launch remains in drain state.

To find out which machines are in drain state, use the Get-BrokerMachine PowerShell command. For example: Get-BrokerMachine -DrainingUntilShutdown $true. Alternatively, you can use the Mange console. See Display machines in drain state.

Display machines in drain state

Note:

This feature is available only in the web-based console and applies only to multi-session machines.

In Manage > Full Configuration, you can display machines that are in drain state, letting you know which machines are about to shut down. Complete the following steps:

  1. Navigate to the Search node and then click Columns to Display.
  2. In the Columns to Display window, select the check box next to Drain State.
  3. Click Save to exit the Columns to Display window.

The Drain State column can display the following information:

  • Draining until shutdown. Appears when machines are in drain state until they are shut down.
  • Not draining. Appears when machines are not yet in drain state.

Drain state

Load index

Important:

Load index applies only to multi-session delivery groups.

The load index value ranges from 0 to 10,000, which is calculated using the Citrix Load Management policy settings configured for concurrent logon, session, CPU, disk, and memory use. The digit “0” indicates an unloaded machine. A machine with a load index value of 0 is at a baseline load. The digit “10,000” indicates a fully loaded machine that cannot run any more sessions. The load index metric determines how likely a machine is to receive connections. By default, a machine is considered at full load when it is hosting 250 sessions.

Good to know

Autoscale works at a delivery group level. It is configured on a per-delivery group basis. It power manages only the machines in the selected delivery group.

Capacity and machine registration

To ensure that Autoscale has an accurate view of machines that can accept session requests, Autoscale includes only machines that are registered with the site when determining the capacity for a given delivery group. Powered-on machines that are unregistered cannot accept session requests. As a result, they are not included in the overall capacity of the delivery group.

Scaling across multiple machine catalogs

In some sites, multiple machine catalogs might be associated with a single delivery group. Autoscale randomly powers on machines from each catalog to meet schedule or session demand requirements.

For example, a delivery group has two machine catalogs: Catalog A has three machines powered on and Catalog B has one machine powered on. If Autoscale needs to power on an extra machine, it might power on a machine from either Catalog A or Catalog B.

Machine provisioning and session demand

The machine catalog associated with the delivery group must have enough machines to power on and off as demand increases and decreases. If session demand exceeds the total number of registered machines in the delivery group, Autoscale ensures that all registered machines are powered on. Autoscale does not provision additional machines. To overcome this bottleneck, you can use a PowerShell script to create machines and delete them dynamically.

Availability of monitoring data

Monitoring data is available when Autoscale is enabled for the delivery group. Monitoring data remains available if Autoscale is enabled and then disabled for the delivery group. Autoscale collects monitoring data at 5-minute intervals.

Note:

When you initially enable Autoscale for a delivery group, it might take a few minutes to display monitoring data for that delivery group.

Instance size considerations

You can optimize your costs if you right size your instances in public clouds. Smaller instances host fewer user sessions than larger instances. Therefore, in the case of smaller instances, Autoscale puts machines into drain state much faster because it takes less time for the last user session to be logged off. As a result, Autoscale powers off smaller instances sooner, thereby reducing costs. We recommend that you provision smaller instances as long as they match your workload performance and capacity requirements.

More information

For more information on Autoscale, see Citrix Autoscale in Tech Zone.