选择 Azure Batch 池中计算节点的 VM 大小和映像Choose a VM size and image for compute nodes in an Azure Batch pool

为 Azure Batch 池选择节点大小时,可以在 Azure 中提供的几乎所有 VM 大小中进行选择。When you select a node size for an Azure Batch pool, you can choose from among almost all the VM sizes available in Azure. Azure 针对不同工作负荷,为 Linux 和 Windows VM 提供一系列大小。Azure offers a range of sizes for Linux and Windows VMs for different workloads.

支持的 VM 系列和大小Supported VM series and sizes

虚拟机配置中的池Pools in Virtual Machine configuration

虚拟机配置中的 Batch 池支持几乎所有 VM 大小Batch pools in the Virtual Machine configuration support almost all VM sizes. 请参阅下表以了解有关支持的大小和限制的详细信息。See the following table to learn more about supported sizes and restrictions.

VM 系列VM series 支持的大小Supported sizes
基本 ABasic A 除 Basic_A0 (A0) 之外的所有大小All sizes except Basic_A0 (A0)
AA 除 Standard_A0 之外的所有大小All sizes except Standard_A0
Av2Av2 所有大小All sizes
BB 不支持Not supported
Dv2, DSv2Dv2, DSv2 所有大小All sizes
Dv3, Dsv3Dv3, Dsv3 所有大小All sizes
Ddv4、Ddsv4Ddv4, Ddsv4 所有大小All sizes
Dv4、Dsv4Dv4, Dsv4 不支持Not supported
Ev3, Esv3Ev3, Esv3 除 E64is_v3 之外的所有大小All sizes, except for E64is_v3
Edv4, Edsv4Edv4, Edsv4 所有大小All sizes
Ev4、Esv4Ev4, Esv4 不支持Not supported
F, FsF, Fs 所有大小All sizes
Fsv2Fsv2 所有大小All sizes
HH 所有大小All sizes
M1M1 所有大小All sizes
NCv31NCv31 所有大小All sizes

云服务配置中的池Pools in Cloud Services Configuration

警告

云服务配置池已被弃用Cloud Services Configuration pools are deprecated. 请改用虚拟机配置池。Please use Virtual Machine Configuration pools instead.

云服务配置中的 Batch 池支持所有云服务的 VM 大小,但以下项除外:Batch pools in Cloud Services Configuration support all VM sizes for Cloud Services except for the following:

VM 系列VM series 不支持的大小Unsupported sizes
A 系列A-series 超小Extra small
Av2 系列Av2-series Standard_A1_v2、Standard_A2_v2、Standard_A2m_v2Standard_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. 对于多实例 MPI 工作负荷或 CUDA 应用程序,请考虑使用专用启用了 GPU 的 VM 大小。For multi-instance MPI workloads or CUDA applications, consider specialized GPU-enabled VM sizes, respectively. 有关详细信息,请参阅在 Batch 池中使用支持 RDMA 或启用了 GPU 的实例For more information, see Use 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 parallel on compute nodes during job execution. 在此情况下,往往会选择多核节点大小,以满足更高的并行任务执行需求。In this case, it is 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.

  • 区域可用性 - 某个 VM 系列或大小在创建 Batch 帐户的区域中可能无法使用。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, see Products available by region.

  • 配额 - Batch 帐户中的 核心配额会限制可添加到 Batch 池的给定大小的节点数。Quotas - The cores quotas in your Batch account can limit the number of nodes of a given size you can add to a Batch pool. 根据需要请求增加配额When needed, you can request a quota increase.

  • 池配置 - 通常,与云服务配置相比,在虚拟机配置中创建池时有更多 VM 大小选项。Pool configuration - In general, you have more VM size options when you create a pool in Virtual Machine configuration, compared with Cloud Services Configuration.

支持的 VM 映像Supported VM images

使用以下 API 之一返回 Batch 当前支持的 Windows 和 Linux VM 映像列表,包括每个映像的节点代理 SKU ID: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:

强烈建议避免使用 Batch 支持终止 (EOL) 日期临近的映像。It is strongly recommended to avoid images with impending Batch support end of life (EOL) dates. 可通过 ListSupportedImages APIPowerShellAzure CLI 发现这些日期。These dates can be discovered via the ListSupportedImages API, PowerShell, or Azure CLI. 有关 Batch 池 VM 映像选择的详细信息,请参阅 Batch 最佳做法指南Please see the Batch best practices guide for more information regarding Batch pool VM image selection.

后续步骤Next steps