You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-machines/spot-placement-score.md
+50-47Lines changed: 50 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ ms.reviewer: ju-shim
12
12
13
13
14
14
# Spot Placement Score
15
-
Spot Placement Score will assist you by evaluating the likelihood of success for individual Spot deployments by considering parameters like desired Spot VM count, VM size, and your deployment region or zone. This feature enables you to generate a placement score to deploy a desired number of Spot VMs across various combinations of regions, zones and VM sizes. By inputting lists of up to 8 regions and 5 VM sizes, you can obtain placement scores categorized as either High, Medium or Low. A score of High indicates that the deployment is highly likely to succeed while a score of Low indicates that the deployment has a low chance of success. These scores are based on analyses of Spot capacity allocation probability and the survivability of the specified number of Spot VMs within each region and VM size combination. This functionality will enhance deployment planning by providing predictive insights into deployment success and optimizing resource allocation for your Spot VMs.
15
+
Spot Placement Score evaluates the likelihood of success for individual Spot deployments by considering parameters like desired Spot Virtual Machine (VM) count, VM size, and your deployment region or zone. This feature enables you to generate a placement score to deploy a desired number of Spot Virtual Machines (VMs) across various combinations of regions, zones, and VM sizes. By inputting lists of up to 8 regions and 5 VM sizes, you can obtain placement scores categorized as either High, Medium, or Low. A score of High indicates that the deployment is highly likely to succeed while a score of Low indicates that the deployment has a low chance of success. These scores are based on analyses of Spot capacity allocation probability and the survivability of the specified number of Spot VMs within each region and VM size combination. This functionality enhances deployment planning by providing predictive insights into deployment success and optimizing resource allocation for your Spot VMs.
16
16
17
17
Using Spot Placement Score, you can achieve the following:
18
18
@@ -25,68 +25,68 @@ Using Spot Placement Score, you can achieve the following:
25
25
26
26
## Considerations
27
27
28
-
- Spot placement scores serve purely as a recommendation based on certain data points like eviction rate, VM availability etc. A high placement score does not guarantee that the Spot request will be fully or partially fulfilled.
28
+
- Spot placement scores serve purely as a recommendation based on certain data points like eviction rate and VM availability. A high placement score does not guarantee that the Spot request will be fully or partially fulfilled.
29
29
30
30
- Placement Scores are only valid at the time when it is requested. The same Placement Score is not valid at a different time of the same day or another day. Any similarities are purely coincidental.
31
31
32
-
- Spot Placement Score will only be relevant if Spot request has the same configuration as the Spot placement score configuration (desired count, VM size, location and zone). In all other circumstances, the likelihood of getting available Spot capacity will not align with the placement score generated by the tool.
32
+
-The Spot Placement Score is only relevant if the Spot request has the same configuration as the Spot Placement Score configuration; desired count, VM size, location, and zone. In all other circumstances, the likelihood of getting available Spot capacity will not align with the placement score generated by the tool.
33
33
34
-
- Spot Placement Scores currently do not consider additional constraints like VMSS “SinglePlacementGroup”.
34
+
- Spot Placement Scores don't consider additional constraints, such as Virtual Machine Scale Sets `SinglePlacementGroup`.
35
35
36
-
-Subscription’s available Spot VM quota will need to be checked and/or requested separately.
36
+
-A subscription's available Spot VM quota will need to be checked or requested separately.
37
37
38
-
- Spot Placement Score currently supports both regionally and zonally scoped placement score.
38
+
- Spot Placement Score supports both regionally and zonally scoped placement score.
39
39
40
-
- Spot Placement Score API internally calls other GET APIs and will be part of your GET call quota.
40
+
- Spot Placement Score API internally calls other GET APIs and is part of your GET call quota.
41
41
42
-
- A score of High” or “Medium” does not guarantee allocation success or no evictions.
42
+
- A score of **High** or **Medium** does not guarantee allocation success or no evictions.
43
43
44
44
45
45
## Configure your Spot Placement Score
46
-
You can configure Spot Placement Score by specifying your Spot specific requirements such as the desired number of Spot VMs, the VM size (up to 5), regions (up to 8) and availability zones. We recommend that the placement scores for each combination of subscription, desired count, region, zone, and VM size are cached, to avoid calling the API with the same configuration frequently within a short period of time. The suggested cache TTL is a minimum of 15 mins and a maximum of 30 mins.
46
+
Configure your Spot Placement Score by defining your Spot specific requirements:
47
+
- Number of desired Spot VMs
48
+
- Up to five VM sizes
49
+
- Up to eight regions
50
+
- Availability zones
47
51
48
-
### [Portal](#tab/portal)
52
+
We recommend that the placement scores for each combination of subscription, desired count, region, zone, and VM size are cached, to avoid calling the API with the same configuration frequently within a short period of time. The suggested cache TTL is a minimum of 15 minutes and a maximum of 30 minutes.
49
53
50
-
You can set your Spot Priority Mix in the Spot tab of the Virtual Machine Scale Sets creation process in the Azure portal. The following steps instruct you on how to access this feature during that process.
54
+
### [Azure portal](#tab/portal)
51
55
52
-
1.Log in to the [Azure portal](https://portal.azure.com).
56
+
Find the Spot Placement Score in the Spot tab of the Virtual Machine Scale Sets creation process in the Azure portal. The following steps instruct you on how to access this feature during that process.
53
57
54
-
1.In the search bar, search for and select **Virtual Machine Scale Sets**.
58
+
1. Log in to the [Azure portal](https://portal.azure.com).
55
59
56
-
1.Select **Create** on the **Virtual Machine Scale Sets** page.
60
+
1. In the search bar, search for and select **Virtual Machine Scale Sets**.
57
61
58
-
1.In the**Spot**tab, turn on Spot option under the **Save money with Spot**section.
62
+
1. Select**Create** on the **Virtual Machine Scale Sets**page.
59
63
60
-
1.Fill out the Size, Region, Availability Zones and Initial instance count fields in the **Your Placement Score** section.
64
+
1. In the **Spot** tab, turn on the Spot option under the **Save money with Spot** section.
61
65
62
-
1.Click on **Save + Apply** this configuration to receive your placement score.
66
+
1. Fill out the *Size*, *Region*, *Availability Zones*, and *Initial instance count* fields in the **Your Placement Score** section.
63
67
64
-
### [REST API](#tab/rest-api-1)
68
+
1. Click on **Save + Apply** to receive your placement score for this configuration.
65
69
66
-
You can use the following REST API to get your Spot Placement Score. The Placement Score API supports the following versions: 2024-03-01-preview and 2024-06-01-preview.
70
+
### [REST API](#tab/rest-api)
71
+
72
+
Use the following REST API to get your Spot Placement Score. The Placement Score API supports the following versions: *2024-03-01-preview* and *2024-06-01-preview*.
67
73
68
74
```
69
75
POST https://management.azure.com/subscriptions/{subscription}/providers/Microsoft.Compute/locations/{region}/placementScores/spot/generate?api-version={api-version}
70
76
```
71
77
72
78
```json
73
79
{
74
-
75
-
"desiredLocations": [""], // Use ARM names
76
-
80
+
"desiredLocations": [""],
77
81
"desiredSizes": [{
78
-
79
82
"sku": ""
80
-
81
83
}],
82
-
83
84
"desiredCount":
84
-
85
85
}
86
86
87
-
### [Azure CLI 2.0](#tab/cli-1)
87
+
### [Azure CLI 2.0](#tab/cli)
88
88
89
-
You can use Spot Placement Score using Azure CLI by using the following:
89
+
Access Spot Placement Score using Azure CLI.
90
90
91
91
az compute-recommender spot-placement-recommender [--availability-zones {0, 1, f, false, n, no, t, true, y, yes}]
92
92
[--desired-count]
@@ -98,7 +98,7 @@ az compute-recommender spot-placement-recommender [--availability-zones {0, 1, f
98
98
99
99
### [Azure PowerShell](#tab/powershell)
100
100
101
-
You can use Spot Placement Score using Azure PowerShell by utilizing the Invoke-AzSpotPlacementScore cmdlet to call the API endpoint. Replace <SubscriptionId>, <Location>, <DesiredCount>, <DesiredSize> and <AvailabilityZone> with your specific details:
101
+
Access the Spot Placement Score using Azure PowerShell through the `Invoke-AzSpotPlacementScore` command to call the API endpoint. Replace all parameters with your specific details:
102
102
103
103
Invoke-AzSpotPlacementScore
104
104
-Location <String>
@@ -111,39 +111,39 @@ Invoke-AzSpotPlacementScore
111
111
112
112
## Examples
113
113
114
-
The following examples have scenario assumptions, a table of results to help you understand how Spot Placement Score works.
114
+
The following examples have scenario assumptions and a table with the results score to help you understand how Spot Placement Score works.
115
115
116
116
Some important terminology to notice before referring to these examples:
117
117
118
118
- **sku.capacity** is the total number of VMs in the Virtual Machine Scale Set
119
119
- **Base (standard) VMs** are the number of standard non-Spot VMs, akin to a minimum VM number
120
120
121
121
### Scenario 1
122
-
Example of a request returning regionally scoped placement scores for multiple desired sizes and multiple desired regions.
122
+
This is an example of a request returning regionally scoped placement scores for multiple desired VM sizes and regions.
123
123
124
124
The following scenario assumptions apply to this example:
| 400 | Bad Error Request| If any required input parameters are not present or if the values of the provided parameters are invalid. There will be a detailed error message about the failed request. |
168
-
| 429 | Too Many Requests | Unable to generate placement score due to hitting rate limit|
169
-
| 500 | Internal Server Error | The placement score generation failed. The error message should have detailed error information.
| 400 | Bad error request | At least one required input parameter isn't present, or the values of the provided parameters aren't valid. Produces a detailed error message about the failed request. |
168
+
| 429 | Too many requests | Unable to generate placement score due to hitting a rate limit. |
169
+
| 500 | Internal server error | The placement score generation failed. Produces a detailed error message about the failed request.
170
170
171
+
## Next steps
171
172
173
+
> [!div class="nextstepaction"]
174
+
> [Learn about Spot Priority Mix](../virtual-machine-scale-sets/spot-priority-mix.md)
0 commit comments