Skip to main content

Consumption options

Exam guide§2.1

Consumption options are the different "rental agreements" for your TPU compute power. Each option sets its own terms for how quickly you get capacity, how long you can keep it, and what it costs. Picking the right one is as much a financial and logistical decision as a technical one.

Factors to weigh

Before choosing an option, size up the workload against five questions:

Speed

How quickly do you need the TPU capacity to be available?

Duration

How long will you need the capacity for your workload?

Flexibility

Do you need a precise, defined period, or can you be flexible?

Preemption tolerance

Can the workload handle being unexpectedly stopped (preempted)?

Pricing

What is your budget?

Five factors to weigh before picking a consumption option.

Quota: your compute allowance

Quota is your pre-approved allowance for using Cloud TPU cores. Google Cloud uses quotas to ensure fair resource distribution, prevent usage spikes, and help customers avoid cost overruns. A quota limits how much of a specific resource a project can consume, and it applies to hardware, software, and network components alike (API call volumes, concurrent load balancers, total projects, and so on).

Your quota requirements depend on how you consume TPUs:

FactsQuota by consumption path
  • Cloud TPU APIs directly - you need either on-demand or preemptible quota for the number of TPU cores you want. Different TPU versions have different default quotas.
  • TPUs through GKE - you use Compute Engine API quota instead, a different quota system.
GotchaGKE draws on a different quota system

Managing TPUs through GKE consumes Compute Engine API quota, not Cloud TPU quota. If you plan capacity around TPU quota alone, GKE workloads can fail to schedule. See the Cloud TPU quotas documentation for the specifics.

Dynamic Workload Scheduler (DWS)

Dynamic Workload Scheduler (DWS) optimizes the allocation of high-demand, finite resources such as GPUs and TPUs, so workloads can get the hardware they need when they need it. It directly addresses the supply-and-demand imbalance by balancing customer demand against the cloud's finite resources.

FactsDWS at a glance
  • Built on Google Borg technology.
  • Improves access to AI/ML resources, helps optimize spending, and schedules all needed accelerators simultaneously.
  • Supports TPUs and NVIDIA GPUs.
  • Integrated with Compute Engine Managed Instance Groups, GKE, Agent Platform, and Batch.

DWS offers two provisioning modes. For simplicity: flex start mode is like waiting in line, and calendar mode is like booking a hotel.

Flex start modeCalendar modeAnalogyWaiting in line.Booking a hotel room.How it worksRequest hardware for a specified period;requests are fulfilled as soon as possibleand you pay only for what you use.Reserve hardware in advance for a period youknow you will need; resources are placedphysically close to minimize networklatency.Duration1 minute to 7 days.1 to 90 days.Best forFine-tuning models, experimentation, andshorter training jobs.Workloads with known, planned-ahead capacityneeds.
The two DWS provisioning modes - flex start requests capacity as soon as possible; calendar mode books it in advance.

The three consumption options

Beyond DWS, TPU capacity is requested through three main methods that trade off assurance, flexibility, and price.

Long-term reservationOn demandSpotWhat it isReserve TPU resources in advancefor an extended period (typically1 year or longer), dedicated toyou for the whole duration.The default, most flexible option.Request resources as soon aspossible and keep them as long asyou want.Request resources that GoogleCloud can preempt (shut down) anytime capacity is needed elsewhere.No runtime limit.PricingLower than on-demand via acommitted use discount (CUD), inexchange for the long-termcommitment.Standard on-demand pricing.Much lower than on-demand(significant discounts).PreemptionHighest assurance of dedicatedcapacity; not preempted.Instant access if available and nofixed end time; less likely to bepreempted.Can be preempted at any time; therisk is always present.Quota usedReserved capacity across all TPUversions, regions, and zones.Your on-demand quota.Your preemptible quota. Cansometimes be easier to obtain thanon-demand when capacity is tight.Best forLarge, long-running training andstable inference needingconsistent, uninterrupted compute(e.g. reserving v5p for a year topre-train a foundation model).Urgent jobs, ad-hocexperimentation, and workloadsthat need a flexible end time andcannot tolerate interruptions.Fault-tolerant, lower-prioritywork like pre-training,fine-tuning, and simulation thatcan be stopped and restartedgracefully.
The three Cloud TPU consumption options compared across price, preemption risk, quota, and fit.

Recap

DECISIONWhich consumption option?

Trade assurance and price against your workload's tolerance for interruption. Long-term reservations give the highest assurance of dedicated capacity plus a committed use discount - the go-to for large, long-running training. On demand maximizes flexibility with instant access and no fixed end. Spot is the cheapest, best for work that can survive being preempted.

Pick this when: Long-term reservation for guaranteed capacity + CUD on stable, critical, long-running jobs; on-demand for urgent, interruption-intolerant, flexible-end-time work; spot for cheap, fault-tolerant, lower-priority workloads