What spot vs on-demand GPU actually changes
Spot, preemptible and interruptible capacity are spare machines sold at a discount on the condition that the provider can take them back. On-demand capacity is billed at a fixed rate and is not reclaimed for someone else’s higher-priority work. The GPU, driver and network can be identical. What changes is who decides when your job stops.
The warning you get before a reclaim differs by provider, and it is shorter than many checkpoints take to write. AWS issues a Spot interruption notice two minutes before it stops or terminates an instance, on a best-effort basis, and recommends checking for it every five seconds; if you choose hibernation, the process starts immediately with no two-minute warning. Google Cloud lets you set a preemption notice of 120 seconds or 0 seconds, where 0 is the default, followed by a best-effort shutdown period of up to 30 seconds. Azure delivers eviction notices through Scheduled Events, best effort, up to 30 seconds before eviction.
Marketplace products follow their own rules. Vast.ai describes interruptible instances that use bidding priority and may be paused if outbid or if someone requests the machine on demand; data is kept while paused and the instance resumes when priority returns. Its instance-type page does not state a warning period, so plan as if there is none.
Published discounts are ceilings, not quotes: AWS says Spot can save up to 90% on On-Demand prices, and Google Cloud says Spot prices give discounts of up to 91% for many machine types. The discount you actually see on a specific GPU in a specific region moves with supply.
| Product | Warning before reclaim | What happens to the machine |
|---|---|---|
| AWS EC2 Spot | 2 minutes, best effort (none for hibernate) | Stopped, terminated or hibernated |
| Google Cloud Spot VM | 0 s default or 120 s, then up to 30 s shutdown | Stopped, or deleted if configured |
| Azure Spot VM | Up to 30 s via Scheduled Events, best effort | Deallocated (default) or deleted |
| Vast.ai interruptible | Not stated in its docs | Paused, resumes when priority returns |
| On-demand (any) | Not reclaimed for other buyers | Still subject to hardware failure |
References: EC2 Spot interruption notices · Google Cloud Spot VMs · Azure Spot Virtual Machines · Vast.ai instance types · Amazon EC2 Spot Instances
The cost per completed job formula
An hourly rate only tells you what one hour costs. What you want is the cost of a finished job, which on interruptible capacity includes three kinds of waste: time spent writing checkpoints, work redone after an interruption, and time spent getting a new machine and reloading state.
Use these terms. P is the on-demand rate and p the spot rate, both per GPU-hour. λ is interruptions per hour. c is the checkpoint interval in hours and s the time one checkpoint takes. r is restart time in hours: waiting for capacity, booting, pulling the container, loading data and the checkpoint. On average an interruption loses half a checkpoint interval of work, so each hour of spot time wastes about λ × (c/2 + r).
Expected cost per useful hour on spot is p × (1 + s/c) ÷ (1 − λ × (c/2 + r)). Spot wins when that number is below P. Multiply by the useful hours the job needs to get cost per completed job. The formula assumes interruptions arrive at random and that each one is followed by a successful restart; if capacity does not come back, add the waiting time to your deadline, not your bill.
Read it from the right. A big discount only survives if λ × (c/2 + r) stays small, and the two levers you control are c, how often you save, and r, how fast you resume. The interruption rate λ is something you measure, not something you set. Azure, for example, shows historical eviction rates quoted per hour when you choose a Spot size.
References: Azure Spot Virtual Machines

Worked examples: when spot wins and when it loses
All numbers in this section are illustrative assumptions chosen to show the arithmetic, not measured interruption rates or quotes. Take P as 1.00 and p as 0.40, a 60% discount. The job needs 20 useful GPU-hours. Assume one interruption per ten hours (λ = 0.1), a checkpoint that takes two minutes (s ≈ 0.033 hours) and a restart of 15 minutes (r = 0.25 hours).
Case A checkpoints every 30 minutes. The waste per spot hour is 0.1 × (0.25 + 0.25) = 0.05, so cost per useful hour is 0.40 × 1.067 ÷ 0.95 ≈ 0.45. The job costs about 9.0 against 20 on demand. Spot wins clearly.
Case B never checkpoints, so every interruption restarts the job from zero. With random interruptions, the expected time to finish a run of length T is (1/λ + r) × (e^(λT) − 1). For T = 20 that is 10.25 × 6.39 ≈ 65.5 hours, or about 26.2 at the spot rate. The discounted job now costs more than on-demand, and it finishes days later.
Case C is a multi-node run on eight machines with checkpoints every 30 minutes. If any machine is reclaimed, all eight stop, so the job sees eight times the interruption rate, λ = 0.8. Coordinated restarts are also slower; assume r = 0.5 hours. Waste per hour is 0.8 × (0.25 + 0.5) = 0.6, so cost per useful hour is 0.40 × 1.067 ÷ 0.4 ≈ 1.07. Spot is now about 7% more expensive than on-demand, before counting engineering time.
| Illustrative case | Wasted share of spot time | Cost per useful hour (P = 1.00) | Verdict |
|---|---|---|---|
| A: one machine, checkpoint every 30 min | 5% | 0.45 | Spot wins |
| B: one machine, no checkpoints, 20 h job | About 69% | 1.31 | On-demand wins |
| C: eight machines, any loss stops all | 60% | 1.07 | On-demand wins |
| On-demand reference | 0% | 1.00 | Baseline |
Choosing a checkpoint interval
Checkpointing more often cuts lost work but adds save time. A classic first-order approximation from J. W. Young’s 1974 paper on checkpoint intervals puts the best interval near the square root of 2 × s × M, where M is the mean time between interruptions. With a two-minute save and one interruption every ten hours, that is the square root of 2 × 0.033 × 10, about 0.82 hours, or roughly 50 minutes.
Two practical limits override the formula. First, the save must finish inside the warning window if you rely on a final checkpoint at notice time; with 30 seconds on Azure or a 0-second default on Google Cloud, you usually cannot, so save on a timer during normal running. Second, the checkpoint must land on storage that survives the machine. Azure’s Delete eviction policy removes the VM together with its disks, so a checkpoint on local disk disappears with it.
Save everything needed to resume exactly: model weights, optimizer state, learning-rate scheduler, random number generator state and the data loader position. Our checkpointing guide for GPU training covers the PyTorch pattern and how to test a restore before you depend on it.
References: PyTorch model saving and loading · Azure Spot Virtual Machines · Google Cloud Spot VMs
When on-demand is the right call
Interactive and customer-facing work. A user-facing endpoint cannot lose its only GPU with 30 seconds of warning. If you want spot savings for inference, run a baseline of on-demand replicas that meets your latency target alone, and treat spot replicas as extra throughput that can vanish.
Tightly coupled multi-node training. As case C shows, the interruption rate multiplies with the machine count and restarts get slower. The single GPU vs multi-GPU comparison explains why fewer, larger GPUs often reduce this exposure.
Hard deadlines. Interruptible capacity can also fail to come back: Azure notes that redeploying a deallocated Spot VM is not guaranteed to succeed. If a result must exist by Friday, price the worst case, not the average.
Jobs with slow restarts. If loading a large dataset or a container image takes 40 minutes, r dominates the formula, and even a modest interruption rate erases the discount. Fix restart time first, or stay on on-demand.
Work with side effects. A retried job that writes to a database or sends results twice can cost more to clean up than the GPU saved. Make outputs idempotent with a stable job ID before moving such work to spot.
References: Azure Spot Virtual Machines
A spot vs on-demand GPU test to run before committing
Run this on a short real job, not a toy. First, measure s: time a full checkpoint write to durable storage at your real model size. Second, measure r: kill the worker with SIGTERM, start a fresh machine and time how long it takes until training steps resume. Third, compare the loss or output after resume with an uninterrupted run to confirm nothing was lost or repeated.
Then estimate λ. Use the provider’s published eviction history where it exists, or run a week of spot workers and count interruptions per machine-hour. Plug s, r, λ and your chosen c into the formula, and compute cost per completed job for both options using real quotes.
Finally, write a switching rule. For example: start on spot, and if the job has fallen more than 20% behind the schedule needed to meet its deadline, move the remainder to on-demand. Confirm that the fallback capacity and data access exist before you depend on that rule.
References: EC2 Spot interruption notices
Decision table
Use this as a starting point, then confirm it with the measured numbers from the test above.
| Workload | Start with | Condition |
|---|---|---|
| Hyperparameter sweeps, many short runs | Spot | Each run is short or checkpointed |
| Single-GPU fine-tuning, flexible finish | Spot | Checkpoint every 30-60 min, restart under 15 min |
| Batch inference over a queue | Spot | Idempotent task IDs, work units of minutes |
| Multi-node pre-training | On-demand | Interruptions multiply with node count |
| Production inference endpoint | On-demand baseline | Spot only for overflow |
| Job due by a fixed date | On-demand | Or spot with a tested switch rule |
How this maps to NeuraMesh plans
NeuraMesh does not run an auction or sell reclaimable capacity; each order is a quotation you approve before you pay. The closest version of this trade-off is the choice of plan. The Value plan uses independent hosts at the lowest price and suits experiments, sweeps and restartable batch jobs. The Data center plan runs in professional facilities and suits production and long runs where a restart is expensive.
The same discipline applies on either plan: checkpoint to storage that outlives the machine, because any GPU can fail. Quotations usually arrive by email within one business day and there is a $50 minimum order, so NeuraMesh fits planned runs rather than instant burst capacity. Current rates are on the GPU prices page, and per-GPU pages such as rent an RTX 4090 and rent an H100 show both plans side by side.
NeuraMesh prices for these GPUs
| GPU | Memory | Data center | Value |
|---|---|---|---|
| RTX 4090 | 24 GB | $0.46 | $0.40 |
| L40S | 48 GB | $1.26 | $0.54 |
| A100 | 80 GB | $1.56 | $0.98 |
| H100 | 80 GB | $2.88 | $2.00 |
Every order is confirmed in a quotation before you pay. See all GPU prices.
Questions readers ask
Is spot vs on-demand GPU pricing worth it for training?
For single-machine training with frequent checkpoints and fast restarts, usually yes, because lost work stays small. For multi-node training, often not: any reclaimed node stops the whole job, so interruptions multiply with node count. Compute expected cost per completed job with your measured restart time before deciding.
How much warning do I get before a spot GPU is reclaimed?
It depends on the provider. AWS gives a two-minute notice, best effort. Google Cloud defaults to no dedicated notice, with 120 seconds available as an option, then up to 30 seconds of shutdown. Azure sends notices up to 30 seconds ahead. Save on a timer rather than relying on the warning.
How often should I checkpoint on interruptible GPU instances?
A first-order rule is the square root of 2 × save time × mean time between interruptions. A two-minute save and one interruption per ten hours gives about 50 minutes. Shorten it if restarts are slow or the deadline is tight, and always write to storage that survives the machine.
Is on-demand capacity immune to interruption?
No. On-demand is not reclaimed for other buyers, but hardware still fails and hosts still need maintenance. You still need durable checkpoints, monitoring and a restore you have tested. On-demand reduces the frequency of restarts; it does not remove the need to handle them.
Can I mix spot and on-demand GPUs?
Yes, and for inference it is often the best option: run enough on-demand replicas to meet your latency target alone, and add spot replicas for extra throughput. For training, mixing within one synchronous job brings back the multi-node problem, so keep mixed fleets to independent jobs. See GPU-hour cost explained for the other line items to include.
Sources and editorial notes
- EC2 Spot interruption notices
- Google Cloud Spot VMs
- Azure Spot Virtual Machines
- Vast.ai instance types
- Amazon EC2 Spot Instances
- PyTorch model saving and loading
Primary documentation reviewed October 9, 2026. Provider descriptions reflect published documentation. Recommendations are our analysis; worked figures are illustrative unless explicitly stated otherwise. No independent provider benchmark or uptime ranking is claimed.
Need this GPU? Rent it from NeuraMesh: choose a GPU and plan, get a confirmed quotation, and pay only when you approve. See pricing.



