Choose a VM size and image for compute nodes in an Azure Batch pool
When you select a node size for an Azure Batch pool, you can choose from almost all the VM sizes available in Azure. Azure offers a range of sizes for Linux and Windows VMs for different workloads.
Supported VM series and sizes
Pools in Virtual Machine configuration
Batch pools in the Virtual Machine configuration support almost allVM sizesavailable in Azure. The supported VM sizes in a region can be obtained via the Batch Management API. You can use one of the following methods to return a list of VM sizes supported by Batch in a region:
- PowerShell:Get-AzBatchSupportedVirtualMachineSku
- Azure CLI:az batch location list-skus
- Batch Management APIs:List Supported Virtual Machine SKUs
For example, using the Azure CLI, you can obtain the list of skus for a particular Azure region with the following command:
az batch location list-skus --location <azure-region>
Tip
It's recommended to avoid VM SKUs/families with impending Batch support end of life (EOL) dates. These dates can be discovered
via theListSupportedVirtualMachineSkus
API,
PowerShell,
orAzure CLI.
For more information, see theBatch best practices guideregarding Batch pool VM SKU selection.
Batchdoesn'tsupport any VM SKU sizes that have only remote storage. A local temporary disk is required for Batch. For example, Batch supportsddv4 and ddsv4,but does not support dv4 and dsv4.
Using Generation 2 VM Images
Some VM series, such asFXandMv2,can only be used
withgeneration 2 VM images.Generation 2 VM images are specified like any VM image,
using thesku
property of theimageReference
configuration; thesku
strings have a suffix such as-g2
or-gen2
.To get a list of VM images supported by Batch, including generation 2 images,
use the'list supported images'API,
PowerShell,orAzure CLI.
Pools in Cloud Services Configuration
Warning
Cloud Services Configuration pools aredeprecated.Please use Virtual Machine Configuration pools instead.
Batch pools in Cloud Services Configuration support allVM sizes for Cloud Servicesexceptfor the following:
VM series | Unsupported sizes |
---|---|
A-series | Extra small |
Av2-series | Standard_A1_v2, Standard_A2_v2, Standard_A2m_v2 |
Size considerations
Application requirements- Consider the characteristics and requirements of the application you'll run on the nodes. Aspects like whether the application is multithreaded and how much memory it consumes can help determine the most suitable and cost-effective node size. For multi-instanceMPI workloadsor CUDA applications, consider specializedHPCorGPU-enabledVM sizes, respectively. For more information, seeUse RDMA-capable or GPU-enabled instances in Batch pools.
Tasks per node- It's typical to select a node size assuming one task runs on a node at a time. However, it might be advantageous to have multiple tasks (and therefore multiple application instances)run in parallelon compute nodes during job execution. In this case, it's common to choose a multicore node size to accommodate the increased demand of parallel task execution.
Load levels for different tasks- All of the nodes in a pool are the same size. If you intend to run applications with differing system requirements and/or load levels, we recommend that you use separate pools.
Region availability- A VM series or size might not be available in the regions where you create your Batch accounts. To check that a size is available, seeProducts available by region.
Quotas- Thecores quotasin your Batch account can limit the number of nodes of a given size you can add to a Batch pool. When needed, you canrequest a quota increase.
Pool configuration- In general, you have more VM size options when you create a pool in Virtual Machine configuration, compared with Cloud Services Configuration.
Supported VM images
Use one of the following APIs to return a list of Windows and Linux VM images currently supported by Batch, including the node agent SKU IDs for each image:
- PowerShell:Get-AzBatchSupportedImage
- Azure CLI:az batch pool supported-images
- Batch Service APIs:List Supported Images
For example, using the Azure CLI, you can obtain the list of supported VM images with the following command:
az batch pool supported-images list
Tip
It's recommended to avoid images with impending Batch support end of life (EOL) dates. These dates can be discovered via
theListSupportedImages
API,
PowerShell,orAzure CLI.
For more information, see theBatch best practices guideregarding Batch pool VM image selection.
Next steps
- Learn about theBatch service workflow and primary resourcessuch as pools, nodes, jobs, and tasks.
- For information about using compute-intensive VM sizes, seeUse RDMA-capable or GPU-enabled instances in Batch pools.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for