Preemptible virtual machines (VMs) are a cost-saving option offered by AWS, Azure, and Google Cloud. These VMs utilise surplus capacity at discounts of up to 90%, but they come with a trade-off: they can be interrupted at any time. Here’s what you need to know:
- AWS Spot Instances: Offers the largest discounts (up to 90%), but prices fluctuate frequently, requiring constant monitoring. AWS gives a two-minute warning before interruptions.
- Azure Spot Virtual Machines: Discounts range from 30–90%. Pricing is more stable than AWS, with at least 30 seconds’ notice before interruptions. Users can set maximum prices and choose between
stop/deallocate
ordelete
policies. - Google Cloud Preemptible VMs: Discounts range from 60–91%. Pricing is predictable with a strict 24-hour runtime limit. A 30-second warning is provided before termination.
These VMs are ideal for tasks like batch processing, data analysis, and development environments. However, they are less suited for critical workloads due to the risk of interruptions.
Quick Comparison
Provider | Discount Range | Interruption Notice | Pricing Stability | Unique Feature |
---|---|---|---|---|
AWS Spot | Up to 90% | 2 minutes | High volatility | Deepest discounts |
Azure Spot VMs | 30–90% | 30 seconds | Moderately stable | Flexible eviction policies |
Google Preemptible | 60–91% | 30 seconds | Very stable | Fixed 24-hour runtime limit |
These pricing models allow you to cut costs significantly if your workloads can tolerate interruptions. Choose based on your need for savings, stability, and workload flexibility.
Google Cloud PREEMPTIBLE and SPOT VIRTUAL MACHINES explained!
1. AWS Spot Instances
AWS Spot Instances allow you to access unused EC2 capacity at significantly reduced prices, thanks to their reliance on Amazon's surplus computing resources. These instances are available when demand for On-Demand instances decreases, making them a cost-effective solution for many workloads.
Pricing Methodology
The pricing for Spot Instances is dynamic, with Amazon EC2 automatically adjusting Spot prices based on long-term supply and demand trends for capacity [4]. Unlike fixed pricing structures, Spot prices vary for each instance type and differ across Availability Zones.
You are charged the Spot price active at the start of each instance-hour, regardless of any price changes during that hour [5]. Importantly, AWS ensures you never pay more than the On-Demand price for any instance [5].
For instance, in the us-east-1
region, the On-Demand price for a c6a.large
instance is approximately £0.062 per hour (converted from ~$0.077). In comparison, Spot prices for the same instance typically range between £0.014 and £0.020 per hour, depending on the Availability Zone [5]. This pricing model offers substantial savings, as outlined below.
Discount Range
Spot Instances can provide discounts of up to 90% compared to On-Demand pricing, far exceeding other discount programmes, which usually offer savings of up to 72% [4][5][6]. However, these savings come with the trade-off of potential preemptions, discussed in the next section.
Preemption Policies
One key aspect of Spot Instances is the risk of interruption. AWS provides a two-minute warning before an instance is interrupted, giving you time to save your work or shut down processes gracefully [7]. To minimise disruption, you can configure instances to stop or hibernate during interruptions and use tools like Auto Scaling or EC2 Fleet to automatically replace interrupted instances [7].
Additionally, AWS offers EC2 Instance rebalance recommendations, which serve as early alerts when a Spot Instance is at a higher risk of being interrupted [7].
For better reliability, AWS suggests maintaining flexibility by being prepared to use at least 10 different instance types for your workload. This increases your chances of securing the necessary compute capacity [7]. Using a price-capacity-optimised strategy ensures you get the best balance of cost savings and availability by automatically selecting instances from the most available and lowest-priced Spot capacity pools [7]. This makes Spot Instances an excellent choice for batch processing, containerised applications, CI/CD pipelines, and high-performance computing tasks [7].
2. Azure Spot Virtual Machines
Azure Spot Virtual Machines let you tap into Microsoft's unused compute capacity at a lower cost. They replace the older Azure low-priority VMs and come with dynamic pricing that changes in real-time based on capacity availability. Here's a closer look at how the pricing works and the benefits they offer.
Pricing Methodology
Azure Spot Virtual Machines use a dynamic pricing model that depends on factors like available capacity, VM type, and region [8]. Users can set a maximum price (in USD) with up to five decimal places [9]. If you set the maximum price to -1
, your VM won't be evicted due to pricing changes - you'll pay either the current spot price or the standard rate, whichever is lower [9]. When capacity is plentiful, discounts are greater; when capacity is tight, the savings are smaller [10].
Discount Range
Spot Virtual Machines can save you up to 90% compared to standard pay-as-you-go rates, with typical savings ranging from 30% to 90%, depending on demand [8][10]. The actual discount depends on the VM size, deployment region, and operating system [11]. Jeremy Smith explains:
We use Azure Spot Virtual Machines to take 80 per cent off our costs almost instantly. It's an option for buying unused compute capacity at a discount.[8]
These savings make Spot Virtual Machines particularly appealing for workloads that can handle interruptions.
Preemption Policies
While the savings are impressive, Azure provides clear policies for handling potential interruptions. When deploying Spot Virtual Machines, you must choose an eviction policy to determine how your workload is managed during interruptions [10]. Microsoft guarantees at least 30 seconds' notice before eviction, giving you time to prepare [11].
- Stop/Deallocate Policy: Suitable for workloads requiring specific VM sizes and locations. After eviction, the VM loses compute capacity and its non-static IP address, but data disks remain attached and continue to incur charges.
- Delete Policy: Ideal for workloads that don't need persistent data. This policy removes the VM and its data disks entirely, freeing up resources and avoiding ongoing storage costs.
Policy | Best Suited For |
---|---|
Delete policy | Short-lived compute tasks; minimal budgets; workloads not reliant on data disks |
Stop/Deallocate policy | Workloads needing specific VM sizes or locations; longer deployment times acceptable |
Microsoft states that Spot Virtual Machines are interrupted less than 10% of the time [10]. To make your workloads more reliable, consider designing them for graceful shutdowns within 30 seconds, using a mix of VM sizes and regions, and employing continuous monitoring tools like Scheduled Events to stay ahead of potential evictions [11].
Need help optimizing your cloud costs?
Get expert advice on how to reduce your cloud expenses without sacrificing performance.
3. Google Cloud Preemptible VMs
Google Cloud's Preemptible VMs (also referred to as Spot VMs) provide access to surplus Compute Engine capacity at much lower costs. Like similar offerings from AWS and Azure, these VMs are ideal for workloads that can tolerate interruptions, such as batch processing or data analysis.
Pricing Methodology
Google Cloud keeps its pricing model for Preemptible VMs simple. These VMs utilise excess capacity, and if they're stopped within the first minute, no charges apply for compute or local SSD usage [1]. This approach ensures a predictable cost structure while offering substantial savings, making it easier to balance affordability with reliability for fault-tolerant tasks.
Discount Range
Preemptible VMs come with discounts ranging from 60% to 91% compared to standard pricing. This makes them a strong option for use cases like batch jobs, data processing tasks, or development environments where occasional interruptions are acceptable [1][12].
Maximum Runtime
All Preemptible VMs have a strict runtime limit of 24 hours. If the VM is restarted, the clock resets, allowing another 24-hour cycle [12][1]. This fixed time frame highlights the importance of designing workloads that can efficiently operate within these constraints.
Preemption Policies
When Google Cloud needs to reclaim capacity, it sends a preemption notice to the instance using an ACPI G2 Soft Off signal [1]. This provides up to 30 seconds to shut down gracefully. After this grace period, a force termination signal is sent, and the instance is moved to TERMINATED
status. Compute charges stop at this point, though any attached persistent disks will continue to incur storage costs [1].
Google reports an average preemption rate of 5–15% per day per project, with occasional spikes that depend on timing and availability zones. To minimise disruption, the system prioritises newer instances over older ones, ensuring that no single customer faces excessive preemptions [13].
Preemption Scenario | Billing Impact |
---|---|
Preempted within 1 minute | No charges for the VM instance or local SSD usage |
Standard preemption | Charged for actual usage time until termination |
24-hour limit reached | Charged for the entire 24-hour period |
The table above summarises how billing works under different preemption scenarios.
For better reliability, it’s essential to design applications that can handle preemptions effectively. For instance, using shutdown scripts during the 30-second warning can help preserve data and ensure smooth transitions. Distributing workloads across multiple zones and configurations can also mitigate potential capacity issues [12].
Advantages and Disadvantages
When it comes to choosing a platform, understanding the strengths and challenges of each provider's preemptible VM options is essential. Each provider offers distinct benefits and trade-offs, which can significantly influence your decision.
One of the most attractive aspects is the potential for cost savings. AWS promises discounts of up to 90%, Google Cloud ranges between 60–91%, and Azure also offers up to 90% off standard pricing [2] [1] [10]. However, these savings come with varying levels of predictability and stability.
Pricing Volatility
Frequent price adjustments can pose operational hurdles. AWS leads the pack with an average of 197 price changes per month, followed by Azure at 0.76 and Google Cloud at just 0.35 changes per month [2]. This means AWS requires constant monitoring to maintain cost efficiency, while Google Cloud offers a much steadier pricing environment. Azure strikes a balance between these two, being more predictable than AWS but not as stable as Google Cloud.
Availability and Interruptions
The availability and preemption patterns also differ notably. Azure experiences interruptions in fewer than 10% of cases, but during periods of high demand, savings can drop to 30–40%. Google Cloud, on the other hand, maintains an average preemption rate of 5–15% daily, with a predictable 24-hour maximum runtime [10] [1].
The following table highlights the key advantages and disadvantages of each provider:
Provider | Key Advantages | Primary Disadvantages |
---|---|---|
AWS Spot Instances | Offers the largest discounts (up to 90%) | High price volatility (197 monthly changes), requiring constant monitoring |
Azure Spot VMs | Stable pricing with low interruption rates (<10%); flexible eviction policies | Savings can vary (30–90%), with discounts dropping to 30–40% during peak demand |
Google Cloud Preemptible VMs | Predictable pricing and consistent discounts; fixed 24-hour runtime | Strict runtime limitations; less flexibility in pricing |
Suitability for Workloads
Preemptible VMs are best suited for fault-tolerant applications like batch processing, CI/CD pipelines, and machine learning workloads. However, their lack of service-level agreements (SLAs) makes them less ideal for mission-critical tasks [3] [14] [10] [1].
AWS Spot Instances, while offering the deepest discounts, demand significant operational effort as teams must actively monitor prices and adjust configurations [2]. Google Cloud's fixed discount structure simplifies management, while Azure provides a middle ground, delivering savings with less need for constant oversight.
Shutdown Grace Periods
Another important consideration is the shutdown grace period. Google Cloud provides a 30-second window to save application state gracefully before termination [1]. While AWS and Azure offer similar preemption notices, the actual effectiveness depends on how quickly your applications can respond to these signals.
Choosing the Right Option
For organisations focused on maximum savings and with robust fault-tolerant systems, AWS Spot Instances are a strong choice. Teams looking for simplicity and predictable costs may prefer Google Cloud Preemptible VMs, while Azure Spot VMs offer a balanced option for those wanting savings without the challenges of high volatility.
These insights provide a clearer picture of how preemptible VM pricing strategies align with operational needs and priorities.
Summary
Preemptible VM pricing models offer a practical way to cut costs, with each cloud provider adopting its own approach to savings.
AWS Spot Instances can reduce expenses by up to 90%, thanks to dynamic pricing. However, they come with challenges, such as an average of 197 price changes per month and a mere two-minute termination notice. These instances work best for teams prepared to handle constant monitoring and quick responses [2] [15].
Google Cloud Preemptible VMs, on the other hand, provide a more stable pricing structure. They offer up to 91% discounts and a fixed 24-hour runtime, making costs easier to predict. However, the 30-second shutdown notice means teams must ensure rapid state-saving processes [2] [15].
Similarly, Azure Spot VMs deliver up to 90% savings compared to standard rates, combining substantial cost reductions with relatively stable pricing [15] [2].
The right choice depends on your workload's tolerance for interruptions. Fault-tolerant applications like CI/CD pipelines, batch jobs, and data analysis are well-suited for these models. However, critical systems that demand uninterrupted availability are better off avoiding them.
For businesses grappling with these complexities, consulting experts in cloud cost optimisation can make a difference. As Joe Squeri, CIO of Citadel, remarked:
This is efficiency, innovation and execution at its best. We are a major consumer of cloud compute resources and welcome Google Cloud Platform's Preemptible VM offering as it provides competitive pricing without the complexities of navigating multiple geography-based pricing models that lack transparency[17].
With reports showing that 32% of cloud budgets go to waste and 75% of organisations facing increasing cloud inefficiencies [16], using these pricing models for fault-tolerant tasks is a smart move. Hokstad Consulting, for example, helps businesses achieve 30–50% savings by strategically implementing these solutions, ensuring reduced costs without sacrificing operational performance.
FAQs
How can I choose the right preemptible VM for my workload?
When selecting a preemptible VM, there are a few key factors to weigh: cost savings, preemption policies, and how well it suits your workload. Start by determining how much interruption your workload can handle and what resources it needs - whether that’s CPU, memory, or even GPU support.
Take a close look at the pricing and preemption rules each provider offers. For example, some providers might let preemptible VMs run for up to 24 hours, while others might impose shorter limits. Also, think about additional features like local SSDs or high-performance networking, which might be essential depending on your specific requirements.
Lastly, check if the provider has enough capacity to meet your needs and whether their quotas align with your workload. Balancing these considerations will help you cut costs without compromising too much on performance or reliability.
How can I reduce the impact of interruptions when using preemptible VMs?
To reduce the impact of interruptions when using preemptible VMs, it's best to focus on running workloads that can handle disruptions, such as stateless applications or batch processing tasks. These types of workloads are naturally more resilient to the sudden shutdown of preemptible instances.
Using strategies like automated checkpointing and frequent backups ensures your progress is saved, making it easier to resume work quickly if an instance is terminated. Another useful approach is combining preemptible VMs with standard on-demand instances. This creates a safety net, ensuring critical workloads keep running without interruptions.
With thoughtful workload distribution and built-in redundancy, you can enjoy the cost benefits of preemptible VMs while maintaining reliability.
What are the best tools and practices for managing cost fluctuations with AWS Spot Instances?
To handle cost fluctuations when using AWS Spot Instances, it’s crucial to have tools and strategies that give you clear insights and control over your usage. AWS provides a Spot Instance data feed, which helps you monitor usage patterns and pricing trends, enabling smarter decision-making. On top of that, AWS's built-in cost management tools, like AWS Cost Explorer and AWS Budgets, are great for keeping an eye on expenses and fine-tuning your spending.
For a more hands-off approach, automation tools can be a game-changer. These tools adjust workloads automatically based on price changes, helping you save money without compromising performance. By leveraging these methods, you can keep your cloud costs predictable and avoid unwelcome surprises.