Rightsize VMs and Instances
Using VM data from the cloud platform (and optionally from third-party performance monitoring tools), Commander provides rightsizing recommendations for VMs and instances based on VM and guest OS performance data. Rightsizing means ensuring that all VMs in your virtualized infrastructure are allocated the correct resources for their workload, with the goal of minimizing cost and maximizing performance. Rightsizing is an important part of Commander Cloud Expense Management.
You can apply the recommendations directly from Commander or schedule them for later.
Memory rightsizing recommendations require additional configuration for public cloud instances. See Monitor Memory Metrics for Public Cloud Instances.
Reasons to rightsize
There are several reasons to rightsize your VMs:
- Over-allocation wastes expensive server resources and decreases ROI for the infrastructure.
- Configuring a VM with more virtual CPUs than its workload may cause slightly increased resource usage, potentially impacting performance on very heavily loaded systems. Common examples of this include a single-threaded workload running in a multi-vCPU VM, or a multi-threaded workload running in a VM with more vCPUs than the workload can effectively use. Even if the guest operating system doesn't use some of its vCPUs, configuring VMs with those vCPUs still imposes some small resource requirements that translate to real CPU consumption on the host.
- Allocating enough memory to hold the working set of applications you will run in the VM minimizes swap activity and the associated disk thrashing.
- Allocating more memory than required unnecessarily increases the VM memory overhead, thus consuming memory that could be used to support more VMs.
- Over-allocation of vCPU causes performance problems on heavily loaded hosts (all vCPUs need to be scheduled to run at the same time).
- In the VMware context specifically, VMs with less memory and/or fewer vCPUs provide more opportunities for VMware DRS to migrate them in order to improve balance across the cluster. VMs with larger memory sizes and/or more vCPUs add more constraints for migration. It's also easier to manually distribute and balance smaller workloads across the available hosts.
- For managed service providers, rightsizing can be used to increase billable resources sold to customers.
- If you have a significant number of VMs to manage, you can save time by automatically applying rightsizing recommendation rules instead of manually applying them.
How rightsizing works
To ensure that Commander makes accurate recommendations, recommendations are generated only if a VM has a sufficient number of performance samples (the sample size) within the sample period. Performance samples are taken each night, or when manually requested by a user. Only the most recent performance sample for each 24-hour period is used. The VM must be powered on for performance data to be updated, but it doesn't need to be powered on continuously.
The sample size and sample period are configurable, but by default, Commander must have at least seven days of performance samples within the last 30 days to generate recommendations for a VM.
After a recommendation has been applied, Commander doesn't make any further recommendations until the required number of samples (the sample size) has been gathered. The sample period ensures that Commander gets sufficient data following the change to properly re-evaluate performance.
To see what rules Commander is using to generate recommendations, go to Configuration > Groups > Rightsizing, or click Rightsizing Rules at the bottom of the Recommendations page. If you have a Superuser or Enterprise Admin role, you can configure the rightsizing rules. For more information, see Configure Rules for VM Rightsizing.
Commander Database Maintenance can affect rightsizing recommendations by deleting performance samples.
GCP's hybrid model for resource configuration means that Commander's rightsizing recommendations work differently for GCP than for AWS and Azure.
Aggressive rightsizing supported for custom machine types
GCP supports custom CPU and memory settings, like VMware and SCVMM. As a result, Commander's aggressive rightsizing feature, which recommends an immediate rightsizing to the most appropriate resource values, applies to GCP. It does not apply to AWS and Azure.
Recommendations always preserve current configuration
For a VM with a predefined instance type (such as n1-standard-1), Commander will always recommend another predefined instance type within the same family. As a result, if you've standardized the instance types in your environment, you can be sure that Commander will never recommend a custom machine type.
For a VM with a custom machine type, Commander will always recommend custom settings for CPU and memory. This ensures that if you were saving money through the use of custom machine types, Commander will never recommend a predefined instance type that could be much more costly.
Automatic conversion of custom to predefined types by GCP
If GCP finds an instance with a custom machine type that matches a predefined instance type, GCP automatically assigns the matching predefined instance type, thus affecting future rightsizing recommendations. For example, let's say you have an instance with a custom machine type of 12 vCPUs and 70 GB of memory. Because the instance is underused, Commander recommends aggressively downsizing to 8 vCPUs and 30 GB memory. Once you apply this recommendation, GCP automatically assigns the n1-standard-8 instance type, which has 8 vCPUs and 30 GB memory. From then on, Commander will always recommend another predefined instance type for this VM.
In addition, because recommendations don't consider sustained use discounts, the predicted cost may be less accurate towards the end of the month for an instance that was automatically assigned a predefined instance type.
Downsizing vCPU resources may increase memory costs
When the number of vCPUs is decreased, the amount of memory used by the VM may increase. As a result, Commander may sometimes predict little or no cost savings for a CPU downsizing recommendation, because the cost of the additional memory required may be the same as, or similar to, the savings in CPU costs.
GCP constraints may prevent recommendations
GCP rules governing memory, vCPUs and NICs can sometimes prevent Commander from making a recommendation.
- An instance's memory in GB can't be less than 90% of its current CPU count. Commander may not make a memory downsizing recommendation if the smaller memory size would break this rule.
- Commander won't make a recommendation that would result in the VM having an instance type that doesn't support the current number of NICs. An instance must have at least two and no more than eight NICs, and it may not have more NICs than vCPUs. For example, if an instance has eight NICs, Commander will never recommend downsizing the instance to have fewer than eight CPUs.
Costs
To estimate the cost decrease or increase once a recommendation is applied, Commander uses the annual cost for the recommended instance type or CPU and memory resources.
Memory recommendations
- By default, memory rightsizing recommendations are between 12.5% and 25% of total memory size. For example, for VMs with between 1024 MB and 2048 MB total memory, Commander recommends a memory change of 256 MB. You can specify that Commander recommend an immediate downsize to the recommended CPU and memory levels by configuring aggressive rightsizing. Aggressive rightsizing applies only to GCP, vCenter and SCVMM VMs.
- Memory rightsizing recommendations are not generated for VMs with less than 128 MB or more than 1 TB of memory. Commander won't generate a memory upsize recommendation that will result in the VM having more memory than is available on the host.
- You must configure memory metrics monitoring to enable memory rightsizing recommendations for public cloud VMs. See Monitor Memory Metrics for Public Cloud Instances.
- Commander doesn't make memory rightsizing recommendations for SCVMM VMs with static memory.
Instance type recommendations
- Commander can issue instance type rightsizing recommendations for public cloud instances. Based on CPU and memory performance data, Commander will recommend upsizing or downsizing the instance type by one level, within the same instance type family. Examples of instance type families are m1 (for AWS) and Basic A (for Azure). For example, Commander may recommend changing the instance type from m1.small to m1.medium.
- Commander doesn't make upsizing recommendations for VMs at the top level of an instance type family (for example, m3.2xlarge), or downsizing recommendations for VMs at the bottom level of an instance type level (for example, m3.medium).
- If performance data indicates that a change should be made to the instance type, but the recommended instance type isn't supported due to other instance settings (such as disk encryption), a recommendation won't be made.
- Commander doesn't make any recommendations if there's only a single instance type in the current instance type family (for example, the AWS t1 family has only a single instance type, t1.micro).
If a VM in an Auto Scaling Group is powered off as a result of a change request to apply a rightsizing recommendation, AWS marks the VM as unhealthy and may terminate and then replace the VM. When Commander is unable to fulfill a change request or apply a rightsizing recommendation because the VM has been terminated, the task will fail.
How VM resource changes affect existing recommendations
VM resource configuration changes may occur outside the recommendation system, so that recommendations are fulfilled or no longer apply. Commander keeps track of these changes and adjusts recommendations accordingly.
If the CPU, memory or instance type for a VM is changed (inside or outside Commander) so that a recommendation is satisfied, the recommendation is marked as applied and removed from the recommendations list.
If any of the following occur, Commander will rescind a recommendation and will gather the required number of samples before making another recommendation:
- The CPU, memory or instance type for a VM is changed (inside or outside Commander), but the change is contrary to the recommendation.
- The VM performance changes such that it falls below the rightsizing recommendation threshold.
Likewise, if a VM's CPU count, memory, instance type or host have changed within the last seven days, Commander won't make recommendations. Commander only uses performance data gathered when the VM's configuration matches the current configuration.
If a VM is migrated to another host, by default, upsizing recommendations are rescinded, but downsizing recommendations persist. When recommendations are rescinded after migration, Commander doesn't generate new recommendations until the required number of performance samples are collected within the sample period. To change this behavior, see Customize VM rightsizing rules.
How host or cluster performance affects VM memory rightsizing recommendations
Adding more memory to a VM can actually degrade performance of the host or cluster. For example, on a host with 4 GB of memory, if the VMs are using all but 256 MB of that memory, adding 512 MB to one VM on that host might cause performance issues on the host. Likewise, adding memory to a VM that has a high ESX swap rate (indicating that the host is over committed) can also cause performance issues on the host.
To prevent this problem, if the memory capacity of the host or cluster is less than two VM workloads, memory rightsizing recommendations include a capacity warning. For example:
The capacity of the host is low - 1 workload(s) remaining. Increasing memory usage may negatively impact performance.
Incorporate Windows guest OS performance data
If Commander is integrated with Splunk, Windows guest OS performance data helps Commander determine whether to make a recommendation. Here are a few examples of cases in which Windows guest OS data would prevent Commander from generating a recommendation:
Required Service Portal permissions
Several Service Portal permissions relate to rightsizing recommendations.
- The Show Recommendations: Cost Increase permission allows users to view upsizing recommendations and ignore upsizing recommendations. Users with this permission can also prevent both upsizing and downsizing recommendations for individual VMs and allow new upsizing and downsizing recommendations after ignoring or excluding.
- The Show Recommendations: Cost Decrease permission allows users to view downsizing recommendations and ignore downsizing recommendations. Users with this permission can also prevent both upsizing and downsizing recommendations for individual VMs and allow new upsizing and downsizing recommendations after ignoring or excluding.
Users with this permission can also prevent both upsizing and downsizing recommendations for individual VMs and to allow new upsizing and downsizing recommendations after ignoring or excluding.
If you grant both 'Show Recommendations: Cost Increase' and 'Show Recommendations: Cost Decrease' permissions, users can use the Column Selection dialog to add up to four columns of recommendation properties to VM tables. If you grant only one of these permissions, users can't view recommendation details in VM tables and the columns are not available in the Column Selection dialog.
What users see in the Recommendations command menu is controlled by several permissions:
- The Request Service Change option requires the Request Service Change permission. This option allows users to submit a change request to apply a recommendation. Requiring users to submit a change request ensures that rightsizing recommendations go through the request approval process. For more information, see Approval Workflows.
- The Apply In Maintenance Window option requires the Schedule Maintenance Tasks permission.
- The Apply Immediately option requires the Modify VM CPU & Memory permission.
- The Schedule option requires the Schedule Tasks permission and the Modify VM CPU & Memory permission.
- The Ignore and Exclude VM commands require the Show Recommendations: Cost Increase or Show Recommendations: Cost Decrease permission.
See Customize Service Portal Roles for Users to learn how to configure permissions.
View rightsizing recommendations
Access: | Tools > Recommendations or VM Summary tab |
Available to: | Any level of access rights on the VM |
To view all rightsizing recommendations, go to Tools > Recommendations.
You can filter a long list by entering text in the filter field. For example, to view only memory rightsizing recommendations, enter memory in the filter field. To view only instance type (public cloud) rightsizing recommendations, enter instance type in the filter field. To view only downsizing recommendations, enter down in the filter field.
Costs associated with recommendations are displayed in the user’s preferred currency.
If a user has applied a recommendation, the action is displayed in both the list view and the table view. In the table view, the action is displayed in the Action Taken column. For example, if a user submitted a change request to apply a recommendation, the list view displays "Some recommendations are requested", and the table view displays "Change Request" in the Action Taken column.
View rightsizing recommendations for a single VM
To view rightsizing recommendations for a single VM, navigate to the VM in the tree and view its Summary page. If there are current recommendations, a pop-up box is displayed. Click the pop-up to view the details.
View VM rightsizing groups
All VMs belong to a rightsizing group. The rightsizing group determines the rules used to generate rightsizing recommendations. There are two ways to view a VM's rightsizing group: add a property to the VM's Details pane, and add a column to the Virtual Machines list.
To add the Rightsizing Group property to the VM Details pane:
- Select a VM in the tree, or double-click a VM on the Virtual Machines tab.
- On the Summary tab, in the Details pane, click Pick Properties.
- In the Hidden Properties list of the Property Selection dialog, scroll to the Recommendations category, and then double-click Rightsizing Group.
The property moves to the Shown Properties list.
- Use the Move Up and Move Down buttons to move the property to where you'd like it.
- Click OK.
The VM's rightsizing group is now displayed in the VM Details pane.
To add the Rightsizing Group column to the Virtual Machines list:
- Select an object in the tree, then select the Virtual Machines tab.
- Right-click anywhere in the list and select Pick Columns from the context menu.
- In the Hidden Properties list of the Property Selection dialog, scroll to the Recommendations category, and then double-click Rightsizing Group.
The property moves to the Shown Properties list.
- Use the Move Up and Move Down buttons to move the column to where you'd like it.
- Click OK.
The rightsizing group is now displayed as a column in the Virtual Machines list.
Find VMs with recommendations
Access: | Tools > Search or Views > Inventory > Virtual Machines tab |
Available to: | Any level of access rights on the VM |
You can use the following properties to find VMs with recommendations:
- Has Recommendations
- Recommendation Annual Cost Savings
- Recommendations Instance Type Down
- Recommendations Instance Type Up
- Recommended CPU Change
- Recommended Instance Type
- Recommended Memory Change (GB)
All of these properties are in the Recommendations category.
- To find all VMs with a recommendation that will save more than 100 USD per year, for example, search for VMs where the Recommendation Annual Cost Savings is greater than 100.
- To find all VMs with a recommendation that will cost more than 100 USD per year, search for VMs where the Recommendation Annual Cost Savings is less than -100.
VMs that have only ignored recommendations, or only recommendations that have already been applied, are not shown.
You can also add the rightsizing properties listed above to VM tables. See Choose categories of VM columns to display to learn how.
To find all VMs owned by the Development organization where the recommendation will save more than 100 USD, enter the values as shown in the image below.
To find all VMs with a CPU Down recommendation of more than 1 CPU, enter the values as shown in the image below (note the negative number).
To find all VMs with a Memory Down recommendation, enter the values as shown in the image below.
Apply rightsizing recommendations
Unless automated rightsizing is configured, once you've decided to apply a recommendation, you can submit a change request, apply it immediately, apply it in the VM's maintenance window or schedule it for later, depending on your permissions. Submitting a change request is the recommended method, so that the recommendation goes through the request approval process.
- When a recommendation is applied, running VMs are powered off, reconfigured and powered on again. Note that if the power-on is unsuccessful, the change isn't reverted.
vCenter: If you've enabled CPU Hot Add, CPU Hot Remove or Memory Hot Add for the VM, changing CPU and/or memory resources is considered a non-disruptive change.
- A scheduled recommendation task will be carried out even if the VM's performance changes, or if the recommendation is ignored or rescinded. However, you can cancel or edit a scheduled recommendation.
- Because instance type rightsizing recommendations are based on CPU metrics only, we recommend that you check the VM's memory performance before applying a recommendation.
You can apply recommendations from Tools > Recommendations and from the VM Summary tab. The instructions for both are similar, but this procedure assumes you're viewing recommendations from the Recommendations page.
Access: | Tools > Recommendations or VM Summary tab |
Available to: | Operator or higher access rights on the VM |
To apply a recommendation:
- To apply a recommendation, click Apply.
To apply multiple recommendations simultaneously, select to access the Table view. Ctrl-click or Shift-click multiple recommendations and click Apply.
- In the Apply Recommendation dialog, do any of the following:
- To submit a change request, click Request Service Change. Review the request details, add a comment if desired and click OK.
- To apply the changes during this VM's maintenance window, select Apply In Maintenance Window. The time of the next maintenance window is displayed in the dialog.
- To apply the changes immediately, click Apply Immediately.
- To apply the changes later, click Schedule. In the Configure Scheduled Task wizard, enter a date and time for the recommendation to be applied. Confirm the schedule and click Finish.
You may occasionally see conflicting recommendations. For example, the VM metrics may result in an upsize recommendation, while the guest OS metrics result in a downsize recommendation. If this occurs, both recommendations are displayed, and you can decide which one to apply.
Cancel or edit scheduled recommendations
When you schedule a rightsizing recommendation in the VM's maintenance window, you can cancel the scheduled task, but you can't edit it.
When you schedule a rightsizing recommendation with the Schedule option, you can cancel it and edit it.
Any user who is able to see a scheduled rightsizing task can delete it.
To view, cancel or edit a scheduled recommendation, go to Tools > Scheduled Tasks.
For more information, see Schedule Tasks.
Ignore rightsizing recommendations
Access: | Tools > Recommendations or VM Summary tab |
Available to: | Operator or higher access rights on the VM |
If you decide that a recommendation should not be applied, you have a few options. When you click Ignore or Ignore All for a recommendation you can:
- Ignore the recommendation for a specified number of days. The recommendation disappears from the list. After the specified number of days has passed, another recommendation may be made.
- Ignore the recommendation until new performance data is available. The recommendation disappears from the list. After the required number of samples have been acquired for the VM, a new recommendation of this type may be made.
For a VM that's always powered on, it doesn't matter which of these two options you pick, because performance data is gathered nightly for powered-on VMs. For a VM that's only powered on one day per month, though, if you chose the second option, it would take longer to make a recommendation.
You can also ignore a recommendation forever. The recommendation disappears from the list. No more recommendations of the same type and direction for this VM will be generated. For example, if you ignore a Memory Upsize recommendation forever, Memory Downsize, CPU Upsize and CPU Downsize recommendations may still be generated for this VM.
To ignore multiple recommendations simultaneously, go to Tools > Recommendations and select to access the Table view. Ctrl-click or Shift-click multiple recommendations and choose Ignore.
Prevent recommendations for VMs
You may not want to see any recommendations for a particular VM. For example, if one of your customers has requested and is paying for a VM with 16 GB of RAM, you will never rightsize this VM. If you don't want to see recommendations in this case, you can exclude the VM from rightsizing recommendations.
Access: | Tools > Recommendations or VM Summary tab |
Available to: | Operator or higher access rights on the VM |
To prevent the generation of recommendations for a particular VM:
- From the Recommendations list or from the recommendation alert on the VM's Summary tab, click Exclude VM.
To exclude multiple VMs simultaneously, go to Tools > Recommendations and select to access the Table view. Ctrl-click or Shift-click multiple recommendations and click Exclude VM.
- In the Exclude VM dialog, provide a reason if desired and click Exclude VM.
Allow new recommendations after ignoring or excluding
If you change your mind after you ignore a recommendation, you can allow new recommendations of that type. In this case, the recommendation you originally ignored is closed.
Likewise, if you change your mind after you exclude a VM from rightsizing recommendations, you can remove the exclusion, so that you will see recommendations for the VM.
Commander waits five minutes before generating new recommendations.
Access: | Tools > Recommendations |
Available to: | Operator or higher access rights on the VM |
- Under Ignored Recommendations, click View ignored recommendations.
- In the Ignored Recommendations pop-up list, select a row.
- For a VM with ignored recommendations, click Allow new recommendations.
The VM disappears from the Ignored Recommendations list, the original recommendation is closed, and another recommendation for this VM can be generated.
- For a VM that has been excluded from recommendations, click Remove Exclusion.
The VM disappears from the Ignored Recommendations list, and recommendations for this VM can now be generated.