Cost-effective VM instances for batch jobs and fault-tolerant workloads with discounts of up to 91% compared to regular VMs.
What are Google Cloud Spot VMs?
Spot VMs are VM instances that offer excess Compute capacity from Google Cloud at significantly reduced prices. The service enables cost savings of up to 91% compared to regular on-demand VMs with identical performance. The trade-off: Google can terminate (preempt) Spot VMs at any time when capacity is needed for regular workloads. Unlike the earlier Preemptible VM generation, Spot VMs no longer have a fixed runtime limit — they can in principle run indefinitely until a preemption occurs.
Before terminating a Spot VM, Google sends a preemption signal. The default notice period is short; for workloads that need more time to save state or perform a graceful shutdown, a longer notice period can be configured. During this window, the application should save checkpoints, write state to persistent storage, or complete in-flight requests. Shutdown scripts can be executed automatically to handle cleanup tasks.
Spot VMs support common Compute Engine machine types and are available across many Google Cloud regions and zones, though availability and preemption frequency can vary by zone and machine type. A good practice is to distribute workloads across multiple zones to increase availability. Managed Instance Groups can automatically start new Spot VMs when old ones are terminated, enabling self-healing for fault-tolerant workloads.
Typical Use Cases
Batch Processing and Data Pipelines
Spot VMs suit batch jobs that process large amounts of data and scale horizontally. Data processing pipelines can use Spot VMs for worker nodes; on preemption, the pipeline simply starts new workers.
CI/CD Builds and Test Environments
CI/CD pipelines can use Spot VMs for build and test agents. Builds are usually short-lived and can be restarted easily on preemption.
Rendering and Transcoding
Video rendering, 3D rendering, or media transcoding are well-suited Spot VM workloads, since tasks can be distributed across many workers and individual preemptions barely affect overall progress.
Scientific Simulations and HPC
High-performance computing workloads can use Spot VMs provided checkpointing is implemented. Combined with persistent storage for state, long simulation runs remain feasible despite possible preemptions.
Machine Learning Training
ML training jobs are often long-running and benefit from Spot VMs when frameworks like TensorFlow or PyTorch support checkpointing. On preemption, training loads the last checkpoint and continues.
Best Practices
Implement Checkpointing
Regularly save application state to persistent storage (e.g. Cloud Storage, Persistent Disk) so processing can resume from the last checkpoint after a preemption.
Use Shutdown Scripts
Configure shutdown scripts that run automatically on preemption to save state or complete in-flight requests, taking the available notice period into account.
Distribute Workloads Across Zones
Use multiple zones to reduce the risk of many instances being preempted simultaneously. Managed Instance Groups simplify multi-zone deployments.
Combine Spot and Regular VMs
Hybrid setups use Spot VMs for scalable, fault-tolerant worker nodes and regular VMs for master nodes, databases, or other critical components.
Benefits
- Significant cost savings compared to on-demand VMs at the same compute performance
- No fixed runtime limit anymore, allowing more flexible use than earlier Preemptible VMs
- Integration with Managed Instance Groups for automatic self-healing
- Available in EU regions for data residency requirements
Integration with innFactory
As a certified Google Cloud Partner, innFactory supports you in migrating cost-intensive batch workloads to Spot VMs, implementing checkpointing strategies, and architecting fault-tolerant systems.
Contact us for a consultation on Google Cloud Spot VMs and compute cost optimization.
Available Tiers & Options
Spot VMs
- Up to 91% cheaper than regular VMs
- Same performance as standard VMs
- Available for all machine types
- No fixed maximum runtime anymore
- Can be terminated at any time
- No SLA guarantees
Typical Use Cases
Technical Specifications
Frequently Asked Questions
What are Google Cloud Spot VMs?
Spot VMs are VM instances that use excess Compute capacity from Google Cloud at significantly reduced prices, with discounts of up to 91% compared to regular on-demand VMs. Google can terminate Spot VMs at any time when capacity is needed elsewhere. They suit fault-tolerant workloads like batch jobs, rendering, or ML training.
Is there a time limit for Spot VMs?
No, Spot VMs no longer have a fixed minimum or maximum runtime, unlike the earlier Preemptible VMs with their 24-hour limit. A Spot VM can in principle run indefinitely until Google reclaims the capacity.
How do Spot VMs differ from the earlier Preemptible VMs?
Spot VMs are the current evolution of the earlier Preemptible VMs, with similar core mechanics but without a fixed runtime limit and with more flexible preemption configuration. Google recommends targeting new workloads at Spot VMs.
Which workloads are suitable for Spot VMs?
Ideal workloads are fault-tolerant and horizontally scalable without strict SLA requirements: batch processing, CI/CD, rendering, data analytics, ML training, and simulation workloads. Spot VMs are unsuitable for databases, web servers, or other stateful, latency-critical services.
How much advance notice is given before a Spot VM is terminated?
By default, notice is given via a shutdown signal with a short response window. For workloads needing more shutdown time, a longer notice period can be configured (available as a preview feature). Applications should use this time to save checkpoints or perform a graceful shutdown.
How much can I actually save compared to regular VMs?
Savings can reach up to 91% depending on region, zone, and machine type. Current, binding prices are available on the official pricing page for the relevant configuration.
Note: All product information on this page has been compiled with care, but is provided without guarantee and may be outdated or incomplete. Cloud services evolve rapidly — features, pricing, SLAs, and availability change frequently. Authoritative and up-to-date information can only be found on the official product page of Google Cloud (official documentation). This page does not represent an offer by Google Cloud.
