Committed use discounts

Compute Engine lets you purchase committed use contracts in return for deeply discounted prices for VM usage. These discounts are referred to as committed use discounts.

Committed use discounts are ideal for workloads with predictable resource needs. When you purchase a committed use contract, you purchase compute resource (vCPUs, memory, GPUs, and local SSDs) at a discounted price in return for committing to paying for those resources for 1 year or 3 years. The discount is up to 57% for most resources like machine types or GPUs. The discount is up to 70% for memory-optimized machine types. For committed use prices for different machine types, see VM instances pricing.

Committed use discount recommendations give you opportunities to optimize your compute costs by analyzing your VM spending trends with and without a committed use discount contract. By comparing these numbers, you can see how much you can save each month with a committed use contract. To learn more about how commitment recommendations work, you can also review Understanding commitment recommendations.

You can purchase a committed use contract for a single project, or purchase multiple contracts which you can share across many projects by enabling shared discounts.

After purchasing, you are billed monthly for the resources you purchased for the duration of the term you selected, whether or not you use the services. If you have a predictable workload, you can use committed use discounts to help you cut costs on resources that you need.

Committed use discounts work on most Compute Engine machine types, including predefined and custom machine types, however, f1-micro and g1-small shared-core machines are excluded. Committed use discounts are simple and flexible, and require no upfront costs. Discounts apply to the aggregate number of vCPUs, memory, GPUs and local SSDs within a region, so they are not affected by changes to your instance's machine setup.

Before you begin

How committed use discounts work

If you have just a few projects, you can purchase commitments just for the specific resources you plan to use.

For example, if you purchase a commitment for 8 cores, and you run 24 cores during the month, you will receive committed use discounts for 8 cores. The other 16 cores will be billed at standard, non-committed use rates. Keep in mind that after you purchase a set amount of commitments, you're billed for those commitments monthly, even if you don't use them. For example, if you purchase commitments for 8 cores, you're billed the committed use rates for those 8 cores for the whole month, even if you might have only run these cores for a part of the month. It is to your advantage to purchase commitments only in increments you know you will use.

Any resources that do not qualify for committed use discounts automatically qualify for sustained use discounts. You can't combine committed use discounts and sustained use discounts for the same resources.

Committed use discounts apply to both vCPUs and memory. You can buy a committed use discount for vCPUs or memory independently of one another.

Commitments can't be stacked for burst scenarios. For example, if you purchased 10 cores for the month and then ran 20 cores for half the month, commitments would not apply for the full 20 cores just because the usage was half the month.

Resources that are not covered by committed use discounts automatically qualify for sustained use discounts on a machine type family basis.

For example:

You run an n2-standard-2 for a portion of the month and run an n2-standard-8 for another portion of the same month, Compute Engine combines the two and applies sustained use discounts for the portion not covered by committed use discounts because both machine types belong to the n2-standard family.

By default, committed use discounts apply at the project level, but you can enable discount sharing from your billing account to share discounts across multiple projects.

Sharing committed use discounts across projects

Sharing your committed use discounts across all your projects reduces the overhead of managing discounts on a per-project basis, and maximizes your savings by pooling all your discounts across your projects' resource usage.

If you have multiple projects that share the same Cloud Billing account, you can enable committed use discount sharing so all of your projects within that Cloud Billing account share all of your committed use discount contracts. Your sustained use discounts are also pooled at the same time. That is, sustained use discounts are calculated using the total resources across these projects, rather than just the resources within a single project.

For example, if you purchase two commitment contracts for a total of 160 cores, and you run 200 cores during the month, you will receive committed use discounts for 160 cores across the projects that used them. The additional 40 cores will be billed at on-demand, non-committed use rates. Note that after you purchase a set amount of commitments, you're billed for those commitments monthly, even if you don't use them. For example, if you purchase commitments for 160 cores, you're billed the committed use rates for those 160 cores for the whole month, even if don't use them. See Understanding discount sharing for cost-saving utilization recommendations.

Committed use discounts are subject to Google Cloud commitment-based pricing and billing. By purchasing a committed use discount, you agree to these terms. Committed use discounts do not renew, so you must create a new commitment to continue receiving discounts.

Specifications

  • You can only purchase commitments if you have quota for commitments. Check the Quotas page to ensure you have enough quota to create a commitment. If commitments are not listed on the quotas page or you require additional quota, request a quota increase.

  • Commitments must be purchased on a per-region basis.

  • To use the gcloud tool to manage commitments, you must be running gcloud version 147.0.0 or later. To update the gcloud tool to the latest version:

    gcloud components update
    

    To check the version of the gcloud tool you are running:

    gcloud version
    
  • Any remaining vCPUs and memory that are not covered by committed use discounts are eligible for sustained use discounts.

Restrictions

  • Committed use discounts automatically apply to VMs by Google Kubernetes Engine, Dataproc, and Compute Engine. Committed use discounts do not apply to VMs created using App Engine flexible environment or Dataflow.
  • Projects that are in the free tier period with free tier credit and projects that do not have any payment history do not qualify for committed use discounts.
  • You can purchase commitments only on a per-region basis.
  • Committed use discounts apply to usage in the project or Cloud Billing account in which those discounts are purchased.
  • For commitments shared across projects under one Cloud Billing account: If any part of the commitment is unutilized, the remaining commitment charge remains in the project that purchased that portion of the commitment
  • Committed use discounts do not apply to preemptible VM instances, N1 shared-core machine types, or extended memory.
  • For committed use discounted pricing for GPUs and local SSDs, you must create a reservation when purchasing the commitment.
  • If a reservation is attached to a committed use discount, the reservation can't be deleted for the duration of the commitment.
  • You can only buy a 1-year commitment on K80 GPUs.

Pricing

Committed use discount pricing for VM instances, with or without GPUs or local SSDs, differs depending on the region. For current rates, see Pricing.

Commitment types

You can purchase commitments for the following resources.

Commitment types Resources for which you can purchase discounts Applicable to the following resource types
General purpose E2 commitments
  • vCPUs
  • Memory
All E2 machine types
General purpose N2 commitments
  • vCPUs
  • Memory
  • Local SSD
  • All N2 machine types
  • Sole-tenant nodes
General purpose N2D commitments
  • vCPUs
  • Memory
  • Local SSD
All N2D machine types
General purpose N1 commitments
  • vCPUs
  • Memory
  • GPUs
  • Local SSD
  • N1 machine types, excluding shared-core.
  • Sole-tenant nodes
  • GPUs:
    • NVIDIA® Tesla® V100
    • NVIDIA® Tesla® P100
    • NVIDIA® Tesla® P4
    • NVIDIA® Tesla® K80
Compute-optimized commitments
  • vCPUs
  • Memory
Compute-optimized machine types
Memory-optimized commitments
  • vCPUs
  • Memory
Memory-optimized machine types

You can't purchase commitments for f1-micro, or g1-small machine types or for the sole-tenant premium charge.

Commitments for machine types

Purchase the appropriate commitment type for the machine types you are using. Discounts for general-purpose commitments are applied to resources in the following order:

  1. E2,N2, N2D, or N1 custom machine types, depending on which commitment you purchase
  2. Sole-tenant nodes
  3. Either the E2, N2, N2D, or N1 predefined machine types, depending on which commitment you purchase

When you purchase general-purpose commitments, you pick which generation the commitment applies to. For example, if you purchase general-purpose E2 commitments, they only apply to E2 machine types. Similarly, if you purchase general-purpose N2, N2D, or N1 commitments, the commitments never overlap.

For example, assume you have a region with the following mix:

  • 10 N2 custom machine type vCPUs
  • 30 GB of custom machine type memory
  • 2 n2-standard-4 predefined machine types

You purchase N2 commitments for 15 vCPUs and 13.5 GB of memory for committed use. The committed use discounts would be applied first to the N2 custom machine types, and any remaining discounts would be applied to the N2 predefined machine types. In this case, all 10 vCPUs of the N2 custom machine types would be charged at committed use prices, and 13.5 GB of custom machine type memory would be charged at committed use prices.

Finally, the remaining 5 vCPUs of committed use would apply to 5 random vCPUs across the two n2-standard-4 machine types. Any resources that aren't covered by committed use discounts would qualify for sustained use discounts.

To purchase a commitment for general-purpose machine types, see Purchasing commitments for machine types.

Memory-optimized commitments

Purchase memory-optimized commitments if you intend to use memory-optimized machine types. To purchase a commitment for memory-optimized machine types, see Purchasing commitments for machine types.

Compute-optimized commitments

Purchase compute-optimized commitments if you intend to use compute-optimized machine types. To purchase a commitment for compute-optimized machine types, see Purchasing commitments for machine types.

Commitments for GPUs and local SSD

To purchase commitments for GPUs or local SSDs, you must also reserve the resources when purchasing the commitment. Reserving these resources is required to ensure that the resources are always available for you (whether you use them or not). There are no additional charges for reserving the resources.

You must purchase commitments by specific GPU types. For example, you can purchase GPUs for either Tesla P100s or Tesla V100s, but you can't purchase commitments for Tesla P100 GPUs and apply them to other GPU types.

To purchase a commitment for GPUs and local SSDs, see Purchasing commitments for GPUs and local SSD.

For more information about reservations, see Reserving zonal resources.

Requesting quota for commitments

You can only purchase commitments if you have quota for commitments. Check the Quotas page to ensure you have enough quota to create a commitment.

When making a request using the gcloud tool or the API, the server returns the following error if you have no commitment quota:

"Quota 'COMMITMENTS' exceeded. Limit: 0.0"

To check quota in the Cloud Console

  1. In the Google Cloud Console, go to the Quotas page.

    Go to Quotas

  2. In the Quota type list, select All quotas.

  3. In the Metric list, select None to hide all quotas, and then type commitments in the search box to search for Commitments quota.

  4. Select Commitments from the results list.

    Commitments.

  5. Check the quota for commitments in your desired region. If you do not have quota for a commitment, the Limit is 0.

    No commitments.

To request quota for commitments

  1. In the Google Cloud Console, go to the Quotas page.

    Go to Quotas

  2. In the Quota type list, select All quotas.

  3. In the Metric list, select None to hide all quotas, and then type commitments in the search box to search for Commitments quota.

  4. Select Commitments from the results list.

    Commitments.

  5. Select the checkbox next to the service commitment in the region you want to add quota to.

  6. Click the Edit quotas button.

  7. If prompted, enter your Name, Email, and Phone. Click Next.

  8. Enter the quota limit you want and provide a description for the request. Click Done.

  9. Click Submit request to submit your request.

Increasing committed resource quotas

If you do not have enough quota for Committed CPUs, Committed local SSDs, or Committed GPUs (for example, for Committed NVIDIA V100 GPUs), request a quota increase from the Quotas page. To utilize the commitment, you also need sufficient resource quota (for example, NVIDIA V100 GPUs). You can request these quota increases at any time.

Purchasing commitments for machine types

You can purchase commitments for machine types by using the Cloud Console, the gcloud command-line tool, or programmatically, through the API. To purchase commitments for GPUs or local SSDs, see Purchasing commitments for GPUs and local SSDs.

By default, project owners have permission to purchase committed use discount contracts. However, it's possible for owners to create custom roles that include or exclude certain users. Read about access control to ensure you have permission to purchase a committed use discount contract.

After purchasing a commitment, the commitment is effective starting at midnight the following day. For example, a commitment purchased on Monday afternoon at 3 PM PST becomes effective on Tuesday at 12 AM PST. The discounts are automatically applied to applicable instances in the region you specified.

After a commitment is purchased, you can't cancel the commitment.

Console

  1. In the Google Cloud Console, go to the Committed use discounts page.

    Go to Committed use discounts

  2. To purchase a new commitment, click Purchase commitment.

  3. Name your commitment.

  4. Choose the region where you want it to apply.

  5. Choose the Commitment type:
    General-Purpose E2 for E2 machine types
    General-Purpose N2 for N2 machine types
    General-Purpose N2D for N2D machine types
    General-Purpose N1 for N1 machine types
    Compute-optimized for compute-optimized machine types
    Memory-optimized for memory-optimized machine types

  6. Choose a commitment Duration of 1 or 3 years.

  7. Enter the quantity of Cores or Memory that you want to purchase. There is no lower limit, the number can be zero. The quantity for cores must be entered as a whole number equal to or greater than zero. Memory can be purchased in increments of 0.25 GB.

  8. Read the terms of purchase.

  9. Click the Purchase button to purchase the commitment.

gcloud

Using the gcloud tool, run the gcloud beta compute commitments create command:

gcloud beta compute commitments create COMMITMENT_NAME \
    --region REGION \
    --resources vcpu=NUMBER_VCPUS,memory=MEMORY \
    --plan DURATION \
    --type COMMITMENT_TYPE

Replace the following:

  • COMMITMENT_NAME: the name you want to identify this commitment with.
  • REGION: the region this commitment applies to. Each region has different commitment prices. For current prices, see the price sheet.
  • NUMBER_VCPUS: the number of vCPUs you are willing to purchase commitments for. The number of vCPUs must be an integer of 0 or more and can be even or odd.
  • MEMORY: the amount, in MB or GB, of memory you are willing to purchase commitments for. For example, 1000MB. If the units are not specified, the default unit used is GB. Memory can be purchased in increments of 0.25 GB.
  • DURATION: the term of the commitment, either 12-month or 36-month.
  • COMMITMENT_TYPE: one of:

    • general-purpose-e2 for general purpose E2 machine type commitments.
    • general-purpose-n2 for general purpose N2 machine type commitments.
    • general-purpose-n2d for general purpose N2D machine type commitments.
    • general-purpose for general purpose N1 machine type commitments.
    • compute-optimized for compute-optimized commitments.
    • memory-optimized for the memory-optimized commitments.

      If you do not specify the --type flag, the default value used is general-purpose.

To create a general-purpose commitment for N1 machine types, you might use the following example:

gcloud compute commitments create example-commitment --region us-central1 \
    --resources vcpu=5,memory=33280MB --plan 12-month

To create a compute-optimized commitment, use the gcloud compute commitments create command, which purchases a 1 year commitment for a compute-optimized machine type:

gcloud compute commitments create example-compute-optimized-commitment \
    --region us-central1 --resources vcpu=2,memory=3814GB --plan 12-month \
    --type compute-optimized

To create a memory-optimized commitment:

gcloud compute commitments create example-memory-optimized-commitment \
    --region us-central1 --resources vcpu=96,memory=1434MB \
    --plan 12-month --type memory-optimized

To create a GPU or local SSD commitment, you must create a reservation when purchasing the commitment by using the gcloud compute commitments create command. For example, the following commitment includes 4 GPUs and a reservation for those GPUs to be used in 2 instances in us-central1-a.

gcloud compute commitments create example-reservation-commitment \
    --region=us-central1 \
    --resources=vcpu=96,memory=624GB \
    --resources-accelerator=type=nvidia-tesla-v100,count=4 \
    --plan 12-month \
    
    --reservation=reservation-01 \
    --reservation-zone=us-central1-a \
    --machine-type=n1-standard-32
    --accelerator=type=nvidia-tesla-v100,count=2 \
    --vm-count=2
    

API

In the API, make a POST request to the following URL, with a request body that contains information about the commitment:

https://compute.googleapis.com/compute/beta/projects/PROJECT_ID/regions/REGION/commitments?requestId=OPTIONAL_UNIQUE_ID

The resource body should contain:

  • name for the name of the commitment.
  • plan for the term of the commitment, either TWELVE_MONTH or THIRTY_SIX_MONTH.
  • resources to specify the amount of memory and vCPU. Memory must be be specified in MB. You must specify both VCPU and MEMORY in the resources section.
  • type of commitment, either GENERAL_PURPOSE_E2,GENERAL_PURPOSE_N2 GENERAL_PURPOSE_N2D,GENERAL_PURPOSE, COMPUTE_OPTIMIZED or MEMORY_OPTIMIZED.

For example, the following creates a commitment for 1 year with 5 vCPUs and 18.75 GB of memory:

{
  "name": "example-commitment",
  "plan": "TWELVE_MONTH",
  "type": "GENERAL_PURPOSE",
  "resources": [
    {
    "amount": "5",
    "type": "VCPU"
    },
    {
    "amount": "19200",
    "type": "MEMORY"
    }
  ]
}

To create a memory-optimized commitment, include the type property. The following example shows a purchase of a 1 year commitment for an m1-megamem-96 machine type:

{
  "name": "example-memory-optimized-commitment",
  "plan": "TWELVE_MONTH",
  "type": "MEMORY_OPTIMIZED",
  "resources": [
    {
    "amount": "96",
    "type": "VCPU"
    },
    {
    "amount": "1434",
    "type": "MEMORY"
    }
  ]
}

To create a compute-optimized commitment, include the type property. The following example, purchases a 1 year commitment for a c2-standard-16 machine type:

{
  "name": "example-compute-optimized-commitment",
  "plan": "TWELVE_MONTH",
  "type": "COMPUTE_OPTIMIZED",
  "resources": [
    {
    "amount": "16",
    "type": "VCPU"
    },
    {
    "amount": "1434",
    "type": "MEMORY"
    }
  ]
}

Purchasing commitments for GPUs and local SSDs

To purchase a commitment for GPUs or local SSDs:

  • You must purchase a general-purpose N1 commitment. GPUs are only supported with N1 machine types.
  • You must create a reservation that includes either GPUs or local SSDs at the same time when you are purchasing your commitment.
  • You do not need to commit to vCPUs or memory.

You must purchase commitments for specific GPU types. For example, you might purchase either Tesla P100s or Tesla V100s, but you cannot purchase commitments for Tesla P100 GPUs and expect to apply them to other GPU types.

The amount of GPUs and local SSDs that you reserve must be equal to the amount that you commit to. For example, if you want to reserve 4 V100 GPUs, then you must also commit to 4 V100 GPUs. However, the amount of vCPU and memory that you reserve can be more or less than what you commit to.

If you only want to commit to GPUs or local SSDs, you can specify 0 for vCPU and memory commitments. But the reservation that you attach to your commitment must contain the same GPUs and local SSDs as the commitment, as well as the machine types (with vCPUs and memory) that you want to reserve.

Purchase a commitment with an attached reservation using the Cloud Console, the gcloud tool, or the API.

Console

  1. In the Google Cloud Console, go to the Committed use discounts page.

    Go to Committed use discounts

  2. To purchase a new commitment, click Purchase commitment.

  3. Name your commitment, and choose the region where you want it to apply.

  4. For Commitment type, select General Purpose.

  5. Choose a commitment Duration of 1 or 3 years.

  6. Enter the quantity of Cores and Memory that you want to purchase. If you only want to commit to and reserve GPUs or local SSDs without committing to vCPUs and memory, specify 0 for the vCPU and memory commitment quantities.

  7. Click Add GPUs and select the GPU type and Number of GPUs that you want to commit to.

  8. Click Add local SSD and specify the number of disks that you want to commit to.

  9. Click Add new reservation to create one or more reservations for instances that will use the GPUs and local SSDs.

    1. Name your reservation.
    2. Under Use with VM instance:
      • If you want to use this reservation's resources only when creating matching instances that specifically target this reservation by name, select Select specific reservation.
      • If you want matching instances to automatically use this reservation, select Use reservation automatically.
    3. Choose the Zone where you want to reserve resources.
    4. Specify the Number of VM instances that you want to reserve.
    5. Specify the resources that you want to reserve for each instance:
      • If you have an instance template, click Use instance template and select an instance template from the list.
      • Otherwise, click Specify machine type.
        1. Click Customize to use the slider to select the Cores and Memory for your machine type.
        2. Specify the CPU platform.
        3. To add GPUs, enter the number of GPUs and the GPU type.
        4. Optionally, specify the number of Local SSDs that you want to add to each instance and specify the Interface type to use.
    6. Click the Done button to create the reservation.
  10. Click the Purchase button to purchase the commitment.

  11. Read the terms of purchase and click Purchase when you are ready to purchase the commitment.

gcloud

Use the gcloud compute commmitments create command to purchase a commitment, and include flags to create an attached reservation.

For example, the following commitment includes 4 GPUs and a new reservation for those 4 GPUs to be used across 2 n1-standard-32 instances in us-central1-a.

gcloud compute commitments create commitment-01 \
    --region=us-central1 \
    --resources=vcpu=96,memory=624GB \
    --resources-accelerator=type=nvidia-tesla-v100,count=4 \
    --plan 12-month \
    --reservation=reservation-01 \
    --reservation-zone=us-central1-a \
    --machine-type=n1-standard-16 \
    --accelerator=type=nvidia-tesla-v100,count=2 \
    --vm-count=2

If you want to commit to and reserve GPUs or local SSDs without committing to vCPUs and memory, specify 0 for the vCPU and memory commitment quantities.

gcloud compute commitments create commitment-01 \
    --region=us-west2 \
    --resources=vcpu=0,memory=0 \
    --resources-accelerator=type=nvidia-tesla-p4,count=1 \
    --plan 12-month \
    --reservation=reservation-01 \
    --reservation-zone=us-west2-b \
    --machine-type=n1-standard-2 \
    --accelerator=type=nvidia-tesla-p4,count=1 \
    --vm-count=1

To create multiple reservations when purchasing a commitment, use a YAML file that contains the reservation properties. For example:

gcloud compute commitments create commitment-01 \
    --region=us-central1 \
    --resources=vcpu=96,memory=624,local-ssd=750 \
    --resources-accelerator=type=nvidia-tesla-v100,count=1 \
    --plan 12-month \
    --reservations-from-file=YAML_FILE

For example, the following YAML file contains 2 reservations. The first reservation, res-01, contains 1 n1-standard-2 instance with 1 GPU, and it is a targeted reservation, which means that you must specifically target that reservation by name to use its reserved instances. The second reservation, res-02, contains 1 n1-standard-2 VM instance with 2 types of attached local SSDs.

‐ reservation: res-01
  reservation_zone: us-central1-a
  require_specific_reservation: true
  vm_count: 1
  machine_type: n1-standard-2
  accelerator:
  ‐ count: 1
    type: nvidia-tesla-v100
‐ reservation: res-02
  reservation_zone: us-central1-a
  vm_count: 1
  machine_type: n1-standard-2
  local_ssd:
  ‐ interface: scsi
    size: 375
  ‐ interface: nvme
    size: 375

API

Use the regionCommitments.insert method and include the reservations field to define the reservation's properties. For example, the following commitment includes 4 GPUs and a reservation for those 4 GPUs to be used across 2 instances in us-central1-a.

POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/commitments

{
  "name": "commitment-01",
  "plan": "TWELVE_MONTH",
  "resources":
  [
    {
      "amount": "96",
      "type": "VCPU"
    },
    {
      "amount": "638976",
      "type": "MEMORY"
    },
    {
      "acceleratorType": "nvidia-tesla-v100",
      "amount": "4",
      "type": "ACCELERATOR"
    }
  ],
  "reservations":
  [
    {
      "name": "reservation-01",
      "specificReservation":
      {
        "count": "2",
        "instanceProperties":
        {
          "guestAccelerators":
          [
            {
              "acceleratorCount": 2,
              "acceleratorType": "nvidia-tesla-v100"
            }
          ],
          "machineType": "n1-standard-8"
        }
      },
      "specificReservationRequired": false,
      "zone": "us-central1-a"
    }
  ]
}

If you only want to commit to and reserve GPUs or local SSDs without committing to vCPUs and memory, specify 0 for the vCPU and memory commitment quantities. For example:

POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/commitments

{
  "name": "commitment-01",
  "plan": "TWELVE_MONTH",
  "resources":
  [
    {
      "amount": "0",
      "type": "VCPU"
    },
    {
      "amount": "0",
      "type": "MEMORY"
    },
    {
      "acceleratorType": "nvidia-tesla-v100",
      "amount": "4",
      "type": "ACCELERATOR"
    }
  ],
  "reservations":
  [
    {
      "name": "reservation-01",
      "specificReservation":
      {
        "count": "2",
        "instanceProperties":
        {
          "guestAccelerators":
          [
            {
              "acceleratorCount": 2,
              "acceleratorType": "nvidia-tesla-v100"
            }
          ],
          "machineType": "n1-standard-8"
        }
      },
      "specificReservationRequired": false,
      "zone": "us-central1-a"
    }
  ]
}

The commitment is successfully created only if there are enough resources in the target zone, and sufficient quota, at the time of the request.

When you create a commitment with an attached reservation, you cannot delete the reservation for the duration of the commitment. When your commitment expires, Compute Engine automatically deletes any attached reservations.

If you need to transfer GPUs or local SSDs across committed reservations, see Modifying reservations that are attached to commitments.

Purchasing commitments for SLES for SAP premium images

If you run your SAP workloads on VMs running SUSE Linux Enterprise Server (SLES) for SAP, purchasing a committed use discount for your SAP licenses can result in significant cost savings.

When you purchase commitments, they form a "pool" of licenses that automatically apply to your running VM instances within a selected project in a specified region. Discounts apply to any active VMs while VMs spin up and down, so the commitment is not tied to any one particular VM.

For example, you have 10 VMs running in two regions: 5 VMs in us-central1, and 5 VMs in us-west1 under the same project ID. You must purchase 5 licenses in each region to cover those running VMs. You can apply the licenses to any 5 concurrently running VMs at any time during the year in those regions. You are billed monthly for the commitment regardless of your usage.

When commitments expire, your running VMs continue to run at on-demand rates. After you purchase a commitment, you can't cancel it.

To purchase a commitment for your SAP license you must:

  • Purchase a license commitment. You can't edit an existing commitment.
  • Purchase a commitment for 1 or 3 years.

Purchase an SAP SLES license commitment using the Google Cloud Console, the gcloud command-line tool, or the Compute Engine API.

Console

  1. In the Cloud Console, go to the Committed Use Discounts page.

    Go to the Committed Use Discounts page

  2. Click Purchase commitment to purchase a new commitment.
  3. Click New license committed use discount to purchase a new license commitment.
  4. Name your commitment and choose the region where you want it to apply.
  5. Choose a duration amount of the commitment, either 1 or 3 years.
  6. Choose a License family.
  7. Choose the License type and quantity.
  8. Choose the Number of licenses.
  9. Click Purchase.

gcloud

Using the gcloud tool, run the gcloud compute commitments create-license command to purchase a license commitment.

For example, the following commitment is for an SAP SUSE license for 2 cores for 12 months in the us-central1 region.

gcloud compute commitments create-license COMMITMENT_NAME \
    --license https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_TYPE
    --amount NUMBER_OF_LICENSES \
    --cores-per-license CORES_PER_LICENSE \
    --plan PLAN \
    --region REGION \

Replace the following:

  • COMMITMENT_NAME: the name for your commitment.
  • LICENSE: the license URI. For example: https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_TYPE
  • NUMBER_OF_LICENSES: the number of licenses you plan to purchase.
  • CORES_PER_LICENSE: the number of cores per license Enter 1-2 3-4, or 5+.
  • PLAN: enter the plan length: 12-month or 36-month.
  • REGION: the region where this commitment applies.
  • LICENSE_TYPE: the SAP license type.

API

Use the regionCommitments.insert method and include the licenseResource field to define the commitment's properties. For example, the following commitment includes 4 cores per license, a total of 4 licenses, and the public URI to the example's license resource.

POST https://compute.googleapis.com/compute/beta/projects/PROJECT_ID/regions/REGION/commitments?requestId=OPTIONAL_UNIQUE_ID

{
    "licenseResource":
      "coresPerLicense": "3-4",
      "amount": 4,
      "license": "https://www.googleapis.com/compute/v1/projects/suse-sap-cloud/global/licenses/sles-sap-12"
    }
}

Applying committed use discount recommendations

Committed use discount recommendations are available in the Google Cloud Console. The Recommender generates a card with information about your VM usage over the last 30 days. If your VMs show a trend of uncommitted usage over 30 days, the Recommender classifies this as an opportunity to purchase committed use discounts to reduce your VM costs. You can read more about committed use recommendations at Understanding commitment recommendations in the billing documentation.

Usage is considered uncommitted and eligible if the following is true.

  • The VM was active for the entire duration of the 30 days.
  • The VM's SKU is part of an eligible committed use discount bucket.
  • The VM's usage was not already covered by an existing commitment.

Recommendations are refreshed once per day and take the last 30 days of usage history into consideration.

Limitations

Committed use discount recommendations are available for the CPU and memory component of machine type commitments only. Committed use discount recommendations are not available for SSD, GPU or license commitments.

Reviewing and accepting a recommendation

From the Google Cloud Console dashboard:

  1. Select your project name.
  2. Click Recommendations. The Recommender card displays Recommended Compute Engine Commitments.
  3. Click the linked recommendation to open the card and view your estimated savings with a committed use discount contract.
  4. Toggle between 1-year and 3-year to see your savings. For a more complete description of the card's information, see Reading recommendation summary cards.
  5. Click Continue to purchase at the bottom of the card to proceed with the committed use contract.
  6. Complete the process to purchase a commitment.

If you have more than one VM that can benefit from a committed use discount, you can click View all from the card and review each VM individually.

Dismissing a recommendation

If you don't want to see your recommendations, you can dismiss them by specific VM or dismiss the entire card. You must restore recommendations to see them again.

Turning on committed use discount sharing

By default, committed use discounts are applied to the project from which you purchased it. To share the discount across multiple projects linked to your Cloud Billing account, enable committed use discount sharing from the console.

You must have specific permissions to access billing account information. Read the Overview of Cloud Billing access control document for specifics.

  1. Sign in to Cloud Billing in the Google Cloud Console.

    Sign in to Cloud Billing

    If you have more than one Cloud Billing account, do one of the following:

    • To manage Cloud Billing for the current project, select Go to linked billing account.
    • To locate a different Cloud Billing account, select Manage billing accounts and then choose the account that you want to manage.
  2. From the Billing navigation menu, select Commitments.

  3. Click on view committed use discount analysis.

  4. Select Commitment Scope from the top of the page.

    • Project scope is the default option when you select committed use discounts for a specific project. To change your setting, you must enable shared billing.
  5. Type Enable in the text entry box to enable Billing account scope commitments.

  6. Click Enable Billing Account Scope to save your changes.

When you enable committed use discount sharing, all of your current active committed use discounts in all the projects under the same Cloud Billing account, including those you previously purchased and new ones you purchase in the future are shared across your Cloud Billing account. Your sustained use discounts are also pooled and shared across all projects within your Cloud Billing account. When you change your commitment scope configuration, the change takes effect on the following day at midnight Pacific Standard Time (PST).

To gain a better understanding of how committed use discounts impact and appear on your bill, see Understanding your bill with committed use discounts.

Combining reservations with commitments

A committed use discount provides a 1- or 3-year discounted price agreement, but it does not reserve capacity in a specific zone. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. By combining a reservation with a commitment, you get discounted, reserved resources.

To purchase a commitment and get discounted prices for GPUs and local SSDs, create a reservation when purchasing the commitment. For these resources, the location and size of the reservation can't be changed for the duration of your commitment.

For information about reservations, see Combining reservations with committed use discounts.

Modifying a commitment

After you purchase a commitment, you can't change it. If you need to modify a commitment, purchase a new commitment with a new expiration date for the incremental amount.

For example, if you want to increase the amount of vCPUs for a commitment from 10 vCPUs to 15 vCPUs, purchase a new commitment for the difference. In this case, purchase a new commitment for 5 vCPUs.

You can't decrease the resources already purchased in a commitment. For example, you can't change a commitment for 15 vCPUs to 10 vCPUs.

Viewing active commitments

View commitments in the console or the API.

Console

In the Google Cloud Console, view a list of commitments in the Committed use discounts page.

Go to Committed use discounts

gcloud

Make a request using the commitments list command:

gcloud compute commitments list

The tool returns a list of commitments:

 NAME              REGION    END_TIMESTAMP                  STATUS
 my-commitment     us-east1  2018-03-17T00:00:00.000-07:00  NOT_YET_ACTIVE

API

You can get a list of commitments across all regions by making an aggregatedList request to the following URL:

https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/aggregated/commitments

Which returns a list of commitments:

"commitments": [
{
  "kind": "compute#commitment",
  "id": "3294122326373778983",
  "creationTimestamp": "2017-02-09T15:18:32.411-08:00",
  "name": "example-commitment",
  "region": "https://www.googleapis.com/compute/v1/projects/example-project/regions/us-central1",
  "selfLink": "https://www.googleapis.com/compute/v1/projects/example-project/regions/us-central1/commitments/example-commitment",
  "status": "NOT_YET_ACTIVE",
  "statusMessage": "The commitment is not yet active (its startTimestamp is in the future). It will not apply to current resource usage.",
  "plan": "TWELVE_MONTH",
  "startTimestamp": "2017-02-10T00:00:00.000-08:00",
  "endTimestamp": "2018-02-10T00:00:00.000-08:00",
  "resources": [
    {
      "type": "VCPU",
      "amount": "5"
    },
    {
      "type": "MEMORY",
      "amount": "32500"
    }]
  }
]

A commitment can have one of the following statuses:

  • CREATING: the commitment is being created.
  • NOT_YET_ACTIVE: the commitment has been created but is not yet active. Commitments are effective at midnight the following day.
  • ACTIVE: the commitment is active.
  • EXPIRED: the commitment has expired. Compute Engine reserves the right to remove expired commitments that are older than 210 days from the expiration date.

Canceling a commitment

After you create a commitment, you can't cancel it. You must pay the agreed upon monthly amount for the duration of the commitment. Commitments are not affected by future pricing changes to the standard prices for Compute Engine resources.

If you accidentally purchased a commitment or made a mistake configuring your commitment, contact Google Cloud billing support for help.

Understanding your bill with committed use discounts

Read the following documents to gain a better understanding of your billing:

Support

If you have any questions regarding committed use discounts on your bill, you can contact Google Cloud support.

What's next