Selection criteria for spot eviction

Daniel Gastel 6 Reputation points
2020-10-26T22:35:03.3+00:00

How does Azure determine what spot machine(s) to evict? Are machines randomly selected? If I have a 100 spot machines of the same type, all with max-price set to -1, and Azure needs 100 spot machines of the same type, is it probable that if one machine is called, all my machines will be called?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,360 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 28,536 Reputation points
    2025-01-19T12:08:59.7233333+00:00

    Azure determines which Spot Virtual Machines to evict based on two primary factors: capacity requirements and the maximum price you've set for your Spot VMs.

    When Azure needs to reclaim compute capacity for other workloads, it may evict Spot VMs.

    If you've set a maximum price for your Spot VMs, they can also be evicted if the current Spot price exceeds your specified maximum.

    In your scenario, with 100 Spot VMs of the same type, all configured with a max-price set to -1 (indicating no price limit), the likelihood of all your VMs being evicted simultaneously depends on Azure capacity demands.

    If Azure experiences a significant surge in demand for the specific VM size in your region, it's possible that multiple or all of your Spot VMs could be evicted at the same time.

    However, Azure does not publicly disclose the exact algorithms or selection criteria it uses for evicting specific Spot VMs.

    https://learn.microsoft.com/en-us/azure/virtual-machines/spot-vms

    https://learn.microsoft.com/en-us/azure/architecture/guide/spot/spot-eviction

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.