Resource-based committed use discounts

Compute Engine provides resource-based committed use discounts (CUDs)for your predictable workloads to help you cut costs on resources that you need.You can purchase resource-based committed use contracts, orcommitments,in return for heavily discounted prices for VM usage.

This document provides information about resource-based commitments, includinghow to purchase these commitments and how the resulting CUDs apply.

To learn about spend-based CUDs for Compute Engine, seeCompute flexible CUDs.

Resource-based commitments are ideal for predictable and steady state usage.Compute Engine lets you purchase the following categories ofresource-based commitments:

Commitments for hardware resources are separate from commitments for licenses.You can purchase both categories of commitments for a VM instance, but youcannot purchase a single commitment that covers both hardware resources andlicenses.

Before you begin

About resource-based commitments

When you purchase a resource-based commitment, you commit to purchasing aminimum amount of specific Compute Engine resources—such as vCPUs,memory, GPUs, Local SSD disks, and sole-tenant nodes—for a minimum of oneor three years. In return for your commitment to pay for these resources, youreceive these resources at discounted prices for the duration of yourcommitment's term. The percentage of discount that you receive off on-demandprices is also referred to as the committed use discount rate, or CUD rate.These discounts are as follows:

  • vCPUs and memory: you can receive up to 55% discount off on-demandprices for most machine types. For some machine types, you can receive up to70% discount off on-demand prices.
  • GPUs: you can receive to 55% discount off on-demand prices for most GPUtypes. For some GPU types, you can receive up to 65% discount off on-demandprices.
  • Local SSD disks: you can receive up to 55% discount off on-demand prices.
  • OS licenses: you can receive up to 79% discount off on-demand prices.

The exact discount rates and the duration for which you receive thosediscounts depend on the following properties that you specify when you purchaseyour commitment:

To compare on-demand and discounted rates of hardware resources,seeVM instances pricing.To compare on-demand and discounted rates of software OS licenses, seeDisk and image pricing.

Commitment lifecycle

You purchase a commitment by specifying the following properties, at a minimum:

  • Types and numbers of resources that you agree to pay for
  • Region where you agree to use the committed resources
  • The minimum time period for which you agree to pay for the resources

After you complete the purchase, you must wait until your commitment becomesactive before you can start receiving CUDs. Your commitment becomes active at12:00 AM US and Canadian Pacific Time the day after the purchase.Depending on daylight saving time, this time is equivalent to UTC-8(Pacific Standard Time), or UTC-7 (Pacific Daylight Time). For example,suppose you purchase your commitment at 3:45 PM US and Canadian Pacific Time(UTC-8) on December 1, 2024. In this scenario, your commitment becomes activeat 12:00 AM US and Canadian Pacific Time (UTC-8) on December 2, 2024.

Important: Resource-based commitments are subject to Google Cloudcommitment-based pricing and billing.By purchasing a commitment, you agree to these terms. After you purchase acommitment, you can't cancel or delete it. The commitment remains active untilits specified end date. For more information, seeCancel a commitment.

Compute Enginemaintains a lien on your project for each region in yourproject where you purchase a commitment. When you purchasea new commitment for any region in your project,Compute Engine associates the lien for that region withthe newly created commitment.

After your commitment becomes active, you start paying the discounted pricesof your committed resources. You continue to pay these prices on an hourly basisuntil your commitment's end date, regardless of whether or not you usethose resources. As you use Compute Engine resources,Google Cloud utilizes your commitment on an hourly basis to cover thecosts of any eligible resource usage. Google Cloud continues to utilizeyour commitment either until the commitment expires or gets fully utilized.

Commitment plan

When you purchase a commitment, you choose between a1-year or3-year plan. The plan functions as the commitment tier;it determines both the minimum period for which you must commit topaying for resources, and the CUD rate that you receive.A 3-year plan typically offers a higher CUD rate than a 1-year plan.Commitments are often referred to by their plan—for example, as1-year commitments or3-year commitments.

Commitment term

A commitment's term is the specific period during which the commitment isactive. The duration of this term must be at least as long as the period definedby the commitment's plan (1 or 3 years), but can be longer. This durationrepresents the time for which you agree to pay for the committed resources.

By default, your commitment expires at the end of its term. However, you canautomatically renew your commitment for additional terms by enablingauto-renewal.After you enable auto-renewal, at the end of each term, Compute Engineautomatically renews the commitment for a new term. Your commitment continuesto renew for new terms until you manually disable auto-renewal. By default, theduration of each renewed term matches the minimum duration required by thecommitment's plan, either 1 or 3 years.

Difference between term and plan

A commitment'splan (1 year or 3 years) determines the preset time durationand the CUD rate, whereas itsterm determines how long the commitmentactually remains active. By default, a commitment's plan and term are identical.However, you canextend the termbeyond the preset duration specified by the plan. If you extend the term, thenyour commitment remains active for a custom duration, but retains the CUDrate associated with its plan. You can extend commitment terms as follows:

  • Commitments with a 1-year plan can have term durations starting from 1 yearand less than 3 years.
  • Commitments with a 3-year plan can have term durations starting from 3years and less than 6 years.

To summarize, your commitment's term and plan function as follows:

  • You get to use the committed resourcesat discounted prices as determined by your plan.
  • You must pay these discounted pricesfor the entire duration of your commitment's term, regardless ofwhether or not you use them.

Start and end times of a commitment

A commitment's term represents the active lifecycle of a commitment and eachterm has a start time and an end time. Terms always start and end at 12:00 AMUS and Canadian Pacific Time on their respective start and end dates. Dependingon daylight saving time, this time is equivalent to UTC-8(Pacific Standard Time), or UTC-7 (Pacific Daylight Time).

The start time of a commitment's term can be one of the following, depending onwhether it is a new or an existing commitment:

  • Fornew commitments, the start time is the same as the activation time,which is 12:00 AM US and Canadian Pacific Time on the day following yourpurchase.

    For example, suppose you purchase your commitment at 3:45 PM US and CanadianPacific Time on January 1, 2025. In this scenario, your commitment startsat 12:00 AM US and Canadian Pacific Time on January 2, 2025.

  • Foran existing commitment that has auto-renewal enabled, the starttime of the new term is the same as the end time of the previous term:12:00 AM US and Canadian Pacific Time.

    For example, suppose the end time of your commitment's ongoing term is12:00 AM US and Canadian Pacific Time on January 1, 2026. If auto-renewal isenabled, then a new term automatically begins at 12:00 AM US and CanadianPacific Time on January 1, 2026.

The end time of a commitment's term can be one of the following, depending onyour commitment's configuration:

  • Default: When you don't extend a commitment's term or enableauto-renewal, the default end time for that term is at 12:00 AM US andCanadian Pacific Time, exactly one or three years after the start time,depending on whether you chose a 1-year or 3-year commitment plan.

    For example, suppose your commitment starts at 12:00 AM US and CanadianPacific Time on January 1, 2025.

    • With a 1-year plan, the default end time is 12:00 AM US and CanadianPacific Time on January 1, 2026.
    • With a 3-year plan, the default end time is 12:00 AM US and CanadianPacific Time on January 1, 2028.
  • Auto-renewal: If you enable auto-renewal, then the commitmentautomatically renews for additional terms. Each renewed term has a durationequal to the commitment's plan (1 or 3 years), and the end time of eachsubsequent term is at 12:00 AM US and Canadian Pacific Time, one or threeyears after the start time of that renewed term.

    For example, suppose your 1-year commitment starts at 12:00 AM US andCanadian Pacific Time on January 1, 2025. With auto-renewal enabled, thecommitment has its subsequent term ending at 12:00 AM US and CanadianPacific Time on January 1 of each subsequent year.

  • Extended term: If youextend the term,the end time is at 12:00 AM US and Canadian Pacific Time on the custom enddate you specify. This custom end date must be within the allowed rangefor your commitment's plan (for example, less than 3 years for a 1-yearplan, or less than 6 years for a 3-year plan).

    For example, you could extend a commitment with a 1-year plan to end 2 yearsafter its start date, at 12:00 AM US and Canadian Pacific Time on that date.

Commitment status

Depending on the stage of the commitment's lifecycle, your commitment can haveone of the following statuses:

  • CREATING: the commitment is being created.
  • NOT_YET_ACTIVE orPENDING: the commitment has been created but is not yetactive. Compute Engine creates your commitments with this status.

    • If you're using the Google Cloud CLI or the REST API to purchase yourcommitment, then this status value shows asNOT_YET_ACTIVE.
    • If you're using the Google Cloud console to purchase your commitment, thenthis status value shows asPENDING.
  • ACTIVE: the commitment is active.

  • EXPIRED: the commitment has expired. Compute Engine reserves theright to remove expired commitments that are older than 210 days from theexpiration date.

  • CANCELED: Compute Engine canceled the commitment. Compute Enginechanges the status of your commitments toCANCELED when you combine themto create a newmerged commitment.

Between the time of your commitment purchase and its activation time, thestatus of your commitment remains asNOT_YET_ACTIVE (or asPENDING on theGoogle Cloud console). After activation, the status of your commitment changes toACTIVE.For example, suppose you purchase your commitment on January 20, 2024, at 10:00 PMUS and Canadian Pacific Time (UTC-8 or UTC-7). Compute Engine creates yourcommitment immediately with its status asNOT_YET_ACTIVE. Yourcommitment becomesACTIVE on January 21, 2024, at 12:00 AM USand Canadian Pacific Time (UTC-8 or UTC-7).

When the commitment reaches its end date and expires, the status changes fromACTIVE toEXPIRED. Suppose the commitment from the preceding example (whichbecomes active on January 21, 2024) has a 1-year term and you don't enableauto-renewal. Then, on January 21, 2025, at 12:00 AM US and Canadian PacificTime (UTC-8 or UTC-7), the commitment expires and its status changes toEXPIRED.

Pricing

You're billed monthly for your commitment and must pay your monthly commitmentfee even if you don't use all of your committed resources. Your commitment feeis the sum of the discounted prices of all your committed resources.Compute Engine calculates the discounted price of each resource byusing its prevailing on-demand price on the day your commitment becomes active.Your monthly commitment fee and the discounted prices for your resources staythe same until the end of your commitment term, even if the on-demand priceschange.

If you use your commitments to run custom machine types, thenCompute Engine charges a 5% premium over the commitment prices.Compute Engine charges this premium for the portion and duration of yourcommitment that you run these custom machine type VMs.

Note: If you merge or split your commitments, then the discounted prices foryour committed resources might change on the day your merged or splitcommitments become active.

The discounted pricing (also referred to as CUD pricing) for VM instances,with or without GPUs and Local SSD disks, differs depending on the region.For current rates, seeVM instance pricing.

If you move the project for which you purchased commitments to a differentCloud Billing account, then you continue to receive committed usediscounts for that project under the new Cloud Billing account.Learn about changing the Cloud Billing account for a project.

Limitations

The following restrictions apply to resource-based CUDs.

General Limitations

  • Projects that are in the free tier period with free tier credit and projectsthat don't have any payment history don't qualify for committed usediscounts.
  • You can purchase commitments only on a per-region basis.
  • Resource-based CUDs don't apply topreemptible VM instances,N1 shared-core machine types,orextended memory.
  • If you use your Compute Enginereservations withGoogle Cloud Serverless for Apache Spark, then those reserved resources aren't eligiblefor resource-based CUDs.
  • If you use your reservations with Dataflow, then you canreceive resource-based CUDs only for usage fromspecifically targeted reservationsthat specify accelerators (GPUs or TPUs).
  • For machine types that supportper VM Tier_1 networking performance,the higher bandwidth SKUs are excluded from CUDs.
  • f1-micro andg1-small shared-core machines are not eligible for CUDs.
  • You can't change the project for which you purchase a commitment. However,you can share CUDs from a commitment across other projects byenabling CUD sharing.

    If you move the project for which you purchased your commitments to adifferent Cloud Billing account, then you continue to receiveapplicable CUDs for that project in the new Cloud Billing account.Learn about changing the Cloud Billing account for projects.

Limitations specific to sharing resource-based CUDs

  • If you have a shared reservation in a project whereCUD sharing is enabled, and you want usage from the shared projects to beeligible for the shared CUDs, then you must ensure that you share yourreservation only with projects that are linked to the sameCloud Billing account. Otherwise, usage from the shared projectswon't be eligible for the shared CUDs and you might be charged the on-demandrates.

  • When you enable CUD sharing for a Cloud Billing account, if anyportion of a commitment is unutilized, then the remaining commitmentcharge remains in the project where you purchased that commitment.

Limitations specific to attached reservations

Limitations specific to CUDs Recommendations

Hardware commitments

Hardware commitments apply only to the specific region and machine family seriesfor which you purchase. In return, you receive discounts on the aggregate pricesof all the eligible hardware resources for that machine series within thatregion. These hardware resources include vCPUs, memory, GPUs, and Local SSDdisks.

The commitment that you purchase doesn't affect your VM configurations. YourCUDs apply to the aggregate number of vCPUs, memory, GPUs, and Local SSD disksof a specific machine series within a region. Consequently, the CUDs that youreceive for a commitment are not affected by changes to your VM's machine setup,as long as the resources are covered by that commitment.

When you purchase a commitment for a specific machine series, you are eligiblefor CUDs on all VM machine types regardless of the VM size or tenancy model,including all predefined and custom machine types and sole-tenant nodes.For more information about the eligible resource types for each machine series,seeHardware commitment types.

Efficient usage of your commitments

If you have just a few projects, you can purchase commitments just forthe 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 discountsfor 8 cores. The other 16 cores will be billed at standard, non-committed userates. Keep in mind that after you purchase a set amount of commitments, you'rebilled for those commitments monthly, even if you don't use them.For example, if you purchase commitments for 8 cores, you're billed thecommitted use rates for those 8 cores for the whole month, even if you mighthave only run these cores for a part of the month. It is to your advantage topurchase commitments only in increments you know you will use.

Commitments can't be stacked for burst scenarios. For example, if you purchased10 cores for a month and then ran 20 cores for half the month, your commitmentswon't apply for the full 20 cores just because their usage was across only halfthe month.

Usage overage

Any hourly resource usage that is not covered by your commitments ischarged based on the on-demand rates and might be eligible for applicablesustained use discounts (SUDs).For example, consider a commitment for 2 vCPUs and 8 GB memory that belongto the N2 machine series. Suppose that you use this commitment to purchaseand run ann2-standard-2 (2 vCPUs and 8 GB memory) VM for a portion ofthe month and then run ann2-standard-8 (8 vCPUs and 32 GB memory) VMfor the remainder of the same month. In this scenario, Compute Enginecombines the usage across both VMs and automatically applies the applicable SUDsto any resource usage that isn't covered by your commitment.

Combine reservations with commitments

A commitment provides a 1- or 3-year discounted price agreement, but it does notreserve capacity in a specific zone. A reservation makes sure that capacity isheld in a specific zone even if the reserved VMs are not running. To get zonalresources at discounted prices and also makes sure that capacity is reservedfor them, you must both purchase commitments and create reservations for thosezonal resources.

You can also attach reservations to your resource-based commitments at the timethat you purchase your commitment. By attaching reservations to your commitments,you link the two entities together. This linkage helps you better identify andtrack which committed resources also have capacity reserved.

Attaching a reservation to your commitment is mandatory for some resource types.When you purchase commitments for GPUs, you must reserve those GPUs andattach those reservations to your commitment. This requirement also applies toLocal SSD disks for use with most machine series. If you're committing topurchase local Titanium SSD disks for use with C4A, C4D, H4D, or Z3instances, then you don't need attached reservations for those disks.

For more information about attaching reservations to your commitments, seeCombine reservations with committed use discounts.

Commitment types for hardware commitments

When you purchase a commitment, you must choose thecommitment type thatapplies to your intended resource usage. The commitment type of the commitmentdetermines the machine series—or in some cases, a specific collection ofmachine types—that is covered by your commitment. When you use instancesbelonging to these machine series or machine types, Google Cloud coversthe eligible portions of that usage through your commitment. Most machine seriesuse one specific commitment type for all machine types in that series. Thefollowing machine series are exceptions; they don't have a single commitmenttype for the entire series:

  • Accelerator-optimized A3: This machine series has multiple commitmenttypes:

  • Memory-optimized M1 and memory-optimized M2: These machine series have asingle, combined commitment type that covers all M1 and M2 machine types.

  • Memory-optimized M4: This machine series has two commitment types:

    • One commitment type specifically covers M4 machine types that come with6 TB of memory.
    • All other M4 machine types are covered by a separate commitment type.
  • Memory-optimized X4: This machine series has a different commitment typefor each machine type:

    • The X4 machine type with 6 TB of memory (x4-480-6t-metal)
    • The X4 machine type with 8 TB of memory (x4-480-8t-metal)
    • The X4 machine type with 12 TB of memory (x4-960-12t-metal)
    • The X4 machine type with 16 TB of memory (x4-megamem-960-metal)
    • The X4 machine type with 24 TB of memory (x4-megamem-1440-metal)
    • The X4 machine type with 32 TB of memory (x4-megamem-1920-metal)

The specific value for each commitment type varies depending on whether you usethe gcloud CLI, REST, or the Google Cloud console topurchase a commitment. For the exact values to use when purchasing, see therelevant instructions in thePurchase commitments without attached reservationsorPurchase commitments with attached reservationssections.

Caution: For C3 and C3D commitment types, the machine family that is specified by the commitment type changes depending on the interface:
  • In the gcloud CLI and REST, the commitment type values useCompute-optimized as the machine family, even though C3 and C3D are part of the general-purpose machine family.
  • In the Google Cloud console, the commitment type values use the correct machine series:General-Purpose.
Make sure to select the correct commitment type value that corresponds to the interface that you're using.

The following table lists all the machine series for which you can purchaseresource-based commitments, along with their corresponding commitment types.For each commitment type, the table also lists the eligible machine types andresource types that are eligible for CUDs. For every listed machine type, theapplicability includes sole-tenant node types, if sole-tenancy issupported by the machine series.

Commitment typeEligible resourcesApplicable machine types
General-purpose E2
  • vCPUs
  • Memory
All E2 machine types
General-purpose N2
  • vCPUs
  • Memory
  • Local SSD disks
All N2 machine types
General-purpose N2D
  • vCPUs
  • Memory
  • Local SSD disks
All N2D machine types
General-purpose N4
  • vCPUs
  • Memory
All N4 machine types
General-purpose N4D
  • vCPUs
  • Memory
All N4D machine types
General-purpose N4A
  • vCPUs
  • Memory
All N4A machine types
General-purpose C3
  • vCPUs
  • Memory
  • Local SSD disks
All C3 machine types
General-purpose C3D
  • vCPUs
  • Memory
  • Local SSD disks
All C3D machine types
General-purpose C4
  • vCPUs
  • Memory
All C4 machine types
General-purpose C4A
  • vCPUs
  • Memory
  • Local Titanium SSD disks
All C4A machine types
General-purpose C4D
  • vCPUs
  • Memory
  • Local Titanium SSD disks
All C4D machine types
General-purpose Tau T2D
  • vCPUs
  • Memory
Standard Tau T2D machine types
General-purpose N1
  • vCPUs
  • Memory
  • GPUs
  • Local SSD disks
  • All N1 machine types, excluding shared-core.
  • GPUs:
    • NVIDIA T4
    • NVIDIA V100
    • NVIDIA P100
    • NVIDIA P4
Storage-optimized Z3
  • vCPUs
  • Memory
  • Local SSD disks and local Titanium SSD disks
All Z3 machine types
Compute-optimized H4D
  • vCPUs
  • Memory
  • Local Titanium SSD disks
  • All H4D machine types
  • All H4D sole-tenant node types
Compute-optimized H3
  • vCPUs
  • Memory
All H3 machine types
Compute-optimized C2
  • vCPUs
  • Memory
  • Local SSD disks
  • All C2 machine types
  • All C2 sole-tenant node types
Compute-optimized C2D
  • vCPUs
  • Memory
  • Local SSD disks
All C2D machine types
Memory-optimized M1/M2
  • vCPUs
  • Memory
  • Local SSD disks
  • All M1 and M2 machine types
  • Doesn't apply to Memory Optimized Upgrade Premium SKUs
Memory-optimized M3
  • vCPUs
  • Memory
  • Local SSD disks
All M3 machine types
Memory-optimized M4 6TB
  • vCPUs
  • Memory
m4-ultramem-224 (the M4 machine type with 6 TB of memory)
Memory-optimized M4
  • vCPUs
  • Memory
All other M4 machine types
Memory-optimized X4 6TB
  • vCPUs
  • Memory
X4 machine type with 6 TB of memory
Memory-optimized X4 8TB
  • vCPUs
  • Memory
X4 machine type with 8 TB of memory
Memory-optimized X4 12TB
  • vCPUs
  • Memory
X4 machine type with 12 TB of memory
Memory-optimized X4 16TB
  • vCPUs
  • Memory
X4 machine type with 16 TB of memory
Memory-optimized X4 24TB
  • vCPUs
  • Memory
X4 machine type with 24 TB of memory
Memory-optimized X4 32TB
  • vCPUs
  • Memory
X4 machine type with 32 TB of memory
Accelerator-optimized A2
  • vCPUs
  • Memory
  • GPUs
  • Local SSD disks
  • All A2 machine types
  • GPUs: NVIDIA A100
Accelerator-optimized A3
  • vCPUs
  • Memory
  • GPUs
  • Local SSD disks
  • A3 Edge and High machine types
  • GPUs: NVIDIA H100
Accelerator-optimized A3 Mega
  • vCPUs
  • Memory
  • GPUs
  • Local SSD disks
  • A3 Mega machine types
  • GPUs: NVIDIA H100
Accelerator-optimized A3 Ultra
(Available only with AI Hypercomputer)
  • vCPUs
  • Memory
  • GPUs
  • Local SSD disks
  • A3 Ultra machine types
  • GPUs: NVIDIA H200
Accelerator-optimized A4
(Available only with AI Hypercomputer)
  • vCPUs
  • Memory
  • GPUs
  • Local SSD disks
  • All A4 machine types
  • GPUs: NVIDIA B200
Accelerator-optimized A4X
(Available only with AI Hypercomputer)
  • vCPUs
  • Memory
  • GPUs
  • Local SSD disks
  • All A4X machine types
  • GPUs: NVIDIA GB200
Graphics-optimized G2
  • vCPUs
  • Memory
  • GPUs
  • Local SSD disks
  • All G2 machine types
  • GPUs: NVIDIA L4
Graphics-optimized G4
  • vCPUs
  • Memory
  • GPUs
  • Local Titanium SSD disks
  • All G4 machine types
  • GPUs: NVIDIA RTX PRO 6000

You can't purchase commitments forf1-micro, org1-small machine types orfor the sole-tenant premium charge.

Commitments for Compute Engine machine types

Google Cloud offers resource-based commitments for hardware resources ofseveral Compute Engine machine family series. Purchase the appropriatecommitment type for the machine types you plan to use.

General-purpose machine types

CUDs for general-purpose machine types are applied to resources in thefollowing order:

  1. N4, N2, N2D, E2, or N1 custom machine types, depending on the commitmentthat you purchase
  2. Sole-tenant nodes
  3. E2, N2, N2D, N4, N4D,N4A,C4, C4A, C4D, C3, C3D, Tau T2D, or N1 predefined machine types, dependingon which commitment that you purchase.

When you purchase commitments for general-purpose machine types, you pick whichmachine series the commitment applies to. For example, if you purchasegeneral-purpose E2 commitments, they apply to only E2 machine types. Similarly,if you purchase general-purpose N2, N2D, N4, N4D, N4A, C4, C4A, C4D, C3, C3D,Tau T2D, 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
  • 2n2-standard-4 predefined machine types

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

Finally, the remaining 5 vCPUs of committed use would apply to 5 random vCPUsacross the twon2-standard-4 machine types. Any resource usage that isn'tcovered by your commitments might qualify for applicable SUDs.

Additionally, if you use your commitments to run custom machine types, thenCompute Engine charges a 5% premium over the commitment prices.Compute Engine charges this premium for the portion and duration of yourcommitment that you run these custom machine type VMs.

Commitments are aggregated by machine series. If you are unsure of howmany commitments to purchase, you might want to purchase a smaller number ofcommitments, then add more as you need them. For example, you can purchasemultiple contracts for 10 vCPUs and zero memory, then purchase separatecontracts for additional memory.

To purchase a commitment for general-purpose machine types, seePurchase commitments without attached reservationsandPurchase commitments with attached reservations.

Memory-optimized machine types

The commitment type for memory-optimized machine type resources varies depending on the machine type.There is a unique commitment type for each of the following groups of machinetypes:

ForX4 machine types,there is a unique commitment type for each of the available memory options:

  • 6 TB of memory
  • 8 TB of memory
  • 12 TB of memory
  • 16 TB of memory
  • 24 TB of memory
  • 32 TB of memory

You must purchase the commitment type that matches the machine series and typeof your instance.

The Memory Optimized Upgrade Premium Core and RAM SKUs, which are specific toM2 machine types, are not eligible for CUDs. The prices for these SKUs areincorporated into the price rates that are documented on theVM instance pricing page andin thepricing calculator.

If you intend to use memory-optimized machine types, purchase memory-optimizedcommitments. To purchase a commitment for memory-optimized machine types,seePurchase commitments without attached reservations.

Storage-optimized machine types

To purchase commitments for storage-optimized Z3 machine types, seePurchase commitments without attached reservationsandPurchase commitments with attached reservations.

Compute-optimized machine types

To purchase commitments for compute-optimized machine types, see one of thefollowing:

Accelerator-optimized machine types

Accelerator-optimized VMs have a specific model and number of NVIDIA GPUsattached. When you purchase commitments for these machine types, you must alsoreserve your committed GPUs and attach those reservations to your commitments.

To purchase a commitment for these machine types, see the following:

Commitments for GPUs and Local SSD disk resources

When you purchase commitments for GPUs, you can only specify one GPU type forany given commitment. Consequently, that commitment covers usage only for thespecified GPU type. If you want to receive CUDs for using multiple GPU types,then you must purchase separate commitments for each GPU type.For example, suppose that you use both NVIDIA V100 GPUs and NVIDIA P100 GPUs.If you only have a commitment for NVIDIA P100 GPUs, then that commitment can'tcover your usage from NVIDIA V100 GPUs. To receive CUDs for both NVIDIA P100 GPUusage and NVIDIA V100 GPU usage, you must purchase separate commitments foreach GPU type.

Additionally, to purchase commitments for GPUs, Local SSD disks, or both youmust reserve the resources and attach the reservations to your commitment.Reserving these resources is required to make sure that the resources are alwaysavailable for you (whether you use them or not). There are no additional chargesfor reserving the resources.

Note: If you're committing to purchasing any local Titanium SSD disksfor use with C4A, C4D, H4D, or Z3 instances, then you don't need attachedreservations for those disks.

To learn how to purchase commitments for GPUs, see one of the following:

To learn how to purchase commitments for Local SSD disks, seePurchase commitments with attached reservationsin this document.

To learn more about commitments with attached reservations, seeAttach reservations to resource-based commitments.

Quotas for commitments and committed resources

You can only purchase resource-based commitments for resources in a specificregion if you have quota available in that region for both of the following:

  • Commitments
  • Committed resources (with the exception of memory)

Specifically, if you want to purchase commitments for any vCPUs, GPUs,or Local SSD disks, then you need to have quota available both for commitmentsand for those specific committed SKUs in the region where you want to purchasethe commitment. There is no quota on memory, so you don't need to have separatequota for committed memory to purchase a commitments for memory.

For example, to purchase 5 commitments that cover 32 vCPUs of general-purposeN1 machine type, 16 GB memory, 4 NVIDIA P4 GPUs, and 2 Local SSD disks inus-central1 region, you must have quota for each of the following:

  • Five commitments inus-central1
  • 32 committed N1 vCPUs inus-central1
  • Four committed NVIDIA P4 GPUs inus-central1
  • 750 GB (or 2 Local SSD disks) of committed Local SSD disk space inus-central1
Note: If your project is still in the free tier period with free tier creditremaining, or if your project does not have payment history, it does notqualify for committed use discounts. This means that the project is not grantedquota to create commitments.

Quota limits

By default, Compute Engine offers a specific amount of commitmentquota for each type of committed resource. These quota limits determine thenumber of commitments you can purchase and the amount of resources you cancommit to.To learn how to view the current quota limits and quota usage values for yourcommitments and committed resources, seeView quotas in the Google Cloud console.

If you consistently pay for a very high amount of committed vCPUs for yourprojects across different regions, then you might be eligible for unlimitedquota on your committed vCPUs for all machine types (except formemory-optimized machine types) in all regions.

If you use up all your commitment quota, you won't be able to purchase newcommitments. Likewise, if you exhaust your committed resource quota, then youwon't be able to purchase a new commitment for that resource even if you havecommitment quota available.For example, if you used up all of your commitment quota, then the serverreturns the following error when you make a commitment purchase request:

"Quota 'COMMITMENTS' exceeded. Limit: 0.0"

Increase quota limits

If you don't have enough quota for your commitments or your committedresources, you can always request for a quota increase from theQuotas page.You can request for quota increases at any time. To learn how to submit arequest to increase quota limits for your resources, seeRequest a quota adjustment.

For example, consider a scenario where you purchased two commitments for atotal of fourNVIDIA V100 GPUs inus-central1 and met your quota limits.region. Suppose you want to purchase two new commitments for twoNVIDIA V100 GPUs each, in the same region, you must do the following:

  1. Submit a new quota request to increase yourCommitted NVIDIA V100 GPUsquota inus-central1 to the new maximum number (eight) that you want.
  2. Submit a new quota request to increase yourCommitments quota inus-central1 to match the new maximum number (four) that you want.

    Wait for your requests to be approved and closed. After your requests areapproved, your commitment and committed GPU quotas inus-central1 increase to match your new needs. You can then purchase your newcommitments.

If you place a request for an increase in quota limit for a resourcethat already has unlimited quota by default, then the quota value for thatresource remains unlimited and you are notified that your requested limit isbelow the approved limit.

Set a cap for quota limits

You can set a cap on the quota value for your committed resources bycreating a quota override.For resources that have unlimited quota by default, the quota overridedecreases the quota value. To remove the quota override for the resource andreturn to unlimited quota values by default, you mustreset the quota value.

To learn more about how to manage quotas for your resources, seeView and manage quotas.

Purchase commitments without attached reservations

You can purchase commitments for vCPUs, memory, or both without attaching anyreservations for those resources. You can purchase these commitments using theGoogle Cloud console, the gcloud CLI, or the API.

To learn more about commitments with attached reservations, seeAttach reservations to resource-based commitments

To purchase commitments for GPUs, Local SSDs disks, or both, seePurchase commitments with attached reservations.

By default, project owners have permission to purchase committed use discountcontracts. However, it's possible for owners to create custom roles thatinclude or exclude certain users. Read aboutaccess control to make sure you have permission topurchase a committed use discount contract.

After you purchase a commitment, your commitment becomes active on thefollowing day at 12 AM US and Canadian Pacific Time (UTC-8, or UTC-7 duringdaylight saving time).Compute Enginemaintains a lien on your project for each region in yourproject where you purchase a commitment. When you purchasea new commitment for any region in your project,Compute Engine associates the lien for that region withthe newly created commitment.

Between the time of your commitment purchase and its activation time, thestatus of your commitment remains asNOT_YET_ACTIVE (or asPENDING on theGoogle Cloud console). After activation, the status of your commitment changes toACTIVE.For example, suppose you purchase your commitment on January 20, 2024, at 10:00 PMUS and Canadian Pacific Time (UTC-8 or UTC-7). Compute Engine creates yourcommitment immediately with its status asNOT_YET_ACTIVE. Yourcommitment becomesACTIVE on January 21, 2024, at 12:00 AM USand Canadian Pacific Time (UTC-8 or UTC-7).

The discounts are automatically applied to applicableinstances in the region you specified, and to the projects in which thosediscounts are purchased.

Important: After you purchase a commitment, you can't cancel it. If you changethe Cloud Billing account for the project associated with thecommitment, the scope of yourattribution and discount sharing settingschanges to projects in the new Cloud Billing account. If you haddiscount sharing enabled in the old Cloud Billing account, the projectsin the old Cloud Billing account are no longer in the scope of thediscount sharing settings.

Permissions required for this task

To perform this task, you must have the followingpermissions:

  • compute.commitments.create to create a commitment for a VM.
  • compute.commitments.list to view a list of commitments on a project.

Console

Before you purchase a commitment using the Google Cloud console,select the project that you want to use to purchase the commitment. IfCUD sharingis enabled for a Cloud Billing account, you canpurchase the commitment using any project from that Cloud Billingaccount. After you select the project, do the following:

  1. In the Google Cloud console, go to theCommitted use discountspage.

    Go to Committed use discounts

  2. To purchase a commitment, clickPurchase commitment. ThePurchase a committed use discount pageopens and displays theHardware tab.

  3. In theName field, enter a name for your commitment.

  4. In theRegion field, select the region where you want to commit toCompute Engine resources.

  5. In theCommitment type field, select the machine family series foryour committed resources. For vCPUs, memory, or both, you can choosefrom the following commitment types:

  6. In theDuration section, do the following:

    1. To specify your commitment's plan, select either1 year or3 years. The plan determines the CUD rate and preset termduration of your commitment.
    2. Optional. To specify a custom term duration for your commitment,click theExtend end date toggle and then, in theDate field,specify the custom end date that you want. For more information,seeExtend commitment terms.
  7. In theCores field, enter the number of vCPUs that youwant to commit to purchasing.

  8. In theMemory field, enter the amount, in GB, of memorythat you want to commit to purchasing.

    You can specify memory only in increments of 0.25 GB. To specify acustom memory value for your commitment, use gcloud CLIor REST instead.

  9. To finish purchasing your commitment, do the following:

    1. ClickPurchase.
    2. In thePurchase a committed use discount dialog, if you agreewith theservice specific terms, clickPurchase again.

gcloud

Using the gcloud CLI, run thegcloud compute commitments create command:

gcloud compute commitments createCOMMITMENT_NAME \    --regionREGION \    --projectPROJECT_ID \    --resources vcpu=NUMBER_VCPUS,memory=MEMORY \    --planPLAN \    --typeCOMMITMENT_TYPE

Replace the following:

Examples

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

    gcloud compute commitments create example-commitment --region us-central1 \  --resources vcpu=5,memory=33280MB --plan 12-month \  --project=myproject
  • To create a compute-optimized commitment, use thegcloud 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 --project=myproject
  • 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 \  --project=myproject
  • To create an accelerator-optimized commitment, you mustpurchase your commitment with a supporting attached reservationby using thegcloud compute commitments create command.You must also specify the total number of resources (including GPUs) thatyou need.

    When creating GPU commitments, you need to specify the--accelerator and--resources-accelerator flags.The--accelerator flag specifies the number of GPUs that are attachedto each VM. The--resources-accelerator flag specifies the totalnumber of GPUs in the commitment.

    For example, the following commitment includes 96 vCPUs, 680 GB memory,8 GPUs, and a reservation for those GPUs to be used in 2 VMs inus-central1-a.

    gcloud compute commitments create example-accelerator-optimized-commitment \  --region=us-central1 \  --project=myproject \  --resources=vcpu=96,memory=680GB \  --resources-accelerator=count=8,type=nvidia-tesla-a100 \  --plan 12-month \  --type accelerator-optimized \  --reservation=reservation-01 \  --reservation-zone=us-central1-a \  --machine-type=a2-highgpu-4g \  --accelerator=count=4,type=nvidia-tesla-a100 \  --vm-count=2
  • To create a commitment for GPUs, Local SSD disks, or both, you mustpurchase your commitment with an attached reservationby using thegcloud compute commitments create command.

    When creating GPU commitments, you need to specify the--accelerator and--resources-accelerator flags.The--accelerator flag specifies the number of GPUs that are attachedto each VM. The--resources-accelerator flag specifies the totalnumber of GPUs in the commitment.

    For example, the following commitment includes 4 GPUs and a reservation forthose GPUs to be used in 2 instances inus-central1-a.

    gcloud compute commitments create example-reservation-commitment \  --region=us-central1 \  --project=myproject \  --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

REST

In the API, make aPOST request to theregionCommitments.insert method,with a request body that contains information about the commitment:

https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/commitments?requestId=OPTIONAL_UNIQUE_ID
Note:requestIdis an optional query parameter, but we recommend providing it to helpprevent unintended duplicate requests.

The resource body should contain the following:

For example, the following creates a commitment for 1 year with 5 vCPUsand 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 thetype property. Thefollowing example shows a purchase of a 1 yearcommitment for anm1-megamem-96 machine type:

{"name":"example-memory-optimized-commitment","plan":"TWELVE_MONTH","type":"MEMORY_OPTIMIZED","resources":[{"amount":"96","type":"VCPU"},{"amount":"1434","type":"MEMORY"}]}```Tocreateacompute-optimizedcommitment,includethe`type`property.Thefollowingexample,purchasesa1yearcommitmentfora`c2-standard-16`machinetype:```json{"name":"example-compute-optimized-commitment","plan":"TWELVE_MONTH","type":"COMPUTE_OPTIMIZED","resources":[{"amount":"16","type":"VCPU"},{"amount":"1434","type":"MEMORY"}]}

Purchase commitments with attached reservations

When you purchase a new commitment, you can attach reservations toyour commitment in either of the following ways:

After you purchase a commitment, your commitment becomes active on thefollowing day at 12 AM US and Canadian Pacific Time (UTC-8, or UTC-7 duringdaylight saving time).Between the time of your commitment purchase and its activation time, thestatus of your commitment remains asNOT_YET_ACTIVE (or asPENDING on theGoogle Cloud console). After activation, the status of your commitment changes toACTIVE.For example, suppose you purchase your commitment on January 20, 2024, at 10:00 PMUS and Canadian Pacific Time (UTC-8 or UTC-7). Compute Engine creates yourcommitment immediately with its status asNOT_YET_ACTIVE. Yourcommitment becomesACTIVE on January 21, 2024, at 12:00 AM USand Canadian Pacific Time (UTC-8 or UTC-7).

Requirements

Before you purchase a commitment with attached reservations, review theserequirements and make sure that your commitment and reservations meet thefollowing criteria:

  • You must purchase the commitment and create the attached reservations in thesame project and region.
  • You must purchase the commitment and create the attached reservations forresources from the same machine family series.
  • You must disable theauto-delete optionon the attached reservations.
  • If your commitment has GPUs, then the GPU type specified in the reservationand the commitment must match.
  • For GPUs and Local SSD disks, the number of reserved resources of eachresource type must exactly match with the number of committed resourcesfor that resource type. However, this requirement isn't applicable whenyou're purchasing a commitment for local Titanium SSD disks for usewith C4A, C4D, H4D, or Z3 machine types.

    For example, if you want to purchase a commitment for 4 V100 GPUs and 2Local SSD disks, then your commitment's attached reservations must specify atotal of 4 V100 GPUs and 2 Local SSDs. The amount of vCPU and memory thatyou reserve can be more or less than what you commit to. However, if youpurchase a commitment for 4 C4A vCPUs and 2 local Titanium SSD disks,then you don't have to attach any reservations to the commitment.

  • For GPUs, purchase commitments for the specific GPU types that youintend to use. For example, you can purchase commitments for either NVIDIAP100s or NVIDIA V100s, but you cannot use a commitment that was purchasedfor NVIDIA P100 GPUs to cover NVIDIA V100 GPUs.

  • If your attached reservation is a shared reservation and you want to receivethe applicable CUDs when you consume that reservation outside yourcommitment's project, then you must do both the following:

    • Share your reservations only between projects that belong to the sameCloud Billing account as the commitment.
    • Enable CUD sharingfor that Cloud Billing account.

Attach existing reservations

You can attach existing reservations while purchasing your commitment by usingthe Google Cloud console, the Google Cloud CLI, or REST.

Permissions required for this task

To perform this task, you must have the followingpermissions:

  • To create a commitment:compute.commitments.create on the project
  • To create reservations:compute.reservations.create on the project

Console

Before you purchase a commitment using the Google Cloud console,select the project that you want to use to purchase the commitment. IfCUD sharingis enabled for a Cloud Billing account, you canpurchase the commitment using any project from that Cloud Billingaccount. After you select the project, do the following:

  1. In the Google Cloud console, go to theCommitted use discountspage.

    Go to Committed use discounts

  2. To purchase a commitment, clickPurchase commitment. ThePurchase a committed use discount pageopens and displays theHardware tab.

  3. In theName field, enter a name for your commitment.

  4. In theRegion field, select the region where you want to commit toCompute Engine resources.

  5. In theCommitment type field, select the machine family series foryour committed resources.The following commitment types provideoptions for GPUs, Local SSD disks, or both:

  6. ForDuration, do the following:

    1. To specify your commitment's plan, select either1 year or3 years. The plan determines the CUD rate and the preset termduration of your commitment.
    2. Optional. To specify a custom term duration for your commitment,click theExtend end date toggle and then, in theDate field,specify a custom end date. For more information,seeExtend commitment terms.
  7. In theCores field, enter the number of vCPUs that youwant to commit to purchasing.

  8. In theMemory field, enter the amount, in GB, of memorythat you want to commit to purchasing.

    You can specify memory only in increments of 0.25 GB. To specify acustom memory value for your commitment, use gcloud CLIor REST instead.

  9. To commit to GPUs, in theGPUs section, clickAdd GPU and then do the following:

    1. In theGPU type field, select the type of GPU.
    2. In theNumber of GPUs field, enter the number of GPUs.
    3. Optional: If your GPU model supportsNVIDIA RTX Virtual Workstations (vWS) for graphics workloads,and you plan to run graphics-intensive workloads, select theEnable Virtual Workstation (NVIDIA GRID) checkbox.
  10. To commit to Local SSD disks, in theLocal SSDs section, clickAdd SSD and then, in theNumber of SSDs field, specify thenumber of disks.

    Note: If you're committing to purchasing any local Titanium SSDdisks for use with C4A, C4D, H4D, or Z3 machine types, thenyou don't need to create and attach reservations forthose disks.
  11. To attach one or more existing reservations to the commitment,in theReservations field, selectAttach existing reservations.

    The Google Cloud console displays a list of all the reservations inyour project whose region, machine type, and GPU type match with thecommitment. Then, do the following:

    1. Optional. To view reservations with specific properties, in theFilter menu, add or remove filters for the properties thatyou want.
    2. Select all the reservations that you want to attach to thecommitment.
    Important: The types and total number of GPUs and Local SSD disksspecified across all your attached reservations must match with what youspecified in your commitment. Otherwise, you won't be able to purchasethe commitment. If you're committing to purchasing any localTitanium SSD disks for use with C4A, C4D, H4D, or Z3 instances,then you don't need attached reservations for those disks.
  12. To finish purchasing your commitment with the attached reservations,do the following:

    1. ClickPurchase.
    2. In thePurchase a committed use discount dialog, if you agreewith theservice specific terms,clickPurchase again.

gcloud

To purchase a commitment by attaching existing reservations, run thegcloud compute commitments create command.In your command, include the--existing-reservation flag to specify anexisting reservation that you want to attach to your commitment. Include anew instance of this flag for every existing reservation that you want toattach. You can attach any number of existing reservations to yourcommitment.

For example, to purchase a commitment by attaching two reservations to it,run the following command:

gcloud compute commitments createCOMMITMENT_NAME \    --region=REGION \    --project=PROJECT_ID \    --resources=vcpu=COMMITTED_VCPUS,memory=COMMITTED_MEMORY,local-ssd=COMMITTED_LOCAL_SSD \    --resources-accelerator=count=COMMITTED_ACCELERATOR_COUNT,type=COMMITTED_ACCELERATOR_TYPE \    --plan=PLAN \    --type=COMMITMENT_TYPE \    --custom-end-time=CUSTOM_END_DATE \    --existing-reservation=name='RESERVATION_NAME_1',zone='RESERVATION_ZONE_1' \    --existing-reservation=name='RESERVATION_NAME_2',zone='RESERVATION_ZONE_2'

Replace the following:

Example: Purchase a commitment by attaching existing reservations

Suppose you have two reservationsres-01 andres-02 in theus-central1-a andus-central1-b zones of the projectmyproject.Suppose that these reservations hold a combined capacity for 4 NVIDIA P100GPUs and 4 Local SSD disks. To purchase a new commitment in theus-central1 region of this project for these GPUs and Local SSD disks,and use these existing reservations as attached reservations, run thefollowing command. Note that the example commitment also contains vCPUs andmemory.

gcloud compute commitments create commitment-01 \    --region=us-central1 \    --project=myproject \    --resources=vcpu=96,memory=624GB,local-ssd=1500 \    --resources-accelerator=type=nvidia-tesla-p100,count=4 \    --plan 12-month \--existing-reservation=name=res-01,zone=us-central1-a \    --existing-reservation=name=res-02,zone=us-central1-b

REST

To purchase a commitment by attaching existing reservations, make aPOSTrequest to theregionCommitments.insert method.In your request, include theexistingReservations field to specify acomma-separated list of all the existing reservations that you want toattach to your commitment. You can attach any number of existingreservations to your commitment.

POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/commitments{  "name": "COMMITMENT_NAME",  "plan": "PLAN",  "type":COMMITMENT_TYPE,  "resources":  [    {      "amount": "COMMITTED_VCPUS",      "type": "VCPU"    },    {      "amount": "COMMITTED_MEMORY",      "type": "MEMORY"    },    {      "acceleratorType": "COMMITTED_ACCELERATOR_TYPE",      "amount": "COMMITTED_ACCELERATOR_COUNT",      "type": "ACCELERATOR"    }    {      "amount": "COMMITTED_LOCAL_SSD",      "type": "LOCAL_SSD"    }  ],  "customEndTimestamp": "CUSTOM_END_DATETEND_TIMEZ",  "existingReservations": "RESERVATION_URLs"}

Replace the following:

Example: Purchase a commitment by attaching existing reservations

Suppose you have two reservationsres-01 andres-02 in theus-central1-a andus-central1-b zones of the projectmyproject.Suppose that these reservations hold a combined capacity for 4 NVIDIA P100GPUs and 4 Local SSD disks. To purchase a new commitment in theus-central1 region of this project for these GPUs and Local SSD disks andto use these existing reservations as attached reservations,make the followingPOST request. Note that the example commitment alsocontains vCPUs and memory.

POST https://compute.googleapis.com/compute/v1/projects/my-project/regions/us-central1/commitments{  "name": "commitment-01",  "plan": "TWELVE_MONTH",  "type": "GENERAL_PURPOSE"  "resources":  [    {      "amount": "96",      "type": "VCPU"    },    {      "amount": "638976",      "type": "MEMORY"    },    {      "acceleratorType": "nvidia-tesla-p100",      "amount": "4",      "type": "ACCELERATOR"    },    {      "amount": "1536000",      "type": "LOCAL_SSD"    }  ],  "existingReservations":  [    "https://www.googleapis.com/compute/v1/projects/my-project/zone/us-central1-a/reservations/res-01",    "https://www.googleapis.com/compute/v1/projects/my-project/zone/us-central1-b/reservations/res-02"  ]}

Create new reservations to attach

You can create your attached reservations while purchasing your commitment byusing the Google Cloud console, the Google Cloud CLI, or REST.

Permissions required for this task

To perform this task, you must have the followingpermissions:

  • To create a commitment:compute.commitments.create on the project
  • To create reservations:compute.reservations.create on the project

Console

Before you purchase a commitment using the Google Cloud console,select the project that you want to use to purchase the commitment. IfCUD sharingis enabled for a Cloud Billing account, you canpurchase the commitment using any project from that Cloud Billingaccount. After you select the project, do the following:

  1. In the Google Cloud console, go to theCommitted use discountspage.

    Go to Committed use discounts

  2. To purchase a commitment, clickPurchase commitment. ThePurchase a committed use discount pageopens and displays theHardware tab.

  3. In theName field, enter a name for your commitment.

  4. In theRegion field, select the region where you want to commit toCompute Engine resources.

  5. In theCommitment type field, select the machine family series foryour committed resources.The following commitment types provideoptions for GPUs, Local SSD disks, or both:

  6. ForDuration, do the following:

    1. To specify your commitment's plan, select either1 year or3 years. The plan determines the CUD rate and the preset termduration of your commitment.
    2. Optional. To specify a custom term duration for your commitment,click theExtend end date toggle and then, in theDatefield, specify a custom end date. For more information,seeExtend commitment terms.
  7. In theCores field, enter the number of vCPUs that youwant to commit to.

  8. In theMemory field, enter the amount, in GB, of memorythat you want to commit to.

  9. To commit to GPUs, in theGPUs section, clickAdd GPU and then do the following:

    1. In theGPU type field, select the type of GPU.
    2. In theNumber of GPUs field, enter the number of GPUs.
    3. Optional: If your GPU model supportsNVIDIA RTX Virtual Workstations (vWS) for graphics workloads,and you plan to run graphics-intensive workloads, select theEnable Virtual Workstation (NVIDIA GRID) checkbox.
  10. To commit to Local SSD disks, in theLocal SSDs section, clickAdd SSD and then, in theNumber of SSDs field, specify thenumber of disks.

  11. To create a new reservation and attach it to the commitment, in theReservations field, selectCreate reservations and then do thefollowing. Repeat this step for every new reservation that you want tocreate and attach.

    1. ClickAdd a reservation. TheNew reservation section appears.
    2. In theName field, enter a name for your attached reservation.
    3. In theRegion field, select the same region as your commitment.
    4. In theZone field, select the zone where you want to reserveyour resources.
    5. In theShare type section, specify how you want to share thisreservation in one of the following ways:

      • To create a single-project reservation, selectLocal.
      • To create a reservation that is shared with multiple projects,selectShared. Then, to specify the projects to share thethis reservation with, clickAdd projects, andthen select the projects that you want from the currentproject's organization.
    6. In theUse with VM instance field, select how you want VMs toconsume your reservation in one of the following ways:

      • To allow VMs with matching properties to automatically consumethis reservation, clickUse reservation automatically(default).
      • To consume this reservation's resources only when creating VMswith matching properties that specifically target thisreservation by name, click selectSelect specific reservation.
    7. In theResource details section, do the following:

      1. In theNumber of VM instances field, enter the number of VMinstances that you want to reserve.
      2. In theMachine configuration section, specify the propertiesof your reserved VMs in one of the following ways:

        1. To specify your the properties of your VMs using an existinginstance template,selectUse instance template.

          In theInstance template field, select an instancetemplate that specifies the same machine family series asyour commitment. If you select a regional instance template,the region of that instance template must also match withthe region specified in your commitment.

        2. To manually specify the properties of your VMs, selectSelect machine type and then do the following:

          1. Select the machine family that applies to themachine series that you specified for the commitment:

            • General purpose for general-purpose machine series
            • Compute optimized for compute-optimized machineseries
            • Memory optimized for memory-optimized machineseries
            • GPUs for accelerator-optimized machine series
          2. In the table that hasSeries column, select thesame machine series that you specified for thecommitment.

          3. In theMachine type field, specify a predefinedor custom machine type in one of the following ways:

            1. To choose a predefined machine type, selectPresetand then select the machine type that you want.
            2. To choose a custom machine type, selectCustomand then specifyCores andMemory that youwant.
          4. To specify a minimum CPU platform, GPUs, or both,expand theCPU Platform and GPU menu and do the following:

            1. Optional: To specify a minimum CPU platform, in theCPU Plaform list, select an option.
            2. Optional: To reserve GPUs, clickAdd GPU.Then, in theGPU type andNumber of GPUsfields, select the type and number of GPUs for eachVM.

              Important: The types and total number of GPUsspecified across all your attached reservations mustmatch with what you specified in your commitment.Otherwise, you won't be able to purchase thecommitment.
          5. To reserve Local SSD disks, do the following:

            1. In theNumber of disks field, select the numberof Local SSD disks that you want for each VM.
            2. In theInterface type field, select theinterface for the Local SSD disks.
            Important: The total number of Local SSD disks specifiedacross all your attached reservations must must matchwith what you specified in your commitment. Otherwise,you won't be able to purchase the commitment.
    8. To finish specifying the properties for this reservation, clickDone.

  12. To finish purchasing your commitment with the attached reservations,do the following:

    1. ClickPurchase.
    2. In thePurchase a committed use discount dialog, if you agreewith theservice specific terms,clickPurchase again.

gcloud

To create your attached reservations while purchasing your commitment, runthegcloud compute commitments create command.

Note: You can't use the Google Cloud CLI to create your attached reservationsusing instance templates. Instead, you must manually specify the VMproperties for your reservations.

Depending on whether you want to attach a single reservation or multiplereservations, run the command in one of the following ways:

  • To create and attach a single reservation to your commitment, definethe properties of the attached reservation by running the followingcommand:

    gcloud compute commitments createCOMMITMENT_NAME \    --region=REGION \    --project=PROJECT_ID \    --planPLAN \    --typeCOMMITMENT_TYPE    --resources=vcpu=COMMITTED_VCPUS,memory=COMMITTED_MEMORY,local-ssd=COMMITTED_LOCAL_SSD \    --resources-accelerator=count=COMMITTED_ACCELERATOR_COUNT,type=COMMITTED_ACCELERATOR_TYPE \    --custom-end-time=CUSTOM_END_DATE \    --reservation=RESERVATION_NAME \    --reservation-zone=RESERVATION_ZONE \    --machine-type=RESERVED_MACHINE_TYPE \    --require-specific-reservation=REQUIRE_SPECIFIC_RESERVATION_VALUE \    --vm-count=NUMBER_OF_RESERVED_VMs \    --accelerator=type=RESERVED_ACCELERATOR_TYPE,count=RESERVED_ACCELERATOR_COUNT \    --local-ssd=interface=INTERFACE_1,size=375 \    --local-ssd=interface=INTERFACE_2,size=375 \    --minimum-cpu-platform=MINIMUM_CPU_PLATFORM \    --share-setting=SHARE_SETTING \    --share-with=CONSUMER_PROJECT_ID_1,CONSUMER_PROJECT_ID_2
  • To create and attach multiple reservations to your commitment, definethe reservation's properties using a YAML file and then specify thatYAML file in the command that you use to purchase your commitment.Optionally, you can also use this YAML file approach to create andattach a single reservation to your commitment. To create your attachedreservations using this approach, do the following:

    1. Create the YAML file in the current directory and specify theconfiguration that you want for each attached reservation. Forexample, to specify the configuration of a shared reservationshared with two projects that specifies GPUs, two Local SSD disks,and a minimum CPU platform, include the following text in your YAMLfile:

      -reservation:RESERVATION_NAMEreservation_zone:RESERVATION_ZONErequire_specific_reservation:REQUIRE_SPECIFIC_RESERVATION_VALUEvm_count:NUMBER_OF_RESERVED_VMsmachine_type:RESERVED_MACHINE_TYPEaccelerator:-count:RESERVED_ACCELERATOR_COUNTtype:RESERVED_ACCELERATOR_TYPElocalssd:-interface:INTERFACE_1size:375-interface:INTERFACE_2size:375project:OWNER_PROJECT_IDminimum-cpu-platform:MINIMUM_CPU_PLATFORMshare-setting:SHARE_SETTINGshare-with:-CONSUMER_PROJECT_ID_1-CONSUMER_PROJECT_ID_2

      To specify the configuration for multiple reservations, repeat theseproperties for each reservation that you want to create. You canattach any number of existing reservations that you want to yourcommitment.

    2. Run thegcloud compute commitments create command and includethe--reservation-from-file flag.

      gcloud compute commitments createCOMMITMENT_NAME \    --regionREGION \    --projectPROJECT_ID \    --planPLAN \    --typeCOMMITMENT_TYPE \    --resources=vcpu=COMMITTED_VCPUS,memory=COMMITTED_MEMORY,local-ssd=COMMITTED_LOCAL_SSD \    --resources-accelerator=count=COMMITTED_ACCELERATOR_COUNT,type=COMMITTED_ACCELERATOR_TYPE \    --reservations-from-file=YAML_FILE

Replace the following with the corresponding properties of the commitmentand the attached reservations:

Commitment

Attached reservations

  • RESERVATION_NAME: the name of the attachedreservation.
  • RESERVATION_ZONE: the zone of the attachedreservation.
  • REQUIRE_SPECIFIC_RESERVATION_VALUE: specifiesif the attached reservation is a specifically targeted reservation;eithertrue orfalse. For more information about specificallytargeted reservations, seeHow reservations work.
  • NUMBER_OF_RESERVED_VMS: the number of VMsthat you want to reserve in the attached reservation.
  • RESERVED_MACHINE_TYPE: themachine type that you want for theVMs in your attached reservation.

    • Forpredefined machine types, use the formatMACHINE_FAMILY-standard-CPUS;for example,n2-standard-4.
    • Forcustom machine types, use the formatMACHINE_FAMILY-custom-CPUS-MEMORY;for examplen2-custom-4-5120. For a full list of restrictions,read thespecificationsfor custom machine types.

      Replace the following:

      • MACHINE_FAMILY: the family of machinetypes; for example, specifyn2 for N2 VMs.
      • CPUS: the number ofvCPUs.
      • MEMORY: the total memory for areserved VM. Memory must be a multiple of 256 MBand must be supplied in MB; for example, to create an N2 VMwith 4 vCPUs and 5 GB of memory, which is 5120 MB,usen2-custom-4-5120.
  • RESERVED_ACCELERATOR_COUNT: the number ofGPUs you want to add, per VM, in the attached reservation.

  • RESERVED_ACCELERATOR_TYPE:thetype of accelerator you want to add inthe attached reservation.

  • INTERFACE_1 andINTERFACE_2: the type of interface youwant theLocal SSD disks for eachreserved VM to use. Valid options are:scsi andnvme. Each LocalSSD disk is 375 GB. Repeat thelocal_ssd parameter for eachLocal SSD disk that you want to add. You can specify up to 24 LocalSSD disks.

  • OWNER_PROJECT_ID: the ID of the projectwhere you want to purchase the commitment with the attachedreservation. Specify this field if you want to share your attachedreservation across multiple consumer projects.

  • MINIMUM_CPU_PLATFORM: the minimumCPU platform that you want to specify for the attached reservation.

  • SHARE_SETTING: the type of sharing for theattached reservation. Specify this field with the value asprojectsif you want to share your attached reservation across multipleconsumer projects. Exclude this field if you want create asingle-project reservation.

  • CONSUMER_PROJECT_ID_1 andCONSUMER_PROJECT_ID_2:theproject IDsof the projects that can share this reservation, for exampleproject-1 andproject-2. You can include up to 100 consumerprojects. These projects must be in the same organization as theowner project. Don't include the ID of the project where you createthis reservation, as that project is allowed to consume thisreservation by default. Exclude these fields if you want to createa single-project reservation.

Compute Engine creates the commitment and the attached reservationsonly if there are enough resources of the specified machine type in thetarget zone, and sufficient quota, at the time of your request. If yourpurchase was successful, you see a success message similar to the following:

Created[https://www.googleapis.com/compute/v1/projects/your-project/regions/your-region/commitments/your-commitment-name]

Examples for purchasing commitments by creating new reservations to attach

The following example scenarios and commands show how you can purchase acommitment for GPUs, Local SSD disks, or both by creating new reservationsto attach to that commitment.

Example 1: Purchase a commitment for GPUs by attaching a single new reservation

Suppose you want to purchase a commitmentcommitment-01 in theus-central1 region that includes 4 NVIDIA V100 GPUs. You want to create anew reservationreservation-01 as the attached reservation forthose GPUs. Suppose you also want to specify Compute Engine to usethose reserved GPUs across 2n1-standard-32 VMs in theus-central1-azone. To purchase this example commitment with its attached reservation, runthe following command:

gcloud compute commitments create commitment-01 \    --region=us-central1 \    --project=myproject \    --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

Example 2: Purchase a commitment for GPUs without committing to vCPUs or memory

To commit to and reserve GPUs and Local SSD disks without committing tovCPUs or memory, specify0 as the value for vCPU and memory quantities.For example, suppose you want to purchase a commitmentcommitment-02 for asingle NVIDIA P4 GPU in theus-west2 region. You also want to create a newreservation as the attached reservation and specifyCompute Engine to use the reserved GPU on ann1-standard-2 VM in theus-west2-b zone. To purchase this example commitment with its attachedreservation, run the following command:

gcloud compute commitments create commitment-02 \    --region=us-west2 \    --project=myproject \--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

Example 3: Purchase a commitment for GPUs and Local SSD disks by attaching multiple new reservations

Suppose you want to purchase a commitmentcommitment-03 for 1NVIDIA V100 GPU and 2 Local SSD disks in theus-central1 region. You alsowant to create and attach two reservations in theus-central1-a zone. In the first reservation,res-01, you want toreserve 1n1-standard-2 VM with 1 GPU. You want to makeres-01 atargeted reservation, which means that you must specifically target thatreservation by name to use its reserved VMs. In the second reservation,res-02, you want to reserve 1n1-standard-8 VM with 2 types ofattached Local SSD disks.

To purchase this example commitment with the attached reservations,first create the YAML file with the properties of both reservations.

- 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-8  local_ssd:  - interface: scsi    size: 375  - interface: nvme    size: 375

After you create the YAML file, to finish purchasing the commitment with itsattached reservations, run the following command. Note that the examplecommitment also contains vCPU and memory resources.

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

REST

To create your attached reservations while purchasing your commitment,make aPOST request to theregionCommitments.insert method.In your request, include thereservations field to define a list of allthe new reservations that you want to create and attach. You can attach anynumber of existing reservations that you want to your commitment.

  • To create your new reservation by manually specifying all the VMproperties, include theinstanceProperties field and exclude thesourceInstanceTemplate field.

    For example, to manually specify the configuration of a shared reservationshared with two projects that specifies GPUs, two Local SSD disks, and aminimum CPU platform, make the following request:

    POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/commitments{"name": "COMMITMENT_NAME","plan": "PLAN","type":COMMITMENT_TYPE,"resources":[  {    "amount": "COMMITTED_VCPUS",    "type": "VCPU"  },  {    "amount": "COMMITTED_MEMORY",    "type": "MEMORY"  },  {    "acceleratorType": "COMMITTED_ACCELERATOR_TYPE",    "amount": "COMMITTED_ACCELERATOR_COUNT",    "type": "ACCELERATOR"  }  {    "amount": "COMMITTED_LOCAL_SSD",    "type": "LOCAL_SSD"  }],"customEndTimestamp": "CUSTOM_END_DATETEND_TIMEZ","reservations":[  {    "name": "RESERVATION_NAME",    "specificReservation":    {      "count": "NUMBER_OF_RESERVED_VMS",      "instanceProperties":      {        "guestAccelerators":        [          {            "acceleratorCount": "RESERVED_ACCELERATOR_COUNT",            "acceleratorType": "RESERVED_ACCELERATOR_TYPE"          }        ],        "localSsds":        [          {            "diskSizeGb": "375",            "interface": "RESERVED_INTERFACE_1"          },          {            "diskSizeGb": "375",            "interface": "RESERVED_INTERFACE_2"          }        ],        "machineType": "RESERVED_MACHINE_TYPE",        "minCpuPlatform": "MINIMUM_CPU_PLATFORM"      }    },    "specificReservationRequired":REQUIRE_SPECIFIC_RESERVATION_VALUE",    "zone": "RESERVED_ZONE",    "shareSettings":    {      "shareType": "SPECIFIC_PROJECTS",      "projectMap":      {        "CONSUMER_PROJECT_ID_1":        {          "projectId": "CONSUMER_PROJECT_ID_1"        },        "CONSUMER_PROJECT_ID_2":        {          "projectId": "CONSUMER_PROJECT_ID_2"        }      }    }  }]}
  • To create your new reservation by specifying an instance template, includethesourceInstanceTemplate field and exclude theinstancePropertiesfield.

    POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/commitments{"name": "COMMITMENT_NAME","plan": "PLAN","type":COMMITMENT_TYPE,"resources":[  {    "amount": "COMMITTED_VCPUS",    "type": "VCPU"  },  {    "amount": "COMMITTED_MEMORY",    "type": "MEMORY"  },  {    "acceleratorType": "COMMITTED_ACCELERATOR_TYPE",    "amount": "COMMITTED_ACCELERATOR_COUNT",    "type": "ACCELERATOR"  }  {    "amount": "COMMITTED_LOCAL_SSD",    "type": "LOCAL_SSD"  }],"customEndTimestamp": "CUSTOM_END_DATETEND_TIMEZ","reservations":[  {    "name": "RESERVATION_NAME",    "specificReservation":    {      "count": "NUMBER_OF_RESERVED_VMS",      "sourceInstanceTemplate": "projects/PROJECT_ID/LOCATION/instanceTemplates/INSTANCE_TEMPLATE_NAME"    },    "specificReservationRequired":REQUIRE_SPECIFIC_RESERVATION_VALUE",    "zone": "RESERVED_ZONE",    "shareSettings":    {      "shareType": "SPECIFIC_PROJECTS",      "projectMap":      {        "CONSUMER_PROJECT_ID_1":        {          "projectId": "CONSUMER_PROJECT_ID_1"        },        "CONSUMER_PROJECT_ID_2":        {          "projectId": "CONSUMER_PROJECT_ID_2"        }      }    }  }]}

Replace the following with the corresponding properties of the commitmentand the attached reservations:

Commitment

Attached reservations

  • RESERVATION_NAME: the name of the attachedreservation.
  • RESERVATION_ZONE: the zone of the attachedreservation.
  • REQUIRE_SPECIFIC_RESERVATION_VALUE: specifiesif the attached reservation is a specifically targeted reservation;eithertrue orfalse. For more information about specificallytargeted reservations, seeHow reservations work.
  • NUMBER_OF_RESERVED_VMS: the number of VMsthat you want to reserve in the attached reservation.
  • RESERVED_MACHINE_TYPE: themachine type that you want for theVMs in your attached reservation.

    • Forpredefined machine types, use the formatMACHINE_FAMILY-standard-CPUS;for example,n2-standard-4.
    • Forcustom machine types, use the formatMACHINE_FAMILY-custom-CPUS-MEMORY;for examplen2-custom-4-5120. For a full list of restrictions,read thespecificationsfor custom machine types.

      Replace the following:

      • MACHINE_FAMILY: the family of machinetypes; for example, specifyn2 for N2 VMs.
      • CPUS: the number ofvCPUs.
      • MEMORY: the total memory for a reservedVM. Memory must be a multiple of 256 MB and mustbe supplied in MB; for example, to create an N2 VM with 4 vCPUsand 5 GB of memory, which is 5120 MB, usen2-custom-4-5120.
  • RESERVED_ACCELERATOR_COUNT: the number ofGPUs you want to add, per VM, in the attached reservation.

  • RESERVED_ACCELERATOR_TYPE:thetype of accelerator you want to add inthe attached reservation.

  • INTERFACE_1 andINTERFACE_2: the type of interface you wanttheLocal SSD disks for each reservedVM to use. Valid options are:scsi andnvme. Each Local SSD diskis 375 GB. Repeat thelocalSsds parameter for each Local SSDdisk that you want to add. You can specify up to 24 Local SSD disks.

  • MINIMUM_CPU_PLATFORM: the minimumCPU platform that you want to specify for the attached reservation.

  • INSTANCE_TEMPLATE_NAME: the name of theinstance template that you want to use to create your attachedreservation.

  • SHARE_SETTING: the type of sharing for theattached reservation. Specify this field with the value asSPECIFIC_PROJECTS if you want to share your attached reservationacross multiple consumer projects. Exclude this field if you wantcreate a single-project reservation.

  • CONSUMER_PROJECT_ID_1 andCONSUMER_PROJECT_ID_2:theproject IDsof the projects that can share this reservation; for example,project-1 andproject-2. You can include up to 100 consumerprojects. These projects must be in the same organization as theowner project. Don't include the ID of the project where you createthis reservation, as that project is allowed to consume thisreservation by default. Exclude these fields if you want to create asingle-project reservation.

Compute Engine creates the commitment and the attached reservations onlyif there are enough resources of the specified machine type in the targetzone, and sufficient quota, at the time of your request. If your purchasewas successful, Compute Engine returns a200 status for yourREST API request.

Examples for purchasing commitments by creating new reservations to attach

The following example scenarios and commands show how you can purchase acommitment for GPUs, Local SSD disks, or both by creating new reservationsto attach to that commitment.

Example 1: Purchase a commitment for GPUs by attaching a single new reservation

Suppose you want to purchase a commitmentcommitment-01 in theus-central1 region that includes 4 NVIDIA V100 GPUs. You want tocreate a new reservationreservation-01 as the attachedreservation for those GPUs. Suppose you also want to specifyCompute Engine to use those reserved GPUs across 2n1-standard-8VMs in theus-central1-a zone. To purchase this example commitmentwith its attached reservation, make the followingPOST request:

POST https://compute.googleapis.com/compute/v1/projects/my-project/regions/us-central1/commitments{  "name": "commitment-01",  "plan": "TWELVE_MONTH",  "type": "GENERAL_PURPOSE"  "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"    }  ]}

Example 2: Purchase a commitment for GPUs without committing to vCPUs or memory

To commit to and reserve GPUs and Local SSD disks without committing tovCPUs or memory, specify0 as the value for vCPU and memory quantities.For example, suppose you want to purchase a commitmentcommitment-02 fora single NVIDIA P4 GPU in theus-west2 region. You also want to createa new reservation as the attached reservation and specifyCompute Engine to use the reserved GPU on ann1-standard-2 VM intheus-west2-b zone. To purchase this example commitment with its attachedreservation, make the followingPOST request:

POST https://compute.googleapis.com/compute/v1/projects/my-project/regions/us-west2/commitments{  "name": "commitment-02",  "plan": "TWELVE_MONTH",  "type": "GENERAL_PURPOSE",  "resources":  [    {      "amount": "0",      "type": "VCPU"    },    {      "amount": "0",      "type": "MEMORY"    },    {      "acceleratorType": "nvidia-tesla-p4",      "amount": "4",      "type": "ACCELERATOR"    }  ],  "reservations":  [    {      "name": "reservation-01",      "specificReservation":      {        "count": "1",        "instanceProperties":        {          "guestAccelerators":          [            {              "acceleratorCount": 4,              "acceleratorType": "nvidia-tesla-p4"            }          ],          "machineType": "n1-standard-2"        }      },      "specificReservationRequired": false,      "zone": "us-west2-b"    }  ]}

Example 3: Purchase a commitment for GPUs and Local SSD disks by attaching multiple new reservations

Suppose you want to purchase a commitmentcommitment-03 for 1NVIDIA V100 GPU and 2 Local SSD disks in theus-central1 region. You alsowant to create and attach two reservations in theus-central1-a zone. In the first reservation,res-01, you want toreserve 1n1-standard-2 VM with 1 GPU. You want to makeres-01 atargeted reservation, which means that you must specifically target thatreservation by name to use its reserved VMs. In the second reservation,res-02, you want to reserve 1n1-standard-8 VM with 2 types ofattached Local SSD disks. To purchase this example commitment with theattached reservations, make the followingPOST request. Note that theexample commitment also contains vCPU and memory resources.

POST https://compute.googleapis.com/compute/v1/projects/my-project/regions/us-central1/commitments{  "name": "commitment-03",  "plan": "TWELVE_MONTH",  "type": "GENERAL_PURPOSE",  "resources":  [    {      "amount": "96",      "type": "VCPU"    },    {      "amount": "638976",      "type": "MEMORY"    },    {      "acceleratorType": "nvidia-tesla-v100",      "amount": "1",      "type": "ACCELERATOR"    },    {      "amount": "768000",      "type": "LOCAL_SSD"    }  ],"reservations":  [    {      "name": "res-01",      "specificReservation":      {        "count": "1",        "instanceProperties":        {          "guestAccelerators":          [            {              "acceleratorCount": 1,              "acceleratorType": "nvidia-tesla-v100"            }          ],          "machineType": "n1-standard-2"        }      },      "specificReservationRequired": true,      "zone": "us-central1-a"    },    {      "name": "res-02",      "specificReservation":      {        "count": "1",        "instanceProperties":        {          "localSsds":          [            {              "diskSizeGb": "375",              "interface": "SCSI"            },            {              "diskSizeGb": "375",              "interface": "NVME"            }          ]          "machineType": "n1-standard-8"        }      },      "specificReservationRequired": false,      "zone": "us-central1-a"    }  ]}

After you purchase a commitment with attached reservations, the reservationsremain active as long as the commitment is active. When your commitment expires,Compute Engine automatically deletes any attached reservations. If thereservations areautomatically consumed reservations,and you delete them, then any VM instances that were consuming it continue torun. You keep incurring charges for those VMs.

For the duration of your commitment's term, you cannot delete or resize anyattached reservations that contain GPUs, Local SSD disks, or both. However,you can replace the commitment's existing attached reservations with new ones.For more information on what can and cannot be changed for your attachedreservations, seeReplace reservations that are attached to commitments.

Purchase commitments for licenses

You can purchase commitments for your licenses if you run your workloads on VMsthat use the following operating system (OS) images:

  • SUSE Linux Enterprise Server (SLES) images
  • SLES for SAP images
  • Red Hat Enterprise Linux (RHEL) images

The CUD percentages that you receive for license commitments of each OS imagedepends on the number of vCPUs that your VM uses. The following tables show theCUD percentages for each type of software license commitment:

License commitment typeNumber of vCPUs1-year CUD percentage3-year CUD percentage
SLES images1-277%79%
SLES images3-454%59%
SLES images5+45%50%
SLES for SAP images1-259%63%
SLES for SAP images3-459%63%
SLES for SAP images5+59%63%
RHEL images1-820%Unavailable
RHEL images9-12720%Unavailable
RHEL images128+20%Unavailable

When you purchase a commitment for licenses, the commitment forms a "pool" oflicenses that automatically apply to any running VM instances within a selectedproject in a specified region. The licenses in the commitment are not tied toany one particular VM. When a VM starts, it takes a committed license from thepool, and when the VM stops it returns the license to the pool, where thelicense can be used by another VM. As long as there are available committedlicenses in the pool, you continue to receive discounts for the premium OS usage.

For example, if you need to run 10 VMs in two regions (5 VMs inus-central1and 5 VMs inus-west1) and under the same project ID, you must purchase 5licenses in each region to cover those running VMs. For each commitment, yourcommitted licenses can apply to any 5 concurrently running VMs at any timeduring the year in the respective region. You are billed monthly for thecommitments regardless of your usage.

After you purchase a commitment, your commitment becomes active on thefollowing day at 12 AM US and Canadian Pacific Time (UTC-8, or UTC-7 duringdaylight saving time).Compute Enginemaintains a lien on your project for each region in yourproject where you purchase a commitment. When you purchasea new commitment for any region in your project,Compute Engine associates the lien for that region withthe newly created commitment.

Between the time of your commitment purchase and its activation time, thestatus of your commitment remains asNOT_YET_ACTIVE (or asPENDING on theGoogle Cloud console). After activation, the status of your commitment changes toACTIVE.For example, suppose you purchase your commitment on January 20, 2024, at 10:00 PMUS and Canadian Pacific Time (UTC-8 or UTC-7). Compute Engine creates yourcommitment immediately with its status asNOT_YET_ACTIVE. Yourcommitment becomesACTIVE on January 21, 2024, at 12:00 AM USand Canadian Pacific Time (UTC-8 or UTC-7).

You can't cancel a license commitment after you purchase it. When your licensecommitments expire, your running VMs continue to run and you are charged for thelicenses at on-demand image prices.

Important: Always verify that committed use discount contracts orcommitments for your licenses are in the correct project ID and regions to avoidbeing double charged. You must purchase your license commitment in the sameproject and region as the machine using the license. For example, if youpurchase your license commitment in Project A, but the running VMs that requirethe OS images are in Project B, you are charged for the license commitment inProject A and the on-demand image price for the VMs running in Project B.

Permissions required for this task

To perform this task, you must have the followingpermissions:

  • compute.commitments.create to create a license for committed use discounts.

Purchase a license commitment using the Google Cloud console, the Google Cloud CLI,or REST.

Console

Before you purchase a commitment using the Google Cloud console, selectthe project where you want to use the resources and apply your CUDs. If you enabledCUD sharingfor your project's Cloud Billing account, then you can purchasethe commitment for any project from that Cloud Billing account.

After you select the project, perform the following steps:

  1. In the Google Cloud console, go to theCommitted Use Discountspage.

    Go to Committed Use Discounts

    TheCommitment list page appears and displays theHardware commitments tab.

  2. ClickSoftware license commitments.

  3. ClickPurchase commitment.

    ThePurchase a committed use discount page appears.

  4. In theName field, enter a name for your commitment.

  5. In theRegion field, select the region where you want to useresources at committed-use-discounted prices.

  6. In theDuration field, select acommitment plan,a1-year or3-year plan.

  7. In theLicense family field, select the OS license for which youwant to purchase the commitment.

  8. In theLicense type and quantity section, do the following:

    1. ForType, select the number of vCPUs that applies.
    2. ForNumber of licenses, select the number of OS licenses thatyou want to commit to purchasing.
  9. ClickPurchase.

  10. To finish purchasing your commitment, do the following:

    1. ClickPurchase.
    2. In thePurchase a committed use discount dialog, if you agreewith theservice specific terms, clickPurchase again.

gcloud

Using the gcloud CLI, run thegcloud compute commitments create-licensecommand to purchase a license commitment.

gcloud compute commitments create-licenseCOMMITMENT_NAME \    --license `LICENSE_URI`    --amountNUMBER_OF_LICENSES \    --cores-per-licenseCORES_PER_LICENSE \    --planPLAN \    --regionREGION \

Replace the following:

  • COMMITMENT_NAME: the name for your commitment.
  • LICENSE_URI: the license URI.For example:https://www.googleapis.com/compute/v1/projects/myproject/global/licenses/sles-sap-12
  • NUMBER_OF_LICENSES: the number of licenses youplan to purchase.
  • CORES_PER_LICENSE: the number of cores perlicense. Enter1-23-4, or5+.
  • PLAN: enter the plan length:12-month or36-month.
  • REGION: the region where this commitment applies.

For example, the following commitment is for 4 SAP licenses with 3-4 coresper license for 36 months in theus-central1 region:

gcloud compute commitments create-license commitment-1    --license https://www.googleapis.com/compute/v1/projects/myproject/global/licenses/sles-12    --amount=4    --cores-per-license=3-4    --plan=36-month    --region=us-central1

For example, the following commitment is for 2 SLES for SAP licenses with1-2 cores per license for 12 months in theus-central1 region:

gcloud compute commitments create-license commitment-2    --license https://www.googleapis.com/compute/v1/projects/myproject/global/licenses/sles-sap-12    --amount=2    --cores-per-license=1-2    --plan=12-month    --region=us-central1

REST

Use theregionCommitments.insert methodand include thelicenseResource field to define the license commitment'sproperties.

POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/commitments?requestId=OPTIONAL_UNIQUE_ID{    "name":COMMITMENT_NAME,    "plan":PLAN,    "category": "LICENSE",    "licenseResource": {      "coresPerLicense":CORES_PER_LICENSE,      "amount":NUMBER_OF_LICENSES,      "license": `LICENSE_URI`      }}

Replace the following:

  • COMMITMENT_NAME: the name for your commitment.
  • LICENSE_URI: the license URI.For example:https://www.googleapis.com/compute/v1/projects/myproject/global/licenses/sles-sap-12
  • NUMBER_OF_LICENSES: the number of licenses youplan to purchase.
  • CORES_PER_LICENSE: the number of cores perlicense. Enter1-23-4, or5+.
  • PLAN: enter the plan length:12-month or36-month.
  • REGION: the region where this commitment applies.

For example, the following commitment is for 4 SLES for SAPlicenses with 3-4 cores per license for 36 months in theus-central1region.

POST https://compute.googleapis.com/compute/v1/projects/myproject/regions/us-central1/commitments{    "name": "commitment-3",    "plan": "THIRTY_SIX_MONTH",    "category": "LICENSE",    "licenseResource": {      "coresPerLicense": "3-4",      "amount": "4",      "license": "https://www.googleapis.com/compute/v1/projects/suse-sap-cloud/global/licenses/sles-sap-12"      }}

Apply committed use discount recommendations

Google Cloud analyzes your VM spending trends with and without a commitmentand generates CUDs recommendations. You can use CUD recommendations to optimizeyour compute costs. You can compare the costs with and without a commitment, andestimate how much you can save each month with a commitment.

CUD recommendations are available in the Google Cloud console.TheRecommender generates a card withinformation about your VM usage over the last 30 days. If your VMs show a trendof uncommitted usage over 30 days, the Recommender classifies this asan opportunity to purchase commitments to reduce your VM costs.

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 previous 30 days ofusage history into consideration.

Recommendations for CUDs are generated by two separate algorithms, which youcan select from when purchasing (or accepting) them on the summary card.

  • Stable usage recommendations cover minimum stable usage over time.
  • Optimal recommendations are based on overall usage and might cover resourcesthat are not on all the time.

To learn more about how CUD recommendations work, seeCommitted use discount Recommender.

Review and accept a recommendation

To learn how to purchase the recommended commitments, seePurchasing recommendations

Dismiss a recommendation

To learn how to dismiss your commitment recommendations or to restorerecommendations that were previously dismissed, seeDismissing recommendations

History of recommendations

To learn how to view the history of your applied and dismissed commitmentrecommendations, seeViewing the history of recommendations.

View your commitments

View the list of all your commitments in the Google Cloud console, theGoogle Cloud CLI, or REST.

Console

In the Google Cloud console, view a list of commitments in theCommitted use discounts page.

Go to Committed use discounts

gcloud

Make a request using thecommitments 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

REST

You can get a list of commitments across all regions by making anaggregatedList requestto 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"    }]  }]

Modify a commitment

You can modify your active commitments in the following ways:

  • You can change the auto-renew status for your commitment. For more information,seeRenew commitments automatically.
  • You can extend your commitment's term length beyond the preset duration of 1 or 3years by specifying a custom end date for your commitment. For moreinformation, seeExtend commitment terms.
  • You can modify the amount of resources in your hardware commitments by eithermerging or splitting your existing commitments. For more information, seeMerge and split commitments.
  • You can upgrade your 1-year hardware commitments and convert theminto 3-year commitments. For more information, seeUpgrade commitments.
  • You can change the Cloud Billing account that is linked to, and paysfor, the project where you purchased your resource-based commitments.Learn about changing the Cloud Billing account for a project.

After you create the commitment, you can't modify the commitment's project,type, or region.

Cancel a commitment

After you create a commitment, you can't cancel it. You must pay the agreed uponmonthly amount for the duration of the commitment. Commitments are not affectedby future changes toon-demand prices of yourcommitted Compute Engine resources.

If you accidentally purchased a commitment or made a mistake while configuringyour commitment, then you have 14 calendar days from the commitment start dateto contactCloud Billing support for help. Approvalof any changes is subject to Google's discretion and isn't assured untilconfirmed by Google.

Understand 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 cancontact Google Cloud support.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-18 UTC.