Instance Rightsizing

Cloud providers charge you for all active Compute Instances, regardless of whether you are using the full Central Processing Unit (CPU) and memory capacity. Each underutilized instance may be costing you 50-75% in wasted cost. The Instance Rightsizing feature assesses utilization metrics to identify any instances that could be downsized, and with your approval, will take the action of switching over to a smaller instance size.

This section walks you through how to:

Configure the Instance Rightsizing Policy
Define the Scope of the Instances to Include
Define the Thresholds for Rightsizing
Define the Instance Rightsizing Actions to Take
Configure the General Instance Rightsizing Policy Options
Customize the Instance Rightsizing Policy
Review Actions Taken by the Instance Rightsizing Policy
Notify Users on How to Use the Instance Rightsizing Policy

Configure the Instance Rightsizing Policy

To configure the Instance Rightsizing Policy:

1. From the Policies screen, select the appropriate policy and click Apply.
2. Select the options to configure the policy. Our policy catalog includes solutions for both downsizing and upsizing across multiple cloud vendors.

Define the Scope of the Instances to Include

To define the scope of the instances to include:

Determine which resources to evaluate for underutilization.

To define scope using Select Accounts: Specify the list of accounts to evaluate. For example, you may wish to limit the rightsizing to non-production accounts or to any subset of accounts.
To define scope using Tag filtering: Limit the scope within the selected accounts by specifying tags. For example, if your production and non-production resources are mixed in your cloud accounts, you can leverage this tag-based filtering functionality to limit the rightsize action based on an environment tag. Instances can also be tagged with a rightsize-related tag key to mark whether they have been selected as suitable for rightsizing.

Define the Thresholds for Rightsizing

Having defined a scope, you’ll need to set percent thresholds to allow for downsize or upsize depending on which policy you have selected. You can assess both memory and CPU metrics to determine suitability, and you are able to set separate thresholds for both average and maximum utilization.

Maximum utilization will be affected directly by any spikes in CPU or memory usage. For example, CPU usage can spike during recurring weekly scans or nightly backups. In some cases these types of activities are not materially impacted if the CPU size is lower. If you are concerned about provisioning capacity to accommodate these short-lived spikes, set a high maximum free memory percent. If you are not concerned by slowed performance during periodic activity spikes, reduce the maximum percent threshold.

Depending on whether memory capacity is more critical to your applications than CPU or vice versa, you will need to set different CPU and memory thresholds.

For the majority of compute instances, a single downsize will reduce the instance’s capacity by half. Accordingly, in standard downsize cases you should select a number below 50 for the average percent to allow for downsize. For example, if you set the threshold to 40 percent, the utilization would still remain under 80 percent once downsizing has occurred.

How far you set this number below 50 will define a more or less conservative capacity buffer in the event that future usage patterns depart from the historical trend. To disregard any of the four thresholds for downsize, enter a value of -1. A blank field will be recorded as a value of 0.

For upsizing, you will configure thresholds according to the same logic to determine when to give an instance higher capacity by upsizing.

Define the Instance Rightsizing Actions to Take

To define the Instance Rightsizing actions to take:

Perform the following actions.

Configure users to be notified: Specify the list of recipients who should receive notifications about rightsizing. Add as many recipients as you like to the Email addresses of the recipients you wish to notify field. They do not need to be registered as Optima users.
Configure automated actions for the policy: Specify whether you want the recipients to receive an emailed report of downsize recommendations with no automated action, or send the report as well as taking automated action to downsize instances that meet the previously defined criteria.

Configure the General Instance Rightsizing Policy Options

To configure the general Instance Rightsizing Policy options:

Set the following standard policy configuration options when the Instance Rightsizing Policy is applied.

Frequency for policy to run: Specify the frequency the policy will perform the checks, such as weekly, daily, hourly, or every 15 minutes.
Fully automated vs approval required: Specify at the time it is applied whether the policy will take action after user approval versus automatically without user intervention. For details, see the Skip Action Approvals documentation.

Customize the Instance Rightsizing Policy

To customize the Instance Rightsizing Policy:

Policy designers can customize the Instance Rightsizing Policy definition in several ways:

Change the observation period. By default, this policy calculates utilization over a 30-day period. To calculate over a different period of time, you can update the policy template. More information on this is available in the readme.
Change the script to draw monitoring data for rightsizing from different monitoring tools. Samples are provided for tools including Cloudwatch (AWS), Stackdriver (GCE), LogAnalytics (Azure), and Datadog in the public GitHub repository.
Adjust the logic that generates the recommendations to incorporate a risk profile defined by percentiles. 
Customize the mapping for larger and smaller instance sizes. This optimization action works on a default set of standard larger and smaller instance size mappings. These can be modified in cases where users wish to take specialized factors into account, such as storage drivers, network drivers, 32/64 bit architecture, or non-standard instance mappings. The files containing predefined instance mappings for each cloud vendor can be accessed via the links below:
AWS Instance Size Relationship Mapping 
Azure Instance Size Relationship Mapping 
Google Instance Size Relationship Mapping 

Instructions for modifying the relationships, such as including cross-family recommendations, are available in the readme.

Review Actions Taken by the Instance Rightsizing Policy

These actions may occur with approval or fully automated depending on whether the policy manager has selected the Skip Action Approvals option.

Any instances that meet the conditions specified will be stopped, size changed, and restarted. The default instance mappings do not include moves between instance families that would imply major infrastructure (such as network), operating system, or cloud image changes. If the user configures a custom mapping between families, the policy action could result in image or driver incompatibilities that could cause loss of service.

To generate recommendations and automate same-sizing moves to less expensive sub-regions, apply the Cheaper Region Policy.

Notify Users on How to Use the Instance Rightsizing Policy

Once the Instance Rightsizing Policy has been configured and applied, any email addresses specified will receive an email report listing every recommendation triggered on the cadence selected in the Policy Schedule field. Users can also access this information in the Applied Policies section of the Policies menu.

The Incidents section shows any triggered recommendations.

If Skip Action Approvals has been activated, optimization actions will be taken automatically. If not, users can click into the incident and a specific account to Approve or Deny the recommended action.

Depending on user access, these policy activity summaries are visible on an account-by-account basis or, for administrators, as an organizational summary.