One of the advantages of public cloud computing is cost flexibility. This results not only from the scalability of services and adjusting consumption levels to current workloads but also from available discounts. We’re going to focus on one type of discount here: Committed use discounts (CUD)
Even those maintaining a steady monthly consumption level have significant opportunities to optimise expenses, thanks in part to the committed use discount, which can save up to 70% of costs.
What is a committed use discount in GCP?
Committed use discount (CUD) is one way to reduce costs for using computing power and virtual machine memory in Google Cloud. It works well in projects that use GCP services for an extended period.
The CUD discount involves committing to a fixed monthly usage of cloud resources for a period of one or three years. It can be compared to a mobile phone subscription – you sign a contract for a specified time and receive a renewable pool of minutes of talking or texts to send. Whether you send 10 or 500 texts, the bill will be the same every month.
Similarly, in CUD discounts, you subscribe to a “plan” for virtual resources, and each month you receive a bill for a fixed amount, even if you do not use the entire pool. However, if the load is higher (e.g., increased traffic in an e-commerce site during Black Friday), for resources exceeding those specified in the committed use discount, you will pay the standard price.
Google Cloud services covered by CUD discount
You can use CUD discounts for the following services:
- Google Compute Engine (GCE),
- Google Kubernetes Engine (GKE),
- Cloud SQL,
- Google Cloud VMware Engine.
Where CUD discounts do not apply?
Commitment discounts do not apply to:
- Flexible environment in the App Engine service,
- Dataflow service,
- Preemptible Virtual Machines instances,
- Sole-tenant nodes (Compute Engine servers dedicated to handling loads for only one organization),
- Extended RAM added to virtual machines as extended memory,
- f1-micro, g1-small, and shared-core machines (including N1 shared-core machines),
- Higher throughput interfaces of N2 and C2 machines – 50, 75, and 100 Gb/s.
Methods of calculating committed use discounts
The discount is calculated in two ways, depending on the cloud service:
Based on used resources (resource-based) – a discount in exchange for committing to using a specific level of virtual machine resources: vCPU, RAM, GPU, and local SSDs; applies to Compute Engine, Google Kubernetes Engine, and Dataproc services,
Based on incurred costs (spend-based) – a discount awarded based on a commitment to a fixed monthly amount for a service operating in a specified region; this is how discounts are calculated for Cloud SQL and Cloud VMware Engine services, taking into account the use of vCPU and RAM.
Committed use discounts vs. sustained use discounts
Commitment use discount is not the only discount that operates among Google Cloud services; alongside CUD, there is also SUD – sustained use discount, a discount for prolonged usage.
Sustained use discounts are awarded automatically, and the longer (continuously) virtual machines operate during the month, the higher the discount. When resources are used for more than 1/4 of the month, Compute Engine allocates a discount for each minute of instance work – up to 30% for N1 machines and up to 20% for N2 machines. The SUD discount does not apply to E2 and A2 family machines.
It is not possible to simultaneously use both committed use discount and sustained use discount for the same resources. However, resources that do not qualify for the CUD discount automatically receive a sustained use discount for prolonged usage.
See also: 8 pro tips to cut Google Cloud Cost
CUDs for services using virtual machines (GCE, GKE, Dataproc)
Compute Engine, Google Kubernetes Engine, and Dataproc services use the power of Google Cloud virtual machines. Committed use discounts are awarded per instance from a given family of machines, so the discount calculation method is the same for these three services.
Discounts are awarded within the Google Cloud region. If your application is deployed in a multi-region model, you will need to create a separate committed use discount for each region. Awarded discounts apply to resources within one billing account or project in Google Cloud where discounts were approved. If resources are shared across projects under one billing account and the entire pool is not used, funds remain in the project where the CUD commitment was created.
Calculating the discount amount
Google distinguishes several types of CUD discounts, covering machines from a given family – both predefined (predefined) and custom machine types:
- General-Purpose E2 for E2-type machines,
- General-Purpose N2 for N2-type machines,
- General-Purpose N2D for N2D-type machines,
- General-Purpose N1 for N1-type machines,
- Compute-optimised for C2-type machines,
- Memory-optimised for M2-type machines,
- Accelerator-optimised for A2-type machines.
The discount amount depends on the following factors:
- Discount period – 1 or 3 years,
- Discount category (general-purpose, compute-optimised, etc.),
- The size of the virtual machine within the family (e.g., the number of vCPUs, amount of RAM),
- The number of virtual machines within a given category.
The discount is awarded separately for each machine category. The greater the machine size and the longer the discount period, the higher the discount rate.
Discount rates range from 30% to 57% for standard machines, up to 70% for memory-optimised machines, and up to 57% for accelerator-optimised machines.
Example CUD discount calculation
Below is a summary of how the discount is calculated, depending on the type of machine, discount period, and machine size.
Discounts are calculated separately for each machine category. Here is an example of how the discount is calculated for E2-type machines:
- Machine type: General Purpose – E2,
- Discount period: 3 years,
- Machine size: e2-standard-4 (4 vCPUs, 16 GB RAM),
- Number of machines in a given category: 10.
The discount calculation involves multiplying the discount rate by the number of vCPUs, amount of RAM, and the number of machines in a given category. The result is multiplied by the number of hours in a month.
Let’s calculate the discount for the example above:
- Discount rate for E2-type machines (general-purpose, 3-year commitment) – 37.5%,
- Number of vCPUs for one machine – 4,
- Amount of RAM for one machine – 16 GB,
- Number of machines – 10,
- Number of hours in a month – 730 (30 days x 24 hours).
Discount calculation formula:
- Discount = Discount rate x (Number of vCPUs x vCPU price + Amount of RAM x RAM price) x Number of machines x Number of hours in a month.
- Calculating discount = 0.375 x (4 x $0.0352 + 16 x $0.0048) x 10 x 730.
- Final discount ≈ $1,267.20.
The calculated discount for this example is approximately $1,267.20. This amount is subtracted from the total cost of using 10 E2-type machines for one month.
Keep in mind that this is a simplified example, and the actual discount calculation involves additional factors. The discount calculation is performed automatically based on the committed use discount commitment created in Google Cloud.
CUDs for Cloud SQL and Cloud VMware Engine services
Committed use discounts for Cloud SQL and Cloud VMware Engine services are awarded based on incurred costs, not the number of virtual machine resources used. The calculation method differs from the resource-based discount for virtual machines.
Discounts are calculated based on the total monthly spending on a given service in a specific region. If the monthly spending exceeds the committed amount, the discount is applied only to the amount within the limit. If the spending is lower, the discount is calculated based on the actual spending.
Discount rates for Cloud SQL and Cloud VMware Engine services range from 20% to 52%. The higher the commitment period, the higher the discount rate.
The discount calculation formula for spend-based discounts is as follows:
Discount = Discount rate x (Total monthly spending – Committed amount).
The commitment amount is set when creating a CUD commitment. The actual spending and discount are calculated automatically by Google with each billing cycle.
The committed use discount is a way to optimise the costs of using Google Cloud services. For projects with a stable demand for computing power, committing to a fixed monthly usage for one or three years can significantly reduce expenses compared to standard pay-as-you-go pricing. It’s worth considering the committed use discount, especially for long-term projects and applications with predictable resource requirements.
It’s important to analyse usage patterns, choose the right discount period, and calculate the potential savings before committing to a CUD. Additionally, regularly monitoring and adjusting commitments to actual needs can help maximise the cost-effectiveness of using committed use discounts in Google Cloud.