Skip to content

Launch instances with ODCR (On Demand Capacity Reservations)

Enrico Usai edited this page Jun 15, 2022 · 11 revisions

The following content has been moved to the official documentation: Launch instances with ODCR (On-Demand Capacity Reservations) - ParallelCluster 3.x. Please refer to official documentation for updated instructions.

ODCR background

ODCRs can be configured as 'open' or 'targeted'. Open ODCRs will cover any instances that match the ODCR attributes (instance type, platform, Availability Zone) while targeted ODCRs need to be explicitly defined in the run-instances call. It’s possible to distinguish open/targeted ODCR, by executing describe-capacity-reservation.

Then there is the possibility to create ODCR associated with a PG, this reservation is called CPG ODCR (or PG/ODCR).

Multiple ODCRs can be grouped in a Resource Group, this can be used in the run-instances override to target multiple ODCR at the same time.

Using ODCR with ParallelCluster

Open ODCR is supported out of the box by any ParallelCluster version. In an Open ODCR you don’t need to specify anything in ParallelCluster, the instances will be automatically selected. You can specify an existing Placement Group or enable it to permit ParallelCluster to create a new one.

Support for targeted ODCR has been added starting from ParallelCluster 3.1.1 and ParallelCluster 2.11.3. We have introduced a mechanism to override EC2 RunInstances parameters and therefore pass information about the reservation to use for each configured compute resource in ParallelCluster. This mechanism is compatible with the usage of targeted ODCR. For this case it is required to specify run-instances override configuration (described in the next sections).

If you’re using a targeted ODCR, you could specify a Placement Group and this should work, in any case you need to specify run-instances override configuration.

If AWS created a targeted ODCR for you, or you have a specific set of reserved instances, you cannot specify a Placement Group, because the rules configured by AWS could conflict with the Placement Group setting. So if a PG is required for your application, you need to ask for a CPG ODCR. In any case you need to specify run-instances override configuration.

If you’re using a CPG/ODCR, you have to specify the run-instances override configuration and you have to specify the same Placement Group in the cluster configuration.

Reserved Instances

Reserved instances are different by Capacity Reservation (ODCR) and there are 2 types of reserved instances. A regional Reserved Instance does not reserve capacity. A zonal Reserved Instance reserves capacity in the specified Availability Zone.

If you have regional Reserved instances there is no capacity reservation and you can get Insufficient Capacity Errors. If you have zonal Reserved Instances you have capacity reservation but there are no parameters you can specify in the run-instances api to use them.

Using Reserved Instances with ParallelCluster

Reserved instances are supported out of the box by any ParallelCluster version, you don't need to specify anything in ParallelCluster, the instances will be automatically selected.

When using Zonal Reserved Instances you should not specify a Placement Group in the configuration, you can get Insufficient Capacity Errors.

Instructions on using RunInstances customization in ParallelCluster 3

  • [Launch instances with ODCR (On-Demand Capacity Reservations)
Clone this wiki locally