DEV Community

Nguyễn Long
Nguyễn Long

Posted on

[GCP] Resource vs Billing management

Resource hirarchy

5 levels:

  • Domain
  • Organiztion
  • Folders
  • Projects
  • Resources

To create resource, must create project level first
1 resource could be in only one project
Not be able to be in multiple projects at the same time.

Resources

Including Service resource of gg cloud example: VMs, Storage....etc

Labels:

  • Help categorize resources by key value pair

Billing Account:

Role:

  • Billing account creator
    • Permissions: Can create new billing accounts.
    • Use Case: Typically assigned to individuals responsible for setting up billing for a project or organization.
  • Billing account user
    • Permissions: Allows a user to associate projects with a billing account and view basic billing information.
    • Use Case: Useful for team members who need to link projects to the billing account but don’t require full management permissions.
  • Billing Account Viewer
    • Permissions: Can view billing information, such as reports and transaction details, but cannot make changes or associate projects with billing accounts.
    • Use Case: Best for stakeholders who need visibility into billing without the ability to modify settings (e.g., financial auditors).
  • Project Billing Manager
    • Permissions: Can link or unlink billing accounts to/from specific projects but cannot view billing details or manage the billing account itself.
    • Use Case: Ideal for project managers who need control over which billing account is linked to their projects but do not need access to overall billing data.
  • Billing account Administrator:
    • Permissions: Has full control over the billing account, including managing payment methods, viewing reports, associating projects, and assigning roles.
    • Use Case: Best suited for individuals or teams responsible for overseeing all billing-related activities for an organization.

Cost Management and Budget Alerts

Commited Use Discounts (CUD's)

Discount prices when you commit to using a minimum level of resources for a specified term

1 or 3 years commitment
2 types commitment

  • Spend based
  • Resource based

Spend based commitment

Discount for a commitment to spend a minimum amount for a service (hours) in a particular region

If you commit to spending $100,000 on Compute Engine over a one-year period, Google Cloud may offer you a discounted rate on that service. You can use the Compute Engine resources freely within that spend, benefiting from the lower costs.

Spend-based commitments are ideal for organizations with predictable cloud usage that want to optimize their costs while maintaining flexibility.

If you do not use the entire $100,000 commitment over the one-year period?

you will still be required to pay the full committed amount. Spend-based commitments in Google Cloud are binding, meaning that you are obligated to pay for the amount you committed to, even if your actual usage falls short of that amount.

  • Full Payment Obligation: You will still be charged the full $100,000, regardless of your actual consumption.
  • No Refunds: Google Cloud does not refund or reduce your payment if you do not fully utilize the committed spend.
  • Planning Considerations: To avoid this, it’s essential to carefully estimate your anticipated cloud usage before entering into a spend-based commitment.

What Happens If You Use More Than $100,000 ?

If you use more than the committed amount (in this case, over $100,000) during the one-year period, the excess usage will be billed at the standard pay-as-you-go rates without any additional discounts from the spend-based commitment.

  • Discount Applies Only Up to the Committed Amount: You receive discounted pricing only for the committed $100,000. Once you exceed this amount, any further usage is charged at the regular on-demand rates.
  • No Penalties for Over-Usage: You are free to use more than your commitment, but the discounts do not apply beyond the committed spend.

  • Regular Billing for Excess Usage: Any usage beyond your commitment will be billed monthly, just like regular Google Cloud billing, but without the discounted rates.

Benefit?

25% discount for 1 year - 52% discount for 3 year

Available for :

  • Cloud SQL instacnes:
  • BigQuery Reservations
  • GG VMWare Engine:
    • Google Kubernetes Engine (GKE)
    • Google Cloud Compute Engine
    • Cloud Run

Applies only to CPU and memory usage

Resource based commitment

Discount for a commitment to spend a minimum amount for compute Engine resources in a particular region

For example, you might commit to using 64 vCPUs and 256 GB of memory for a one-year term.

Available for :

  • vCPU, Memory, GPU and Local SSD

Discounted Pricing: In exchange for committing to these resources, you receive a substantial discount (often up to 50-70% off) compared to the regular, on-demand rates.

  • 57% discount for most resource
  • 70% for memory-optimized machine types

For use across Projects

Use case:

  • Predictable Workloads: This option is ideal for workloads that are predictable and steady, as it helps reduce costs significantly over time.

  • Applicable to Specific Services: Resource-based commitments are most commonly used for:

    • Compute Engine: Virtual machine (VM) instances, CPU, RAM, GPUs.
    • Google Kubernetes Engine (GKE): Resources used by Kubernetes - clusters.
    • Cloud SQL: For database resource allocations (vCPUs and RAM).
    • Cloud Spanner: For specific database instances and resources. ### Example: If you commit to using 100 vCPUs and 512 GB of RAM for a one-year period for Compute Engine, you’ll receive a discounted price for this specific resource allocation. If you use more than this, the additional resources will be charged at the regular rate, but if you use less, you’ll still be charged for the committed resources. ## Sustained-use discounts Automatic discounts for running Compute Engine resources a significant portion of the billing month Applies to vCPUs and memory for most Compute Engine instance types

Does not apply for App Engine flexible:

  • Dataflow
  • E2 machine types

Key Feature

  • Automatic Discounts:
    • SUDs are automatically applied when you use a Compute Engine VM for more than 25% of a month. The longer you run the VM, the larger the discount becomes, reaching up to 30% off the standard price when the VM is used for nearly the entire month.
  • No Commitment Required:
    • Unlike committed-use contracts, there’s no need to pre-purchase or commit to a specific amount of resources. The discount is automatically applied based on how long you use the VM each month.
  • Proportional Discounts:
    • The discount grows as your usage increases. Here’s a breakdown:
      • For the first 25% of the month, you pay the full price.
      • For 25% to 50% usage, you get a small discount.
      • For 50% to 75% usage, the discount increases further.
      • For usage above 75%, you get the maximum discount (up to 30%).

Cloud Billing Budgets

Enable you to track your actual Google Cloud spend against your planned spend

Budget alert threshold rules that are used to trigger email notifications to help you stay informed about your spend

Feature:

Define the scope of the budget

  • Spen of billing account or more granular

Budget amount can be set to a specified total, or based on previous month's spend

Alert emails are sent to billing account admins and specific users when costs exceed a percentage of the budget

Top comments (0)