Skip to content

Commit 3ea0fe1

Browse files
Merge pull request #267708 from alfpark/alpark/batch
Batch doc updates
2 parents 34ade4c + 9201fe2 commit 3ea0fe1

File tree

5 files changed

+55
-42
lines changed

5 files changed

+55
-42
lines changed

articles/batch/batch-automatic-scaling.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Autoscale compute nodes in an Azure Batch pool
33
description: Enable automatic scaling on an Azure Batch cloud pool to dynamically adjust the number of compute nodes in the pool.
44
ms.topic: how-to
5-
ms.date: 08/23/2023
5+
ms.date: 02/29/2024
66
ms.custom: H1Hack27Feb2017, fasttrack-edit, devx-track-csharp, linux-related-content
77
---
88

@@ -131,16 +131,14 @@ You can get the value of these service-defined variables to make adjustments tha
131131
| $TaskSlotsPerNode |The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. |
132132
| $CurrentDedicatedNodes |The current number of dedicated compute nodes. |
133133
| $CurrentLowPriorityNodes |The current number of Spot compute nodes, including any nodes that have been preempted. |
134+
| $UsableNodeCount | The number of usable compute nodes. |
134135
| $PreemptedNodeCount | The number of nodes in the pool that are in a preempted state. |
135136

136137
> [!WARNING]
137138
> Select service-defined variables will be retired after **31 March 2024** as noted in the table above. After the retirement
138139
> date, these service-defined variables will no longer be populated with sample data. Please discontinue use of these variables
139140
> before this date.
140141
141-
> [!WARNING]
142-
> `$PreemptedNodeCount` is currently not available and returns `0` valued data.
143-
144142
> [!NOTE]
145143
> Use `$RunningTasks` when scaling based on the number of tasks running at a point in time, and `$ActiveTasks` when scaling based on the number of tasks that are queued up to run.
146144
@@ -303,7 +301,7 @@ $runningTasksSample = $RunningTasks.GetSample(60 * TimeInterval_Second, 120 * Ti
303301
Because there might be a delay in sample availability, you should always specify a time range with a look-back start time that's older than one minute. It takes approximately one minute for samples to propagate through the system, so samples in the range `(0 * TimeInterval_Second, 60 * TimeInterval_Second)` might not be available. Again, you can use the percentage parameter of `GetSample()` to force a particular sample percentage requirement.
304302

305303
> [!IMPORTANT]
306-
> We strongly recommend that you **avoid relying *only* on `GetSample(1)` in your autoscale formulas**. This is because `GetSample(1)` essentially says to the Batch service, "Give me the last sample you have, no matter how long ago you retrieved it." Since it's only a single sample, and it might be an older sample, it might not be representative of the larger picture of recent task or resource state. If you do use `GetSample(1)`, make sure that it's part of a larger statement and not the only data point that your formula relies on.
304+
> We strongly recommend that you **avoid relying *only* on `GetSample(1)` in your autoscale formulas**. This is because `GetSample(1)` essentially says to the Batch service, "Give me the last sample you had, no matter how long ago you retrieved it." Since it's only a single sample, and it might be an older sample, it might not be representative of the larger picture of recent task or resource state. If you do use `GetSample(1)`, make sure that it's part of a larger statement and not the only data point that your formula relies on.
307305
308306
## Write an autoscale formula
309307

articles/batch/batch-pool-vm-sizes.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Choose VM sizes and images for pools
33
description: How to choose from the available VM sizes and OS versions for compute nodes in Azure Batch pools
44
ms.topic: conceptual
5-
ms.date: 02/13/2023
5+
ms.date: 02/29/2024
66
---
77

88
# Choose a VM size and image for compute nodes in an Azure Batch pool
@@ -28,9 +28,15 @@ az batch location list-skus --location <azure-region>
2828
```
2929

3030
> [!TIP]
31-
> Batch **does not** support any VM SKU sizes that have only remote storage. A local temporary disk is required for Batch.
32-
> For example, Batch supports [ddv4 and ddsv4](../virtual-machines/ddv4-ddsv4-series.md), but does not support
33-
> [dv4 and dsv4](../virtual-machines/dv4-dsv4-series.md).
31+
> It's recommended to avoid VM SKUs/families with impending Batch support end of life (EOL) dates. These dates can be discovered
32+
> via the [`ListSupportedVirtualMachineSkus` API](/rest/api/batchmanagement/location/list-supported-virtual-machine-skus),
33+
> [PowerShell](/powershell/module/az.batch/get-azbatchsupportedvirtualmachinesku),
34+
> or [Azure CLI](/cli/azure/batch/location#az-batch-location-list-skus).
35+
> For more information, see the [Batch best practices guide](best-practices.md) regarding Batch pool VM SKU selection.
36+
37+
Batch **doesn't** support any VM SKU sizes that have only remote storage. A local temporary disk is required for Batch.
38+
For example, Batch supports [ddv4 and ddsv4](../virtual-machines/ddv4-ddsv4-series.md), but does not support
39+
[dv4 and dsv4](../virtual-machines/dv4-dsv4-series.md).
3440

3541
### Using Generation 2 VM Images
3642

@@ -81,10 +87,11 @@ For example, using the Azure CLI, you can obtain the list of supported VM images
8187
az batch pool supported-images list
8288
```
8389

84-
It's recommended to avoid images with impending Batch support end of life (EOL) dates. These dates can be discovered via
85-
the [`ListSupportedImages` API](/rest/api/batchservice/account/listsupportedimages),
86-
[PowerShell](/powershell/module/az.batch/get-azbatchsupportedimage), or [Azure CLI](/cli/azure/batch/pool/supported-images).
87-
For more information, see the [Batch best practices guide](best-practices.md) regarding Batch pool VM image selection.
90+
> [!TIP]
91+
> It's recommended to avoid images with impending Batch support end of life (EOL) dates. These dates can be discovered via
92+
> the [`ListSupportedImages` API](/rest/api/batchservice/account/listsupportedimages),
93+
> [PowerShell](/powershell/module/az.batch/get-azbatchsupportedimage), or [Azure CLI](/cli/azure/batch/pool/supported-images).
94+
> For more information, see the [Batch best practices guide](best-practices.md) regarding Batch pool VM image selection.
8895
8996
## Next steps
9097

articles/batch/batch-sig-images.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ When you create an Azure Batch pool using the Virtual Machine Configuration, you
1414

1515
## Benefits of the Azure Compute Gallery
1616

17-
When you use the Azure Compute Gallery for your custom image, you have control over the operating system type and configuration, as well as the type of data disks. Your Shared Image can include applications and reference data that become available on all the Batch pool nodes as soon as they are provisioned.
17+
When you use the Azure Compute Gallery for your custom image, you have control over the operating system type and configuration, as well as the type of data disks. Your Shared Image can include applications and reference data that become available on all the Batch pool nodes as soon as they're provisioned.
1818

1919
You can also have multiple versions of an image as needed for your environment. When you use an image version to create a VM, the image version is used to create new disks for the VM.
2020

@@ -32,13 +32,11 @@ Using a Shared Image configured for your scenario can provide several advantages
3232

3333
## Prerequisites
3434

35-
> [!NOTE]
36-
> Currently, Azure Batch does not support the ‘TrustedLaunch’ feature. You must use the standard security type to create a custom image instead.
37-
>
38-
> You need to authenticate using Microsoft Entra ID. If you use shared-key-auth, you will get an authentication error.
39-
4035
- **An Azure Batch account.** To create a Batch account, see the Batch quickstarts using the [Azure portal](quick-create-portal.md) or [Azure CLI](quick-create-cli.md).
4136

37+
> [!NOTE]
38+
> Authentication using Microsoft Entra ID is required. If you use Shared Key Auth, you will get an authentication error.
39+
4240
- **an Azure Compute Gallery image**. To create a Shared Image, you need to have or create a managed image resource. The image should be created from snapshots of the VM's OS disk and optionally its attached data disks.
4341

4442
> [!NOTE]
@@ -67,7 +65,7 @@ The following steps show how to prepare a VM, take a snapshot, and create an ima
6765

6866
### Prepare a VM
6967

70-
If you are creating a new VM for the image, use a first party Azure Marketplace image supported by Batch as the base image for your managed image. Only first party images can be used as a base image.
68+
If you're creating a new VM for the image, use a first party Azure Marketplace image supported by Batch as the base image for your managed image. Only first party images can be used as a base image.
7169

7270
To get a full list of current Azure Marketplace image references supported by Azure Batch, use one of the following APIs to return a list of Windows and Linux VM images including the node agent SKU IDs for each image:
7371

@@ -82,10 +80,10 @@ To get a full list of current Azure Marketplace image references supported by Az
8280
Follow these guidelines when creating VMs:
8381

8482
- Ensure the VM is created with a managed disk. This is the default storage setting when you create a VM.
85-
- Do not install Azure extensions, such as the Custom Script extension, on the VM. If the image contains a pre-installed extension, Azure may encounter problems when deploying the Batch pool.
83+
- Don't install Azure extensions, such as the Custom Script extension, on the VM. If the image contains a pre-installed extension, Azure may encounter problems when deploying the Batch pool.
8684
- When using attached data disks, you need to mount and format the disks from within a VM to use them.
8785
- Ensure that the base OS image you provide uses the default temp drive. The Batch node agent currently expects the default temp drive.
88-
- Ensure that the OS disk is not encrypted.
86+
- Ensure that the OS disk isn't encrypted.
8987
- Once the VM is running, connect to it via RDP (for Windows) or SSH (for Linux). Install any necessary software or copy desired data.
9088
- For faster pool provisioning, use the [ReadWrite disk cache setting](../virtual-machines/premium-storage-performance.md#disk-caching) for the VM's OS disk.
9189

@@ -110,9 +108,6 @@ Once you have successfully created your managed image, you need to create an Azu
110108

111109
To create a pool from your Shared Image using the Azure CLI, use the `az batch pool create` command. Specify the Shared Image ID in the `--image` field. Make sure the OS type and SKU matches the versions specified by `--node-agent-sku-id`
112110

113-
> [!NOTE]
114-
> You need to authenticate using Microsoft Entra ID. If you use shared-key-auth, you will get an authentication error.
115-
116111
> [!IMPORTANT]
117112
> The node agent SKU id must align with the publisher/offer/SKU in order for the node to start.
118113
@@ -233,7 +228,7 @@ Use the following steps to create a pool from a Shared Image in the Azure portal
233228
1. In the **Image Type** section, select **Azure Compute Gallery**.
234229
1. Complete the remaining sections with information about your managed image.
235230
1. Select **OK**.
236-
1. Once the node is allocated, use **Connect** to generate user and the RDP file for Windows OR use SSH to for Linux to login to the allocated node and verify.
231+
1. Once the node is allocated, use **Connect** to generate user and the RDP file for Windows OR use SSH to for Linux to log in to the allocated node and verify.
237232

238233
![Create a pool with from a Shared image with the portal.](media/batch-sig-images/create-custom-pool.png)
239234

@@ -242,9 +237,9 @@ Use the following steps to create a pool from a Shared Image in the Azure portal
242237

243238
If you plan to create a pool with hundreds or thousands of VMs or more using a Shared Image, use the following guidance.
244239

245-
- **Azure Compute Gallery replica numbers.** For every pool with up to 300 instances, we recommend you keep at least one replica. For example, if you are creating a pool with 3000 VMs, you should keep at least 10 replicas of your image. We always suggest keeping more replicas than minimum requirements for better performance.
240+
- **Azure Compute Gallery replica numbers.** For every pool with up to 300 instances, we recommend you keep at least one replica. For example, if you're creating a pool with 3,000 VMs, you should keep at least 10 replicas of your image. We always suggest keeping more replicas than minimum requirements for better performance.
246241

247-
- **Resize timeout.** If your pool contains a fixed number of nodes (if it doesn't autoscale), increase the `resizeTimeout` property of the pool depending on the pool size. For every 1000 VMs, the recommended resize timeout is at least 15 minutes. For example, the recommended resize timeout for a pool with 2000 VMs is at least 30 minutes.
242+
- **Resize timeout.** If your pool contains a fixed number of nodes (if it doesn't autoscale), increase the `resizeTimeout` property of the pool depending on the pool size. For every 1,000 VMs, the recommended resize timeout is at least 15 minutes. For example, the recommended resize timeout for a pool with 2,000 VMs is at least 30 minutes.
248243

249244
## Next steps
250245

0 commit comments

Comments
 (0)