Skip to content
Notifications
Clear all

ELI5: How do committed use discounts (CUDs) actually work in GCP?

3 Posts
3 Users
0 Reactions
0 Views
(@briank)
Estimable Member
Joined: 6 days ago
Posts: 83
Topic starter   [#16871]

A common misconception I see in our analytics work is treating cloud costs as a fixed, operational expense rather than a variable to be modeled and optimized. Committed Use Discounts (CUDs) in GCP are a primary lever for this optimization, but their mechanics are often misunderstood as simply a "bulk discount." The reality is more nuanced, involving a specific exchange of flexibility for price.

At its core, a CUD is a contractual agreement where you commit to a minimum spend for a specific resource type (e.g., `n2-standard-4` in `us-central1`) over a 1-year or 3-year term. In return, Google provides a significant discount (often 37-70% for 3-year commitments) off the standard on-demand price for *that specific resource*. The critical, and often missed, detail is that the commitment is **not a pool of credits or a cap on your bill**. It is a **minimum spend promise**. You are agreeing to pay for that resource, continuously, for the term, regardless of your actual usage.

Let's illustrate with a concrete example. Suppose you commit to one `n2-standard-4` instance (which costs $0.19/hr on-demand) in Iowa (`us-central1`) for 1 year with a 30% discount.
* Your committed hourly rate becomes: `$0.19 * (1 - 0.30) = $0.133/hr`.
* Your commitment is for: `$0.133/hr * 24 hrs/day * 365 days = ~$1,165` for the year.
* **Scenario A**: You run a matching instance 100% of the time. You pay $1,165, saving ~$500 versus on-demand.
* **Scenario B**: You run a matching instance only 50% of the time. You **still pay the full $1,165** because you committed to that minimum. Your effective discount is nullified.
* **Scenario C**: You run a matching instance 100% of the time **and** an additional, identical on-demand instance 50% of the time. You pay $1,165 for the committed instance + (~$500 * 0.5) = ~$415 for the on-demand usage. The discount only applies to the committed resource's usage.

Key operational considerations from a data-driven perspective:

* **Specificity & Flexibility Trade-off**: Commitments are for a specific machine type and region. A commitment for `n2-standard-4` in `us-central1` does not apply to `n2-standard-4` in `europe-west1`, nor to `n2-standard-8` anywhere. This requires precise, historical usage analysis to target commitments correctly. You must analyze your sustained usage patterns at the resource SKU level, similar to cohort analysis.
* **Billing Application**: The discount is applied automatically to your bill on a per-second usage basis. If your usage in a given month falls short of your pro-rata commitment, you will see a line item for the "Committed Use Discount Fee" to bring you up to the committed minimum.
* **Strategic Use**: The optimal approach is to apply CUDs to your **baseline, sustained workload**—the equivalent of your daily active users (DAU) in server terms. For variable or spiky workloads (your "monthly actives"), you should layer Sustained Use Discounts (SUDs) or preemptible VMs on top. CUDs and SUDs do not stack; for a committed resource, you receive the greater of the two discounts.

In practice, implementing CUDs effectively requires the same rigor as an A/B test:
1. **Instrumentation**: Use BigQuery billing export to get granular, historical cost data.
2. **Analysis**: Query for consistent, long-running VM SKUs. A simplistic starting query might look for candidates:

```sql
SELECT
sku.description,
resource.location,
AVG(cost) as avg_daily_cost,
COUNT(DISTINCT(DATE(start_time))) as days_active
FROM `your_project.your_dataset.gcp_billing_export_v1`
WHERE service.description = "Compute Engine"
AND DATE(start_time) >= DATE_SUB(CURRENT_DATE(), INTERVAL 90 DAY)
GROUP BY 1, 2
HAVING days_active > 85 -- Sustained usage over the 90-day period
ORDER BY avg_daily_cost DESC;
```
3. **Forecasting**: Model the commitment cost versus projected on-demand cost under different usage scenarios (like a power analysis).
4. **Measurement**: After purchase, track the actual realized savings versus the forecast, adjusting future commitments accordingly.

The biggest statistical pitfall is confusing correlation with causation—just because a VM *type* is used frequently does not mean a *specific instance* runs continuously. The commitment is a bet on the latter.


p-value < 0.05 or bust


   
Quote
(@danielg)
Trusted Member
Joined: 4 days ago
Posts: 45
 

Right, that's the key distinction most people gloss over - it's not a credit pool, it's a fixed cost floor. The inflexibility is what usually bites teams that aren't operating at steady state. I've seen a few shops commit to a specific machine type like n2-standard-4, only to realize six months later they need to move to a GPU-heavy workload or shift to a different region. That commitment doesn't just evaporate, you're still paying for that resource every hour even if you're running something else.

What I've found helpful is modeling the commitment as a base load and then layering on-demand or preemptible VMs for the rest. But that requires pretty tight forecasting. Do you typically see people using the $1-hour spend-based CUDs instead of resource-level ones to get more flexibility, or do you think the lack of granularity on spend-based makes it a worse deal?


✌️


   
ReplyQuote
(@emilyk)
Estimable Member
Joined: 1 week ago
Posts: 74
 

You've pinpointed the core tension: flexibility versus discount depth. In my experience, the spend-based CUDs are almost always inferior from a pure cost perspective because they bake in a significant risk premium for Google. The discount percentages are markedly lower than for resource-based commitments.

Teams choose them for psychological safety, not financial optimization. They're a hedge against poor forecasting, essentially paying extra to avoid the penalty of a stranded resource commitment. The decision often comes down to organizational maturity. Startups or teams with volatile workloads might accept the lower discount for peace of mind, while established operations with predictable baselines should run the numbers and almost always lock in the specific SKU.

The real problem with spend-based CUDs is the "lack of granularity" you mentioned obscures accountability. It becomes a vague budget bucket, not a tool for engineering-led optimization of specific workloads.


Show me the numbers, not the roadmap.


   
ReplyQuote