Configure Rules for VM Rightsizing

Commander uses a set of rules to generate rightsizing recommendations for a VM. You can customize these rules.

You can also configure different rules for different workload types through rightsizing groups. For example, you can configure distinct rules for a database and a web server, or for production and development workloads. Rightsizing groups also allow you to specify that certain workloads are never resized (such as a load balancer appliance). For each rightsizing group, you can also configure automatic or manual application of recommendations.

See Rightsize VMs and Instances to learn how to view and apply rightsizing recommendations.

See Rightsizing and GCP for details on how Commander rightsizing recommendations work differently for GCP.

Rightsizing is just one part of Commander cloud expense management. See Get started with cloud expense management to learn about other features that work together to reduce your cloud costs.

Rightsizing recommendation formulas

By default (when conservative rightsizing is configured), 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.

When aggressive rightsizing is configured, the formula for CPU downsizing is:

(Peak CPU % * Num Cores) * Buffer

Aggressive rightsizing applies only to GCP, vCenter, and SCVMM VMs.

For example, let's say you have a VM with 8 vCPUs and a peak memory usage of 50%. When aggressive downsizing is configured with no CPU rightsizing buffer, Commander would recommend an immediate downsize to 4 vCPUs. But you might want to leave a little wiggle room. If you set a CPU buffer of 20%, Commander would recommend downsizing to 6 vCPUs instead (50% peak usage times 8 vCPU times 120% = 4.8 vCPUs, which is rounded up to 6 vCPUs, since only an even number of CPUs is allowed).

When aggressive rightsizing is configured, the formula for memory downsizing is:

(Peak Memory % * Mem (GB)) * Buffer

For example, let's say you have a VM with 8 GB memory and a peak memory usage of 50%. When aggressive downsizing is configured with no memory rightsizing buffer, Commander would recommend an immediate downsize to 4 GB. But you might want to leave a little wiggle room. If you set a memory buffer of 20%, Commander would recommend downsizing to 5 GB instead (50% peak usage times 8 GB memory times 120% = 4.8 GB, which is rounded up to 5 GB).

How configuration changes affect existing recommendations

When you change a rightsizing group's configuration, existing recommendations for VMs in that group are rescinded, and new recommendations are generated with the next nightly VM performance update.

If you move a VM to a different rightsizing group, existing recommendations for that VM are rescinded, and new recommendations are generated (if necessary) with the next nightly VM performance update.

If a VM was excluded from recommendations, this setting is preserved when the VM is moved to a different rightsizing group.

If you want to generate new recommendations immediately, you can manually update VM performance data.

Tasks for configuring rightsizing rules

If you want to customize a single set of rightsizing rules for your entire virtual infrastructure, continue to Customize VM rightsizing rules.

If you want to set up distinct rules for different workloads or parts of your infrastructure, the steps are:

  1. Create and configure one or more rightsizing groups. See Customize VM rightsizing rules.
  2. Assign existing VMs to the proper rightsizing group. See Assign existing VMs to a rightsizing group.
  3. Assign new VMs to the proper rightsizing group. See Set the rightsizing group for new VMs.

Customize VM rightsizing rules

Rightsizing groups are used to configure the rules for VM rightsizing. By default, all VMs are assigned to the default rightsizing group. You can customize the rules for the default rightsizing group. To configure distinct sets of rules, create one or more rightsizing groups and configure the rules as required.

Access:

Configuration > Groups > Rightsizing

Available to:

Commander Roles of Superuser and Enterprise Admin

  1. Do one of the following:
    • If you want to customize the rules for the default rightsizing group, on the Rightsizing page select the default rightsizing group, and click Edit.
    • If you want to create distinct rightsizing rules for different parts of your infrastructure, or for different workload types, create a new group. On the Rightsizing page, click Add.

      You can copy a set of rightsizing rules by selecting a group in the list and clicking Copy.

  2. In the Rightsizing Group wizard, enter a name (100 character limit) and an optional description (1000 character limit).

    Give the group a descriptive name so that it makes sense to service owners viewing the service's Rightsizing Group property, and so that administrators can easily choose the proper group when required.

  3. On the General page:
    • Set the Sample Size and Sample Period.

      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 whenever performance data is updated as part of the nightly performance update. The VM must be powered on for performance to be updated, but it doesn't need to be powered on continuously.

      By default, Commander must have at least seven days of performance samples within the last 30 days to generate recommendations for a VM.

      For example, if you only want Commander to generate recommendations for VMs that have continuous performance samples (meaning that no days are missed), set Sample Size and Sample Period to the same value.

      If you think there's a danger that recommendations based on only a week's worth of data might be based on performance spikes, increase the Sample Size. This ensures that the average values are based on a greater number of samples.

    • If you want to aggressively downsize the VMs in this group, so that Commander recommends immediate downsizing to the optimal CPU and/or memory level, select Aggressive. This setting works well especially for very large VMs. If you want to gradually downsize CPU and memory in multiple steps, select Conservative.

      Aggressive rightsizing applies only to GCP, vCenter and SCVMM VMs. For GCP, aggressive rightsizing applies to custom machine types, not predefined instance types.

    • Choose whether to maintain rightsizing recommendation after a VM is migrated.

      By default, downsizing recommendations persist after VM migration, but upsizing recommendations are rescinded after VM migration.

      When Commander is configured to rescind a recommendation after VM migration, a new recommendation isn't generated until the required number of performance samples are collected within the configured sample period. This is because the VM's CPU ready history and the VM's memory ballooning history reflect congestion on the old host, not the new one.

      Because downsizing recommendations don't depend on any attributes of the host system, you can typically ignore migration with respect to downsizing, and preserve the default setting. However, if you want Commander to rescind downsizing recommendations after VM migration, disable Downsizing recommendations persist. If you want upsizing recommendations to persist after VM migration, enable Upsizing recommendations persist.

  4. On the CPU Changes page, adjust the settings as required.

    The default settings are as follows:

    Recommendation Type

    Upsize when...

    Unless...

    CPU Upsize

    VM CPU: Average > 75%

    AND

    VM CPU: Peak > 90%

    VM CPU Ready Average > 5%

    OR

    Host can't support the recommended number of CPUs

    CPU Downsize

    VM CPU: Average < 38%

    AND

    VM CPU: Peak < 45%

    If you don't want VMs to be downsized below a certain level, enable Minimum Recommended CPU and enter a value for vCPU.

    If you selected Aggressive on the General page, you can set a buffer for CPU downsizing. See Rightsizing recommendation formulas above to learn how this buffer affects recommendations.

  5. On the Memory Changes page, adjust the memory settings as required.

    Guest memory settings have no effect unless you have integrated with Splunk.

    The default settings are as follows:

    Recommendation Type

    Upsize when...

    Unless...

    Memory Upsize

    VM Memory: Peak > 90%

    OR

    Guest Memory: Peak > 90%

    OR

    Guest Memory Paging: Peak > 30 pages out/sec

    Guest Memory Paging: Average < 20 pages out /sec

    OR

    VM Memory Ballooning: Average > 10% of VM memory

    OR

    VM memory > 1 TB

    Memory Downsize

    VM Memory: Peak < 60%

    OR

    Guest Memory: Peak < 60%

    If you selected Aggressive on the General page, you can set a buffer for memory downsizing. See Rightsizing recommendation formulas to learn how this buffer affects recommendations.

  6. On the Automation page:

    If you want Commander to automatically apply upsizing recommendations for this group, enable Upsizing recommendations (increases costs).

    If you want Commander to automatically apply downsizing recommendations for this group, enable Downsizing recommendations (decreases costs)

    Specify how automated rightsizing recommendations are applied:

    • Submit change request is the recommended method, so that requests are fully governed and auditable.

      Completion workflows for automated rightsizing change requests must have a Global assignment.

    • Apply in maintenance window means that recommendations will be automatically scheduled to be applied in the VM's maintenance window.
    • Apply immediately means that recommendations will be automatically applied immediately, resulting in a power-down and restart if required.

    If you change the automation settings for an existing group, any active recommendations for VMs in this group will be automatically applied using the selected method.

  7. On the Summary page, review your settings, then click Finish.

Assign existing VMs to a rightsizing group

Access:

Views > Inventory > Infrastructure > Virtual Machines tab

or

Views > Inventory > Applications > Virtual Machines tab

Available to:

Commander Roles of Superuser and Enterprise Admin

Operator or higher access rights on the VM

  1. In the Infrastructure or Applications view, display the VMs in the Virtual Machines tab. You can perform a quick search or advanced search to locate the VMs.
  2. Select the VMs, right-click, and choose Configuration Management > Set Rightsizing Group.
  3. In the Set Rightsizing Group dialog, select a group and click OK.

See also View VM rightsizing groups.

Set the rightsizing group for new VMs

There are three ways to set the rightsizing group when a VM is deployed:

  • the service catalog
  • completion workflows
  • policies

See Guidance for assigning groups to new services to learn which method is best for your situation.

Delete rightsizing groups

When you delete a rightsizing group, its members are automatically reassigned to the default rightsizing group. It's not possible to delete the default rightsizing group, but you can disable rightsizing recommendations.

Access:

Configuration > Groups > Rightsizing

Available to:

Commander Roles of Superuser and Enterprise Admin

To delete a rightsizing group:

  1. In the Rightsizing Groups list, select a rightsizing group.
  2. Click Delete.
  3. Click Yes to confirm the deletion.

Disable rightsizing recommendations for some or all VMs

Rightsizing groups allow you to specify that certain workloads are never resized (such as a load balancer appliance). You can also disable rightsizing entirely.

Access:

Configuration > Groups > Rightsizing

Available to:

Commander Roles of Superuser and Enterprise Admin

To exclude a set of VMs from rightsizing recommendations:

  1. On the Rightsizing Groups page, click Add.
  2. In the Rightsizing Group wizard, on the Name and Description page, enter a name and an optional description.
  3. On the General page, clear Enable Recommendations.
  4. Click Next to advance through the wizard, and on the Summary page, click Finish.
  5. Assign existing VMs to this rightsizing group. See Assign existing VMs to a rightsizing group above.
  6. Ensure that new VMs with this workload type are assigned to this group. See Set the rightsizing group for new VMs above.

To disable rightsizing for a rightsizing group:

  1. Select a group in the list and click Edit.
  2. On the General page of the Rightsizing Group wizard, clear Enable Recommendations.

To completely disable rightsizing, repeat this procedure for all other rightsizing groups. You can also delete rightsizing groups.