Reserve capacity in Capacity Planner

This document explains how to create future reservation requests in Capacity Planner based on the usage of your Compute Engine resources. To learn more about future reservation requests, see About future reservation requests in the Compute Engine documentation.

You can create future reservation requests based on the actual or forecasted usage of the following Compute Engine resources:

  • Virtual machine (VM) instances

  • GPUs

Creating future reservation requests helps ensure your project, folder, or organization has the capacity needed to support increases in usage, as well as prevent potential downtime or performance issues.

Before you begin

Required roles

To get the permissions that you need to create future reservation requests, ask your administrator to grant you the following IAM roles:

For more information about granting roles, see Manage access to projects, folders, and organizations.

These predefined roles contain the permissions required to create future reservation requests. To see the exact permissions that are required, expand the Required permissions section:

Required permissions

The following permissions are required to create future reservation requests:

  • To create future reservation requests: compute.futureReservations.create on the owner project
  • To let Compute Engine auto-create reservations: compute.reservations.create on the owner project
  • To view the forecasted usage of your VMs or GPUs: capacityplanner.forecasts.list on the project, folder, or organization
  • To view the actual usage of your VMs or GPUs: capacityplanner.usageHistories.list on the project, folder, or organization
  • To summarize the actual usage of your VMs or GPUs: capacityplanner.usageHistories.summarize on the project, folder, or organization

You might also be able to get these permissions with custom roles or other predefined roles.

Limitations

Creating future reservation requests in Capacity Planner has the following limitations:

  • You can only create future reservation requests by specifying properties directly.

  • You can only specify a reservation period as follows:

    • The start and end times can only specify a time offset from Coordinated Universal Time (UTC) of +00:00.

    • The end time can't be more than six months from the current date. To specify an end time further in the future, you must modify the future reservation request after creating it, or manually edit the generated gcloud CLI commands before running them.

Overview

To reserve capacity by creating future reservation requests in Capacity Planner, complete the following steps:

  1. Choose the creation method. Choose one of the following methods based on how many machine types you want to reserve capacity for at once, and whether you want to edit a future reservation request before creating it:

    • Recommended: Generate gcloud CLI commands

      This method is useful for creating one or more future reservation requests simultaneously for various machine types. After configuring the requests in the Google Cloud console, the Google Cloud console generates the gcloud CLI commands to create them. Before running the commands, you can optionally edit their fields according to your needs; for example, to specify a recommended start time or minimum duration for the reservation period.

    • Use the Google Cloud console

      This method is useful for creating a single future reservation request for one machine type. Use the Google Cloud console to configure and create the request. You can only modify the request after creating a draft of it.

  2. Select Compute Engine resources. Select the VMs or GPUs, along with their actual and forecasted usage data, that you want to use to create your future reservation requests.

    For instructions, see Select the Compute Engine resources in this document.

  3. Create future reservation requests. After you select the Compute Engine resources, create a future reservation request using the Google Cloud console for a single machine type, or generate gcloud CLI commands to create future reservation requests for multiple machine types at once.

    For instructions, see Create future reservation requests in this document.

Select the Compute Engine resources

To select the Compute Engine resources to create future reservation requests for, do the following:

  1. In the Google Cloud console, go to the Capacity planner page.

    Go to Capacity planner

  2. Optional: To change project, folder, or organization, in the project picker at the top of the page, select a project, folder, or organization.

  3. Select one of the following Compute Engine resources:

    • To reserve capacity based on the usage of your VMs, do the following:

      1. Click the Virtual machine tab.

      2. For Machine family, select one of the following options:

        • To select a single machine family, select one of the available machine families.

        • To select all machine families, select All.

          The Machine family list on the Capacity Planner page.

    • To reserve capacity based on the usage of your GPUs, do the following:

      1. Click the GPU tab.

      2. For GPU type, select one of the following options:

        • To select a single GPU type, select one of the available GPU types.

        • To select all GPU types, select All.

          The GPU type list on the Capacity Planner page.

  4. For Location, select a region or zone.

  5. For Usage percentile, select a VM usage data percentile.

  6. For Forecast prediction interval, select a prediction interval.

  7. In the Usage and forecast by machine types table, do the following:

    1. For Usage month, select the month for the start of your future reservation requests.

    2. For Forecast start date, select the start date of your forecast. This date defaults to the first day of the next calendar month and determines the start time of your future reservation requests.

    3. For Forecast end date, select the end date of your forecast. This date defaults to the last day of the next calendar month and determines the end time of your future reservation requests.

Create future reservation requests

After you select a Compute Engine resource and its usage data in the previous section using the Google Cloud console, you can create future reservation requests for one or more machine types by completing the following steps:

  1. Specify the request name, name prefix, and auto-delete option

  2. Specify the number of VMs to reserve

  3. Specify the share type

  4. Create draft requests and submit them

Specify the request name, name prefix, and auto-delete option

If you're creating multiple future reservation requests at once by generating gcloud CLI commands, then the following properties will have matching values across all requests:

  • Auto-delete option

  • Name prefix

  • Reservation period

You can optionally customize these values for individual requests by editing the generated gcloud CLI commands.

To create future reservation requests for multiple machine types at once, select the gcloud CLI. For individual machine types, select one of the following options:

Console

  1. In the Usage and forecast by machine types table, select the machine type that you want to create a future reservation request for, and then click Create future reservation.

    The Create future reservations pane opens.

  2. For Name, enter a name for the future reservation request.

  3. For Name prefix, enter a name prefix. The names of the auto-created reservations for this request will start with this prefix.

  4. For Start time, enter the start time for the reservation period with no UTC offset. The default value is midnight (00:00).

  5. For End time, enter the end time for the reservation period with no UTC offset. The default value is midnight (00:00).

  6. In the Auto-generated reservations auto-delete section, do one of the following:

    • To automatically delete the auto-created reservations after the reservation period ends, regardless if they're fully consumed or not, do the following:

      1. Click the Enable auto-delete to the on position, if it isn't already.

      2. For Auto-delete time, specify a date and time time with no UTC offset when Compute Engine can automatically delete the auto-created reservations.

    • To prevent the auto-created reservations from being deleted after the reservation period ends, click the Enable auto-delete to the off position.

  7. Click Continue.

gcloud

  1. In the Usage and forecast by machine types table, select the machine types that you want to create a future reservation request for, and then click Generate future reservation gcloud commands.

    The Create future reservations pane opens.

  2. For Name, enter a name for the future reservation requests. If you create more than one request, then Capacity Planner names the requests as NAME-1, NAME-2, continuing up to the number of requests that you're creating.

  3. For Name prefix, enter a name prefix. The names of the auto-created reservations for this request will start with this prefix.

  4. For Start time, enter the start time for the reservation period with no UTC offset. The default value is midnight (00:00).

  5. For End time, enter the end time for the reservation period with no UTC offset. The default value is midnight (00:00).

  6. In the Auto-generated reservations auto-delete section, do one of the following:

    • To automatically delete the auto-created reservations after the reservation period ends, regardless if they're fully consumed or not, do the following:

      1. Click the Enable auto-delete to the on position, if it isn't already.

      2. For Auto-delete time, specify a date and time time with no UTC offset when Compute Engine can automatically delete the auto-created reservations.

    • To prevent the auto-created reservations from being deleted after the reservation period ends, click the Enable auto-delete to the off position.

  7. Click Continue.

Specify the number of VMs to reserve

To specify the number of VMs to reserve, do the following:

  1. For VM count based on, select one of the following options:

    • For upper bound usage, select Upper bound - P75 forecast.

    • For median usage, select Median - P50 forecast.

    • For lower bound usage, select Lower bound - P25 forecast.

    • For the average NTH percentile usage, select Average NTH percentile usage.

      Where NTH is the 50th, 75th, or 99th percentile usage you selected in the previous section.

  2. For Operator, select whether to increase or decrease the calculated usage value:

    • To increase the selected usage value, select (+) Increase.

    • To decrease the selected usage value, select (-) Decrease.

  3. For Value percentage, enter the percentage to increase or decrease the calculated usage. This affects the total number of VMs to reserve.

  4. Optional: For Total VM count, adjust the number of VMs to reserve.

  5. Optional: For Min CPU Platform and Local SSD interface based on historical usage percentage, specify a minimum CPU platform and Local SSD disk interface. The default is based on the highest percentage of usage in the past 30 days.

  6. Click Continue.

Specify the share type

To specify the share type for your future reservation requests, select the same option that you used in the previous sections:

Console

  1. For Owner project, specify the owner project.

  2. To specify the share type for the request, do one of the following:

    • To share a request across multiple projects, do the following:

      1. For Share type, select Project.

      2. For Share with, enter or select the projects to share the request with.

    • To create a single-project request, for Share type, select Local.

gcloud

  1. Specify the Owner project for each request.

  2. To specify the share type for each request, do one of the following:

    • To share a request across multiple projects, do the following:

      1. For Share type, select Project.

      2. For Share with, enter or select the projects to share the request with.

    • To create a single-project request, for Share type, select Local.

Create draft requests and submit them

After completing the steps in the previous sections, you can either create draft future reservation requests and submit them later, or immediately submit the requests for review. Google recommends creating a draft request first. This lets you determine the number of VMs that Compute Engine will provision for your request, and optionally modify the request before submitting it.

To create draft future reservation requests and submit them for review, select the same option that you used in the previous sections:

Console

  1. Click Save a draft.

    The Capacity Planner page opens. Creating the draft request can take up to a minute to complete.

  2. To submit the draft request for review, do one of the following:

gcloud

  1. Click Generate gcloud commands.

  2. In the Generate gcloud commands for future reservations pane, do the following:

    1. Optional: Edit the generated gcloud CLI commands.

    2. Copy and store the generated gcloud CLI commands. You need them later to create the future reservation requests.

  3. In the Cloud Shell or a command line of your choice, run the commands that you stored in the previous step.

    For example, the output for creating two future reservation requests is similar to the following:

    Created [https://www.googleapis.com/compute/beta/projects/example-project/zones/us-central1-c/futureReservations/example-fr-1].
    Created [https://www.googleapis.com/compute/beta/projects/example-project/zones/us-central1-f/futureReservations/example-fr-2].
    
  4. To submit the draft request for review, do one of the following:

What's next