Configure Workload Balancing behavior 编辑
After connecting to the Workload Balancing virtual appliance, you can edit the settings Workload Balancing uses to calculate placement and recommendations. Workload Balancing settings apply collectively to all VMs and servers in the pool.
Placement and optimization settings that you can modify include the following:
- Changing the placement strategy
- Configuring automatic optimizations and power management
- Editing performance thresholds and metric weightings
- Excluding servers.
Provided the network and disk thresholds align with the hardware in your environment, consider using most of the defaults in Workload Balancing initially. After Workload Balancing is enabled for a while, we recommend evaluating your performance thresholds and determining whether to edit them. For example, consider the following cases:
Getting recommendations when they are not yet required. If so, try adjusting the thresholds until Workload Balancing begins providing suitable recommendations.
Not getting recommendations when you expect to receive them. For example, if your network has insufficient bandwidth and you do not receive recommendations, you might have to tweak your settings. If so, try lowering the network critical thresholds until Workload Balancing begins providing recommendations.
Before you edit your thresholds, you can generate a Pool Health report and the Pool Health History report for each physical server in the pool. For more information, see Generate workload reports.
Notes:
- Workload Balancing is available for Citrix Hypervisor Premium Edition customers or those customers who have access to Citrix Hypervisor through their Citrix Virtual Apps and Desktops entitlement or Citrix DaaS entitlement. For more information about Citrix Hypervisor licensing, see Licensing. To upgrade, or to buy a Citrix Hypervisor license, visit the Citrix website.
- The latest Workload Balancing is compatible with and Citrix Hypervisor 8 Cloud.
This article assumes that you already connected your pool to a Workload Balancing virtual appliance. For information about downloading, importing, configuring, and comnecting to a Workload Balancing virtual appliance, see Get started.
Adjust the optimization mode
Workload Balancing makes recommendations to rebalance, or optimize, the VM workload in your environment based on a strategy for placement you select. The placement strategy is known as the optimization mode.
You can choose from the following optimization modes:
Maximize Performance (default)
Workload Balancing attempts to spread workload evenly across all physical servers in a resource pool. The goal is to minimize CPU, memory, and network pressure for all servers. When Maximize Performance is your placement strategy, Workload Balancing recommends optimization when a server reaches the High threshold.
Maximize Density
Workload Balancing attempts to minimize the number of physical servers that must be online by consolidating the active VMs.
When you select Maximize Density as your placement strategy, you can specify parameters similar to the ones in Maximize Performance. However, Workload Balancing uses these parameters to determine how it can pack VMs onto a server. If Maximize Density is your placement strategy, Workload Balancing recommends consolidation optimizations when a VM reaches the Low threshold.
Workload Balancing also lets you apply these optimization modes always, fixed, or switch between modes for specified time periods, scheduled:
Fixed optimization modes
Fixed optimization modes set Workload Balancing to have a specific optimization behavior always. This behavior can be either to try to create the best performance or to create the highest density.
To set a fixed optimization mode, complete the following steps:
In Citrix Hypervisor Center, select your pool.
In the Properties pane of the pool, click the WLB tab.
In the WLB tab, click Settings.
In the left pane, click Optimization Mode.
In the Fixed section of the Optimization Mode page, select one of these optimization modes:
Maximize Performance (default). Attempts to spread workload evenly across all physical servers in a resource pool. The goal is to minimize CPU, memory, and network pressure for all servers.
Maximize Density. Attempts to fit as many VMs as possible onto a physical server. The goal is to minimize the number of physical servers that must be online.
Scheduled optimization modes
Scheduled optimization modes let you schedule for Workload Balancing to apply different optimization modes depending on the time of day. For example, you might want to configure Workload Balancing to optimize for performance during the day when you have users connected. To save energy, you can then specify for Workload Balancing to optimize for Maximum Density at night.
When you configure scheduled optimization modes, Workload Balancing automatically changes to the optimization mode at the beginning of the time period you specified. You can configure Everyday, Weekdays, Weekends, or individual days. For the hour, you select a time of day.
To set a schedule for your optimization modes, complete the following steps:
In Citrix Hypervisor Center, select your pool.
In the Properties pane of the pool, click the WLB tab.
In the WLB tab, click Settings.
In the left pane, click Optimization Mode.
In the Optimization Mode pane, select Scheduled. The Scheduled section becomes available.
Click Add New.
In the Change to box, select one of the following modes:
Maximize Performance. Attempts to spread workload evenly across all physical servers in a resource pool. The goal is to minimize CPU, memory, and network pressure for all servers.
Maximize Density. Attempts to fit as many VMs as possible onto a physical server. The goal is to minimize the number of physical servers that must be online.
Select the day of the week and the time when you want Workload Balancing to begin operating in this mode.
Repeat the preceding steps to create more scheduled mode tasks until you have the number you need. If you only schedule one task, Workload Balancing switches to that mode as scheduled, but then it never switches back.
Click OK.
To change your schedule settings, complete the following steps.
In Citrix Hypervisor Center, select your pool.
In the Properties pane of the pool, click the WLB tab.
In the WLB tab, click Settings.
In the left pane, click Optimization Mode.
Select the task you want to delete or disable from the Scheduled Mode Changes list.
Do one of the following:
Delete the task permanently: Click the Delete button.
Stop the task from running temporarily: Right-click the task and click Disable.
Tips:
- You can also disable or enable tasks by selecting the task, clicking Edit, and selecting the Enable Task check box in the Optimization Mode Scheduler dialog.
- To re-enable a task, right-click the task in the Scheduled Mode Changes list and click Enable.
Edit the task: Double-click the task you want to edit. In the Change to box, select a different mode or make other changes as desired.
Note:
Clicking Cancel, before clicking OK, undoes any changes you made in the Optimization tab, including deleting a task.
Optimize and manage power automatically
You can configure Workload Balancing to apply recommendations automatically and turn servers on or off automatically. To power down servers automatically (for example, during low-usage periods), you must configure Workload Balancing to apply recommendations automatically and enable power management. Both power management and automation are described in the sections that follow.
Apply recommendations automatically
Workload Balancing lets you configure for it to apply recommendations on your behalf and perform the optimization actions it recommends automatically. You can use this feature, which is known as automatic optimization acceptance, to apply any recommendations automatically, including ones to improve performance or power down servers. However, to power down servers as VMs usage drops, you must configure automation, power management, and Maximum Density mode.
By default, Workload Balancing does not apply recommendations automatically. If you want Workload Balancing to apply recommendations automatically, enable automation. If you do not, you must apply recommendations manually by clicking Apply Recommendations.
Workload Balancing does not automatically apply recommendations to servers or VMs when the recommendations conflict with HA settings. If a pool becomes overcommitted by applying Workload Balancing optimization recommendations, Citrix Hypervisor Center prompts you whether you want to continue applying the recommendation. When automation is enabled, Workload Balancing does not apply any power-management recommendations that exceed the number of server failures to tolerate in the HA plan.
When Workload Balancing is running with the automation feature enabled, this behavior is sometimes called running in automated mode.
It is possible to tune how Workload Balancing applies recommendations in automated mode. For information, see Set conservative or aggressive automated recommendations.
To apply optimization recommendations automatically
In Citrix Hypervisor Center, select your pool.
In the Properties pane of the pool, click the WLB tab.
In the WLB tab, click Settings.
In the left pane, click Automation.
Select one or more of the following check boxes:
Automatically apply Optimization recommendations. When you select this option, you do not need to accept optimization recommendations manually. Workload Balancing automatically accepts optimization and placement recommendations it makes.
Automatically apply Power Management recommendations. The behavior of this option varies according to the optimization mode of the pool:
Maximum Performance mode: When Automatically apply Power Management recommendations is enabled, Workload Balancing automatically powers on servers when doing so improves server performance.
Maximum Density mode: When Automatically apply Power Management recommendations is enabled, Workload Balancing automatically powers off servers when resource utilization drops below the Low threshold. That is, Workload Balancing powers off servers automatically during low usage periods.
(Optional.) Fine-tune optimization recommendations by clicking Advanced in the left pane of the Settings dialog and doing one or more of the following actions:
Specifying the number of times Workload Balancing must make an optimization recommendation before the recommendation is applied automatically. The default is three times, which means the recommendation is applied on the third time it is made.
Selecting the lowest level of optimization recommendation that you want Workload Balancing to apply automatically. The default is High.
Changing the aggressiveness with which Workload Balancing applies its optimization recommendations.
You might also want to specify the number of minutes Workload Balancing has to wait before applying an optimization recommendation to a recently moved VM.
All of these settings are explained in more depth in Set conservative or aggressive automated recommendations.
(optional) If you want to configure power management, click Automation/Power Management
In the Power Management section, select the servers that you want Workload Balancing to recommend powering on and off.
Note:
Selecting servers for power management recommendations without selecting Automatically apply Power Management recommendations causes Workload Balancing to suggest power-management recommendations but not apply them automatically for you.
If none of the servers in the resource pool support remote power management, Workload Balancing displays the message, “No hosts support Power Management.”
Click OK.
To finish configuring automation, click OK.
Enable Workload Balancing power management
The term power management means the ability to the turn the power on or off for physical servers. In a Workload Balancing context, this term means powering servers in a pool on or off based on the total workload of the pool.
Configuring Workload Balancing power management on a server requires that:
The hardware for the server has remote power on/off capabilities
The Host Power On feature is configured for the server
The server has been explicitly selected as a server to participate in Workload Balancing power management
In addition, if you want Workload Balancing to power off servers automatically, configure Workload Balancing to do the following actions:
Apply recommendations automatically
Apply power management recommendations automatically
When a server is set to participate in power management, Workload Balancing makes power-on and power-off recommendations as needed.
If you run in Maximum Density mode:
- When Workload Balancing detects unused resources in a pool, it recommends powering off servers until it eliminates all excess capacity.
- If there isn’t enough server capacity in the pool to shut down servers, Workload Balancing recommends leaving the servers on until the pool workload decreases enough.
- When you configure Workload Balancing to power off extra servers automatically, it applies these recommendations automatically and, so, behaves in the same way.
If you run in Maximum Performance mode:
- If you configure Workload Balancing to power on servers automatically, Workload Balancing powers on servers when resource utilization on a server exceeds the High threshold.
- Workload Balancing never powers off servers after it has powered them on.
If you turn on the option to apply power management recommendations automatically, you do so at the pool level. However, you can specify which servers from the pool you want to participate in power management.
Understand power management behavior
Before Workload Balancing recommends powering servers on or off, it selects the servers to transfer VMs to. It does so in the following order:
- Filling the pool coordinator since it is the server that cannot be powered off.
- Filling the server with the most VMs.
- Filling subsequent servers according to which servers have the most VMs running.
When Workload Balancing fills the pool coordinator, it does so assuming artificially low thresholds for the pool coordinator. Workload Balancing uses these low thresholds as a buffer to prevent the pool coordinator from being overloaded.
Workload Balancing fills servers in this order to encourage density.
When Workload Balancing detects a performance issue while the pool is in Maximum Density mode, it recommends migrating workloads among the powered-on servers. If Workload Balancing cannot resolve the issue using this method, it attempts to power on a server. Workload Balancing determines which servers to power on by applying the same criteria it would if the optimization mode was set to Maximum Performance.
When Workload Balancing runs in Maximum Performance mode, Workload Balancing recommends powering on servers until the resource utilization on all pool members falls below the High threshold.
While migrating VMs, if Workload Balancing determines that increasing capacity benefits the overall performance of the pool, it powers on servers automatically or recommends doing so.
Important:
Workload Balancing only recommends powering on a server that Workload Balancing powered off.
Design environments for power management and VM consolidation
When you are planning a Citrix Hypervisor implementation and you intend to configure automatic VM consolidation and power management, consider your workload design. For example, you might want to:
Place different types of workloads in separate pools.
If you have an environment with distinct types of workloads, consider whether to locate the VMs hosting these workloads in different pools. Also consider splitting VMs that host types of applications that perform better with certain types of hardware into different pool.
Because power management and VM consolidation are managed at the pool level, design pools so they contain workloads that you want consolidated at the same rate. Ensure that you factor in considerations such as those discussed in Configure advanced settings.
Exclude servers from Workload Balancing.
Some servers might need to be always on. For more information, see Exclude servers from recommendations.
Understand when Workload Balancing makes recommendations
Workload Balancing continuously evaluates the resource metrics of physical servers and VMs across the pools it is managing against thresholds. Thresholds are preset values that function like boundaries that a server must exceed before Workload Balancing can make an optimization recommendation. The Workload Balancing process is as follows:
Workload Balancing detects that the threshold for a resource was violated.
Workload Balancing evaluates if it makes an optimization recommendation.
Workload Balancing determines which servers it recommends function as the destination servers and in what order to make any optimizations. A destination server is the server where Workload Balancing recommends relocating one or more VMs.
Workload Balancing makes an optimization recommendation.
When evaluating servers in the pool to make an optimization recommendation, Workload Balancing uses thresholds and weightings as follows:
Thresholds are the boundary values that Workload Balancing compares the resource metrics of your pool against. The thresholds are used to determine whether to make a recommendation and what servers are a suitable candidate for hosting relocated VMs.
Weightings are a way of ranking resources according to how much you want them to be considered, are used to determine the processing order. After Workload Balancing decides to make a recommendation, it uses your specifications of which resources are important to determine the following:
- Which servers’ performance to address first
- Which VMs to recommend migrating first
For each resource Workload Balancing monitors, it has four levels of thresholds: Critical, High, Medium, and Low. Workload Balancing evaluates whether to make a recommendation when a resource metric on a server:
- Exceeds the High threshold when the pool is running in Maximum Performance mode (improve performance)
- Drops below the Low threshold when the pool is running in Maximum Density mode (consolidate VMs on servers)
- Exceeds the Critical threshold when the pool is running in Maximum Density mode (improve performance)
If the High threshold for a pool running in Maximum Performance mode is 80%, when CPU utilization on a server reaches 80.1%, Workload Balancing evaluates whether to issue a recommendation.
When a resource violates its threshold, Workload Balancing evaluates the resource metric against historical performance to prevent making an optimization recommendation based on a temporary spike. To do so, Workload Balancing creates a historically averaged utilization metric by evaluating the data for resource utilization captured at the following times:
Data captured | Weight |
---|---|
Immediately, at the time threshold was exceeded. That is, real-time data. | 70% |
30 minutes before the threshold was exceeded | 25% |
24 hours before the threshold was exceeded | 5% |
If CPU utilization on the server exceeds the threshold at 12:02 PM, Workload Balancing checks the utilization at 11:32 AM that day, and at 12:02PM on the previous day. For example, if CPU utilization is at the following values, Workload Balancing doesn’t make a recommendation:
- 80.1% at 12:02 PM that day
- 50% at 11:32 AM that day
- 78% at 12:32 PM the previous day
This behavior is because the historically averaged utilization is 72.5%, so Workload Balancing assumes that the utilization is a temporary spike. However, if the CPU utilization was 83% at 11:32AM, Workload Balancing makes a recommendation since the historically averaged utilization is 80.1%.
Optimization and consolidation process
The Workload Balancing process for determining potential optimizations varies according to the optimization mode - Maximum Performance or Maximum Density. However, regardless of the optimization mode, the optimization and placement recommendations are made using a two-stage process:
- Determine potential optimizations: which VMs to migrate off servers.
- Determine placement recommendations: which servers would be suitable candidates for new VMs.
Note:
Workload Balancing only recommends migrating VMs that meet the Citrix Hypervisor criteria for live migration. One of these criteria is that the destination server must have the storage the VM requires. The destination server must also have sufficient resources to accommodate adding the VM without exceeding the thresholds of the optimization mode configured on the pool. For example, the High threshold in Maximum Performance mode and the Critical threshold for Maximum Density mode.
When Workload Balancing is running in automated mode, you can tune the way it applies recommendations. For more information, see Set conservative or aggressive automated recommendations.
Optimization recommendation process in Maximum Performance mode
When running in Maximum Performance mode, Workload Balancing uses the following process to determine potential optimizations:
Every two minutes Workload Balancing evaluates the resource utilization for each server in the pool. It does so by monitoring on each server and determining if each resource’s utilization exceeds its High threshold. For more information, see Change the critical threshold.
In Maximum Performance mode, if a utilization of a resource exceeds its High threshold, Workload Balancing starts the process to determine whether to make an optimization recommendation. Workload Balancing determines whether to make an optimization recommendation based on whether doing so can ease performance constraints, such as ones revealed by the High threshold.
For example, consider the case where Workload Balancing sees that insufficient CPU resources negatively affect the performance of the VMs on a server. If Workload Balancing can find another server with less CPU utilization, it recommends moving one or more VMs to another server.
- If a resource’s utilization on a server exceeds the relevant threshold, Workload Balancing combines the following data to form the historically averaged utilization:
- The resource’s current utilization
- Historical data from 30 minutes ago
- Historical data from 24 hours ago If the historically averaged utilization exceeds the threshold of a resource, Workload Balancing determines it makes an optimization recommendation.
Workload Balancing uses metric weightings to determine what servers to optimize first. The resource to which you have assigned the most weight is the one that Workload Balancing attempts to address first. For more information, see Tune metric weightings.
Workload Balancing determines which servers can support the VMs it wants to migrate off servers.
Workload Balancing makes this determination by calculating the projected effect on resource utilization of placing different combinations of VMs on servers. Workload Balancing uses a method of performing these calculations that in mathematics is known as permutation.
To do so, Workload Balancing creates a single metric or score to forecast the impact of migrating a VM to the server. The score indicates the suitability of a server as a home for more VMs.
To score server performance, Workload Balancing combines the following metrics:
- The current metrics of the server
- The metrics of the server from the last 30 minutes
- The metrics of the server from 24 hours ago
- The metrics of the VM.
After scoring servers and VMs, Workload Balancing attempts to build virtual models of what the servers look like with different combinations of VMs. Workload Balancing uses these models to determine the best server to place the VM.
In Maximum Performance mode, Workload Balancing uses metric weightings to determine what servers to optimize first and what VMs on those servers to migrate first. Workload Balancing bases its models on the metric weightings. For example, if CPU utilization is assigned the highest importance, Workload Balancing sorts servers and VMs to optimize according to the following criteria:
- What servers are running closest to the High threshold for CPU utilization.
- What VMs have the highest CPU utilization or are running the closest to its High threshold.
- Workload Balancing continues calculating optimizations. It views servers as candidates for optimization and VMs as candidates for migration until predicted resource utilization on the server hosting the VM drops below the High threshold. Predicted resource utilization is the resource utilization that Workload Balancing forecasts a server has after Workload Balancing has added or removed a VM from the server.
Consolidation process in Maximum Density mode
Workload Balancing determines whether to make a recommendation based on whether it can migrate a VM onto a server and still run that server below the Critical threshold.
When a resource’s utilization drops below its Low threshold, Workload Balancing begins calculating potential consolidation scenarios.
When Workload Balancing discovers a way that it can consolidate VMs on a server, it evaluates whether the destination server is a suitable home for the VM.
Like in Maximum Performance mode, Workload Balancing scores the server to determine the suitability of a server as a home for new VMs.
Before Workload Balancing recommends consolidating VMs on fewer servers, it checks that resource utilization on those servers after VMs are relocated to them is below Critical thresholds.
Note:
Workload Balancing does not consider metric weightings when it makes a consolidation recommendation. It only considers metric weightings to ensure performance on servers.
After scoring servers and VMs, Workload Balancing attempts to build virtual models of what the servers look like with different combinations of VMs. It uses these models to determine the best server to place the VM.
Workload Balancing calculates the effect of adding VMs to a server until it forecasts that adding another VM causes a server resource to exceed the Critical threshold.
Workload Balancing recommendations always suggest filling the pool coordinator first since it is the server that cannot be powered off. However, Workload Balancing applies a buffer to the pool coordinator so that it cannot be over-allocated.
Workload Balancing continues to recommend migrating VMs on to servers until all remaining servers exceed a Critical threshold when a VM is migrated to them.
Change the critical thresholds
You might want to change critical thresholds as a way of controlling when optimization recommendations are triggered. This section provides guidance about:
- How to modify the default Critical thresholds on servers in the pool
- How values set for Critical threshold alter High, Medium, and Low thresholds.
Workload Balancing determines whether to produce recommendations based on whether the averaged historical utilization for a resource on a server violates its threshold. Workload Balancing recommendations are triggered when the High threshold in Maximum Performance mode or Low and Critical thresholds for Maximum Density mode are violated. For more information, see Optimization and consolidation process.
After you specify a new Critical threshold for a resource, Workload Balancing resets the other thresholds of the resource relative to the new Critical threshold. To simplify the user interface, the Critical threshold is the only threshold you can change through Citrix Hypervisor Center.
The following table shows the default values for the Workload Balancing thresholds:
Metric | Critical | High | Medium | Low |
---|---|---|---|---|
CPU Utilization | 90% | 76.5% | 45% | 22.5% |
Free Memory | 51 MB | 63.75 MB | 510 MB | 1020 MB |
Network Reads | 25 MB/sec | 21.25 MB/sec | 12.5 MB/sec | 6.25 MB/sec |
Network Writes | 25 MB/sec | 21.25 MB/sec | 12.5 MB/sec | 6.25 MB/sec |
Disk Reads | 25 MB/sec | 21.25 MB/sec | 12.5 MB/sec | 6.25 MB/sec |
Disk Writes | 25 MB/sec | 21.25 MB/sec | 12.5 MB/sec | 6.25 MB/sec |
To calculate the threshold values for all metrics except memory, Workload Balancing multiplies the new value for the Critical threshold with the following factors:
- High Threshold Factor: 0.85
- Medium Threshold Factor: 0.50
- Low Threshold Factor: 0.25
For example, if you increase the Critical threshold for CPU utilization to 95%, Workload Balancing resets the other thresholds as follows:
- High: 80.75%
- Medium: 47.5%
- Low: 23.75%
To calculate the threshold values for free memory, Workload Balancing multiplies the new value for the Critical threshold with these factors:
- High Threshold Factor: 1.25
- Medium Threshold Factor: 10.0
- Low Threshold Factor: 20.0
For example, if you increase the Critical threshold for free memory to 45 MB, Workload Balancing resets the other thresholds as follows:
- High: 56.25 MB
- Medium: 450 MB
- Low: 900 MB
To perform this calculation for a specific threshold, multiply the factor for the threshold with the value you entered for the critical threshold for that resource:
High, Medium, or Low Threshold = Critical Threshold * High, Medium, or Low Threshold Factor
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论