

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

# Beberapa alokasi tipe instans dengan Slurm
<a name="slurm-multiple-instance-allocation-v3"></a>

Dimulai dengan AWS ParallelCluster versi 3.3.0, Anda dapat mengonfigurasi klaster untuk mengalokasikan dari kumpulan sumber daya komputasi dari jenis instans yang ditentukan. Alokasi dapat didasarkan pada biaya rendah EC2 armada Amazon atau strategi kapasitas optimal.

Kumpulan jenis instance yang ditentukan ini harus memiliki jumlah v yang sama CPUs atau, jika multithreading dinonaktifkan, jumlah inti yang sama. Selain itu, rangkaian jenis instance ini harus memiliki jumlah akselerator yang sama dari produsen yang sama. Jika [`Efa`](Scheduling-v3.md#yaml-Scheduling-SlurmQueues-ComputeResources-Efa)/[`Enabled`](Scheduling-v3.md#yaml-Scheduling-SlurmQueues-ComputeResources-Efa-Enabled)disetel ke`true`, instance harus didukung EFA. Untuk informasi dan persyaratan lebih lanjut, lihat [`Scheduling`](Scheduling-v3.md)/[`SlurmQueues`](Scheduling-v3.md#Scheduling-v3-SlurmQueues)/[`AllocationStrategy`](Scheduling-v3.md#yaml-Scheduling-SlurmQueues-AllocationStrategy)dan [`ComputeResources`](Scheduling-v3.md#Scheduling-v3-SlurmQueues-ComputeResources)/[`Instances`](Scheduling-v3.md#yaml-Scheduling-SlurmQueues-ComputeResources-Instances).

Anda dapat mengatur [`AllocationStrategy`](Scheduling-v3.md#yaml-Scheduling-SlurmQueues-AllocationStrategy)ke `lowest-price` atau `capacity-optimized` tergantung pada [CapacityType](Scheduling-v3.md#yaml-Scheduling-SlurmQueues-CapacityType)konfigurasi Anda.

Di [`Instances`](Scheduling-v3.md#yaml-Scheduling-SlurmQueues-ComputeResources-Instances), Anda dapat mengonfigurasi satu set jenis instance.

**catatan**  
[Dimulai dengan AWS ParallelCluster versi 3.7.0, `EnableMemoryBasedScheduling` dapat diaktifkan jika Anda mengonfigurasi beberapa jenis instans di Instans.](Scheduling-v3.md#yaml-Scheduling-SlurmQueues-ComputeResources-Instances)  
Untuk AWS ParallelCluster versi 3.2.0 hingga 3.6. *x*, tidak `EnableMemoryBasedScheduling` dapat diaktifkan jika Anda mengonfigurasi beberapa jenis instans di [Instans.](Scheduling-v3.md#yaml-Scheduling-SlurmQueues-ComputeResources-Instances)

Contoh berikut menunjukkan bagaimana Anda dapat melakukan kueri jenis instance untuk vCPUs, dukungan EFA, dan arsitektur.

Kueri InstanceTypes dengan arsitektur 96 v CPUs dan x86\$164.

```
$ 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
```

Kueri InstanceTypes dengan 64 core, dukungan EFA, dan arsitektur 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
```

Contoh cuplikan konfigurasi cluster berikutnya menunjukkan bagaimana Anda dapat menggunakan ini InstanceType and AllocationStrategy properti.

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