cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Spot instances usage in Azure Databricks

noorbasha534
Contributor

Hi all,

as per the below article -

https://community.databricks.com/t5/technical-blog/optimize-costs-for-your-data-and-ai-workloads-wit...

1. it is possible to choose the number of spot instances using 'availability' parameter. But, I see from the documentation it is a string with pre-defined values

azure_attributes.availabilitystringControls the compute uses on-demand or spot instances (ON_DEMAND_AZURE or SPOT_WITH_FALLBACK_AZURE).

2. Now, regarding, 'spot_bid_max_price' parameter - documentation says, ''You can also set this to -1 (the default), which specifies that the instance cannot be evicted on the basis of price. The price for the instance will be the current price for spot instances or the price for a standard instance.''

So, this means as the bid price changes, Azure Databricks will try to match with the price and therefore the word 'current price' is used above? Also, 'standard instance' refers to on-demand instance?

Appreciate if someone can shed some light on this.

1 REPLY 1

Alberto_Umana
Databricks Employee
Databricks Employee

Hello @noorbasha534,

Thanks for your question!

1. 'availability' Parameter:

The 'availability' parameter in Azure Databricks controls whether the compute uses on-demand or spot instances. The values for this parameter are:

  • ON_DEMAND_AZURE: This value indicates that the compute will use on-demand instances.
  • SPOT_WITH_FALLBACK_AZURE: This value indicates that the compute will use spot instances with a fallback to on-demand instances if spot instances are not available.

2. 'spot_bid_max_price' Parameter:

The 'spot_bid_max_price' parameter allows you to set the maximum price for spot bids. The documentation states that you can set this to -1 (the default), which means that the instance cannot be evicted based on price. The price for the instance will be the current price for spot instances or the price for a standard instance. This implies that Azure Databricks will try to match the bid price with the current spot price, and if the spot price exceeds the bid price, the instance will fall back to the price of a standard (on-demand) instance.

In summary, the 'current price' refers to the fluctuating price of spot instances, and 'standard instance' refers to on-demand instances.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group