使用 Slurm 分配多实例类型 - AWS ParallelCluster

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

使用 Slurm 分配多实例类型

从AWS ParallelCluster版本 3.3.0 开始,您可以将集群配置为从计算资源的一组已定义的实例类型中进行分配。可以基于 EC2 队列低成本或最佳容量策略进行分配。

这组已定义的实例类型必须具有相同数量的 vCPUs,或者如果禁用了多线程,则必须具有相同数量的内核。此外,这组实例类型必须具有相同制造商的相同数量的加速器。如果将 Efa/设置Enabledtrue,则实例必须支持 EFA。有关更多信息和要求,请参阅 Scheduling/SlurmQueues/AllocationStrategyComputeResources/Instances

您可以设置AllocationStrategylowest-price或,capacity-optimized具体取决于您的CapacityType配置。

在中 Instances,您可以配置一组实例类型。

以下示例演示如何通过实例类型查询 vCPUs、EFA 支持和架构。

InstanceTypes使用 96 vCPUs 和 x86_64 架构进行查询。

$ aws ec2 describe-instance-types --region region-id \ --filters "Name=vcpu-info.default-vcpus,Values=96" "Name=processor-info.supported-architecture,Values=x86_64" \ --query "sort_by(InstanceTypes[*].{InstanceType:InstanceType,MemoryMiB:MemoryInfo.SizeInMiB,CurrentGeneration:CurrentGeneration,VCpus:VCpuInfo.DefaultVCpus,Cores:VCpuInfo.DefaultCores,Architecture:ProcessorInfo.SupportedArchitectures[0],MaxNetworkCards:NetworkInfo.MaximumNetworkCards,EfaSupported:NetworkInfo.EfaSupported,GpuCount:GpuInfo.Gpus[0].Count,GpuManufacturer:GpuInfo.Gpus[0].Manufacturer}, &InstanceType)" \ --output table

InstanceTypes使用 64 个内核、EFA 支持和 arm64 架构进行查询。

$ aws ec2 describe-instance-types --region region-id \ --filters "Name=vcpu-info.default-cores,Values=64" "Name=processor-info.supported-architecture,Values=arm64" "Name=network-info.efa-supported,Values=true" --query "sort_by(InstanceTypes[*].{InstanceType:InstanceType,MemoryMiB:MemoryInfo.SizeInMiB,CurrentGeneration:CurrentGeneration,VCpus:VCpuInfo.DefaultVCpus,Cores:VCpuInfo.DefaultCores,Architecture:ProcessorInfo.SupportedArchitectures[0],MaxNetworkCards:NetworkInfo.MaximumNetworkCards,EfaSupported:NetworkInfo.EfaSupported,GpuCount:GpuInfo.Gpus[0].Count,GpuManufacturer:GpuInfo.Gpus[0].Manufacturer}, &InstanceType)" \ --output table

下一个示例集群配置片段显示了如何使用这些InstanceType和AllocationStrategy属性。

... Scheduling: Scheduler: slurm SlurmQueues: - Name: queue-1 CapacityType: ONDEMAND AllocationStrategy: lowest-price ... ComputeResources: - Name: computeresource1 Instances: - InstanceType: r6g.2xlarge - InstanceType: m6g.2xlarge - InstanceType: c6g.2xlarge MinCount: 0 MaxCount: 500 - Name: computeresource2 Instances: - InstanceType: m6g.12xlarge - InstanceType: x2gd.12xlarge MinCount: 0 MaxCount: 500 ...