Skip to content

Commit 0d46732

Browse files
am4234mju-shim
andauthored
Apply suggestions from code review
Co-authored-by: Julia Shimanskiy <[email protected]>
1 parent 90b0632 commit 0d46732

File tree

2 files changed

+51
-48
lines changed

2 files changed

+51
-48
lines changed

articles/virtual-machines/spot-placement-score.md

Lines changed: 50 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.reviewer: ju-shim
1212

1313

1414
# 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.
1616

1717
Using Spot Placement Score, you can achieve the following:
1818

@@ -25,68 +25,68 @@ Using Spot Placement Score, you can achieve the following:
2525

2626
## Considerations
2727

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.
2929

3030
- 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.
3131

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.
3333

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`.
3535

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.
3737

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.
3939

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.
4141

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.
4343

4444

4545
## 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
4751

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.
4953

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)
5155

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.
5357

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).
5559

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**.
5761

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.
5963

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.
6165

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.
6367

64-
### [REST API](#tab/rest-api-1)
68+
1. Click on **Save + Apply** to receive your placement score for this configuration.
6569

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*.
6773

6874
```
6975
POST https://management.azure.com/subscriptions/{subscription}/providers/Microsoft.Compute/locations/{region}/placementScores/spot/generate?api-version={api-version}
7076
```
7177

7278
```json
7379
{
74-
75-
"desiredLocations": [" "], // Use ARM names
76-
80+
"desiredLocations": [" "],
7781
"desiredSizes": [{
78-
7982
"sku": " "
80-
8183
}],
82-
8384
"desiredCount":
84-
8585
}
8686

87-
### [Azure CLI 2.0](#tab/cli-1)
87+
### [Azure CLI 2.0](#tab/cli)
8888

89-
You can use Spot Placement Score using Azure CLI by using the following:
89+
Access Spot Placement Score using Azure CLI.
9090

9191
az compute-recommender spot-placement-recommender [--availability-zones {0, 1, f, false, n, no, t, true, y, yes}]
9292
[--desired-count]
@@ -98,7 +98,7 @@ az compute-recommender spot-placement-recommender [--availability-zones {0, 1, f
9898

9999
### [Azure PowerShell](#tab/powershell)
100100

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:
102102

103103
Invoke-AzSpotPlacementScore
104104
-Location <String>
@@ -111,39 +111,39 @@ Invoke-AzSpotPlacementScore
111111

112112
## Examples
113113

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.
115115

116116
Some important terminology to notice before referring to these examples:
117117

118118
- **sku.capacity** is the total number of VMs in the Virtual Machine Scale Set
119119
- **Base (standard) VMs** are the number of standard non-Spot VMs, akin to a minimum VM number
120120

121121
### 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.
123123

124124
The following scenario assumptions apply to this example:
125-
- **Desired Locations:** westus", "eastus"
126-
- **Desired Sizes":** Standard_D2_v2", Standard_D4_v2
127-
- **Desired Count:** 100
128-
- **Availability Zones:** False
125+
- **Desired locations:** `westus`, `eastus`
126+
- **Desired sizes:** `Standard_D2_v2`, `Standard_D4_v2`
127+
- **Desired count:** 100
128+
- **Availability zones:** False
129129

130-
| sku | region | Availability Zone | Is Quota Available? | Placement Score |
130+
| SKU | Region | Availability zone | Is quota available? | Placement score |
131131
|-----------------------------------|-------------|---------------------|--------------------|-------------------|
132132
| Standard_D2_v2 | westus | False | True | High |
133133
| Standard_D4_v2 | westus | False | True | Low |
134134
| Standard_D2_v2 | eastus | False | True | Medium |
135135
| Standard_D4_v2 | eastus | False | True | High |
136136

137137
### Scenario 2
138-
Example of a request returning zonally scoped placement scores for multiple desired sizes and multiple desired regions.
138+
This is an example of a request returning zonally scoped placement scores for multiple desired VM sizes and regions.
139139

140140
The following scenario assumptions apply to this example:
141-
- **Desired Locations:** westus", "eastus"
142-
- **Desired Sizes":** Standard_D2_v2", Standard_D4_v2
143-
- **Desired Count:** 100
144-
- **Availability Zones:** True
141+
- **Desired locations:** `westus`, `eastus`
142+
- **Desired sizes:** `Standard_D2_v2`, `Standard_D4_v2`
143+
- **Desired count:** 100
144+
- **Availability zones:** True
145145

146-
| sku | region | Availability Zone | Is Quota Available? | Placement Score |
146+
| SKU | Region | Availability zone | Is quota available? | Placement score |
147147
|-----------------------------------|-------------|---------------------|--------------------|-------------------|
148148
| Standard_D2_v2 | westus | 1 | True | Medium |
149149
| Standard_D2_v2 | westus | 2 | True | Medium |
@@ -161,11 +161,14 @@ The following scenario assumptions apply to this example:
161161

162162
## Troubleshooting
163163

164-
| Status Code | Type | Condition
164+
| Status code | Type | Condition |
165165
|-----------------------------------|-------------|---------------------|--------------------|
166-
| 200 | OK | Placement score generation operations complete successfully. |
167-
| 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.
166+
| 200 | Successful request | Spot Placement Score operations complete successfully. |
167+
| 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.
170170

171+
## Next steps
171172

173+
> [!div class="nextstepaction"]
174+
> [Learn about Spot Priority Mix](../virtual-machine-scale-sets/spot-priority-mix.md)

articles/virtual-machines/spot-vms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.service: azure-virtual-machines
77
ms.subservice: azure-spot-vm
88
ms.topic: how-to
99
ms.date: 08/05/2024
10-
ms.reviewer: cynthn
10+
ms.reviewer: ju-shim
1111
---
1212

1313

0 commit comments

Comments
 (0)