This topic describes how to configure an auto provisioning group in different scenarios.
Machine learning scenarios
- Region: China (Hangzhou).
- Instances: use NVIDIA V100 GPUs. The GPU memory of a single instance does not exceed 32 GB.
- Target capacity: 20 instances.
- To minimize costs, only preemptible instances are created. The number of instances in the instance cluster can be less than the value specified by the Target Capacity parameter.
- Instances must be released after the task is completed.
Section | Parameter | Description |
---|---|---|
Capacity Configuration | Target Capacity | Configure the following settings based on the target capacity and instance category
requirements:
|
Instance Configuration | Instance Configuration | Perform the following operations to meet the requirements for instances that use NVIDIA
V100 GPUs and the GPU memory of no larger than 32 GB per instance:
You can add instance configurations based on the zones and instance types:
The following resource pools are formed after you add the preceding configurations:
|
Provisioning Policy | Select Cost Optimization Policy. After the auto provisioning group is started, the resource pool that is available at the lowest price is used to create an instance cluster. | |
Advanced | Group Type | To minimize costs, the number of instances in the instance cluster can be less than the value specified by the Target Capacity parameter. In this case, select One-time Delivery. |
Start Time and End Time | Specify the start and expiration time based on the next-week time requirement. | |
Instance Shutdown Settings |
|
Ticketing website scenarios
- Region: China (Hangzhou).
- Instances: The number of vCPUs on a single instance does not exceed 8.
- Target capacity: 80 vCPUs.
- Minimum capacity: 60 vCPUs.
- To minimize costs, the website access experience is optimized based on the minimum computing requirements of the cluster.
- The cluster must have disaster recovery capabilities.
Section | Parameter | Description |
---|---|---|
Capacity Configuration | Target Capacity | Configure the following settings based on the target capacity and minimum capacity
requirements:
|
Pay-as-you-go Instance Capacity | Specify 60 in the spin box to meet the minimum capacity requirement. | |
Instance Configuration | Instance Configuration | The c6 instance family is used because it is suitable for building frontend web servers.
Perform the following operations to meet the requirements for instances that are equipped
with no more than 8 vCPUs per instance:
You can add instance configurations based on the zones and instance types:
The following resource pools are formed after you add the preceding configurations:
|
Provisioning Policy | Select Balanced Distribution Policy. After the auto provisioning group is started, it attempts to evenly create instances across zones to prevent instance creation failures caused by insufficient resources within a single zone. This can improve the disaster recovery capabilities of applications. | |
Advanced | Group Type | Select Continuous Delivery and Maintain Capacity to continuously provide ticketing service. |
Start Time and End Time | The auto provisioning group immediately starts and can be indefinitely retained to continuously provide ticketing service. | |
Instance Shutdown Settings | Select Shut Down Excessive Instances When Target Capacity Is Exceeded to minimize costs. |
Instance type | vCPU | Pay-as-you-go price (USD) | Weight | Weighted price (USD) |
---|---|---|---|---|
ecs.c6.large | 2 | 0.06/hour | 2 | 0.03/hour |
ecs.c6.xlarge | 4 | 0.121/hour | 4 | 0.03025/hour |
ecs.c6.2xlarge | 8 | 0.241/hour | 8 | 0.030125/hour |
When an auto provisioning group attempts to create an instance cluster, the auto provisioning group first attempts to implement the balanced distribution policy and evenly creates instances across zones. Then, the auto provisioning group attempts to choose instance types that have lower weighted prices to create instances. If the weighted prices of all instance types are the same, the auto provisioning group chooses instance types at random to create instances.
Use multiple resource pools that have the lowest prices
If you want to minimize costs and alleviate the impact of reclaiming preemptible instances created by using a single resource pool, you can configure an auto provisioning group to use multiple resource pools that have the lowest prices to create instances.
- Obtain five resource pools based on the lt-bp1ivgo4p5now3px**** launch template.
- Set the target capacity to 30 instances and create only preemptible instances.
- Use the three resource pools that have the lowest prices and create 10 preemptible instances from each resource pool.
Parameter | Value | Description |
---|---|---|
TotalTargetCapacity | 30 | Sets the target capacity to 30 instances. |
SpotTargetCapacity | 30 | Creates 30 preemptible instances. |
PayAsYouGoTargetCapacity | 0 | Creates no pay-as-you-go instances. |
SpotAllocationStrategy | lowest-price | Uses the cost optimization policy for preemptible instances. |
PayAsYouGoAllocationStrategy | lowest-price | Uses the cost optimization policy for pay-as-you-go instances. |
SpotInstancePoolsToUseCount | 3 | Uses the three resource pools that have the lowest prices. |
LaunchTemplateId | lt-bp1ivgo4p5now3px**** | The ID of the launch template used to create instances. |
LaunchTemplateConfig.1.VSwitchId | vsw-bp1ygryo03m39xhsy**** | The ID of the vSwitch of the extended configuration 1 (Resource Pool 1). |
LaunchTemplateConfig.1.InstanceType | ecs.c6e.large | The instance type of the extended configuration 1 (Resource Pool 1). |
LaunchTemplateConfig.1.WeightedCapacity | 1 | The weight of the instance type of the extended configuration 1 (Resource Pool 1). |
LaunchTemplateConfig.2.VSwitchId | vsw-bp16hgf8f3kvtcbyu**** | The ID of the vSwitch of the extended configuration 2 (Resource Pool 2). |
LaunchTemplateConfig.2.InstanceType | ecs.c6e.xlarge | The instance type of the extended configuration 2 (Resource Pool 2). |
LaunchTemplateConfig.2.WeightedCapacity | 1 | The weight of the instance type of the extended configuration 2 (Resource Pool 2). |
LaunchTemplateConfig.3.VSwitchId | vsw-bp1oeawdo9tj2gvjp**** | The ID of the vSwitch of the extended configuration 3 (Resource Pool 3). |
LaunchTemplateConfig.3.InstanceType | ecs.c6e.2xlarge | The instance type of the extended configuration 3 (Resource Pool 3). |
LaunchTemplateConfig.3.WeightedCapacity | 1 | The weight of the instance type of the extended configuration 3 (Resource Pool 3). |
LaunchTemplateConfig.4.VSwitchId | vsw-bp1oeawdo9tj2gvjp**** | The ID of the vSwitch of the extended configuration 4 (Resource Pool 4). |
LaunchTemplateConfig.4.InstanceType | ecs.g6e.xlarge | The instance type of the extended configuration 4 (Resource Pool 4). |
LaunchTemplateConfig.4.WeightedCapacity | 1 | The weight of the instance type of the extended configuration 4 (Resource Pool 4). |
LaunchTemplateConfig.5.VSwitchId | vsw-bp1oeawdo9tj2gvjp**** | The ID of the vSwitch of the extended configuration 5 (Resource Pool 5). |
LaunchTemplateConfig.5.InstanceType | ecs.g6e.2xlarge | The instance type of the extended configuration 5 (Resource Pool 5). |
LaunchTemplateConfig.5.WeightedCapacity | 1 | The weight of the instance type of the extended configuration 5 (Resource Pool 5). |
Use a specific resource pool
You can use a specific resource pool to create instances. For example, if you purchase zone-level reserved instances to create ecs.c6e.large instances and to offset the bills of the instances, you can configure an auto provisioning group to create pay-as-you-go instances of the ecs.c6e.large instance type by using a specific resource pool.
- Obtain five resource pools based on the lt-bp1ivgo4p5now3px**** launch template.
- Set the target capacity to 20 instances, including 10 preemptible instances and 10 pay-as-you-go instances.
- Use the resource pool corresponding to the ecs.c6e.large instance type to create pay-as-you-go instances by specifying the LaunchTemplateConfig.1 parameter.
Parameter | Value | Description |
---|---|---|
TotalTargetCapacity | 20 | Sets the target capacity to 20 instances. |
SpotTargetCapacity | 10 | Creates 10 preemptible instances. |
PayAsYouGoTargetCapacity | 10 | Creates 10 pay-as-you-go instances. |
SpotAllocationStrategy | lowest-price | Uses the cost optimization policy for preemptible instances. |
PayAsYouGoAllocationStrategy | prioritized | Uses the cost optimization policy for pay-as-you-go instances. |
LaunchTemplateId | lt-bp1ivgo4p5now3px**** | The ID of the launch template used to create instances. |
LaunchTemplateConfig.1.VSwitchId | vsw-bp1ygryo03m39xhsy**** | The ID of the vSwitch of the extended configuration 1 (Resource Pool 1). |
LaunchTemplateConfig.1.InstanceType | ecs.c6e.large | The instance type of the extended configuration 1 (Resource Pool 1). |
LaunchTemplateConfig.1.WeightedCapacity | 1 | The weight of the instance type of the extended configuration 1 (Resource Pool 1). |
LaunchTemplateConfig.1.Priority | 0 | The priority of the extended configuration 1. The value 0 indicates the highest priority. |
LaunchTemplateConfig.2.VSwitchId | vsw-bp16hgf8f3kvtcbyu**** | The ID of the vSwitch of the extended configuration 2 (Resource Pool 2). |
LaunchTemplateConfig.2.InstanceType | ecs.c6e.xlarge | The instance type of the extended configuration 2 (Resource Pool 2). |
LaunchTemplateConfig.2.WeightedCapacity | 1 | The weight of the instance type of the extended configuration 2 (Resource Pool 2). |
LaunchTemplateConfig.3.VSwitchId | vsw-bp1oeawdo9tj2gvjp**** | The ID of the vSwitch of the extended configuration 3 (Resource Pool 3). |
LaunchTemplateConfig.3.InstanceType | ecs.c6e.2xlarge | The instance type of the extended configuration 3 (Resource Pool 3). |
LaunchTemplateConfig.3.WeightedCapacity | 1 | The weight of the instance type of the extended configuration 3 (Resource Pool 3). |
LaunchTemplateConfig.4.VSwitchId | vsw-bp1oeawdo9tj2gvjp**** | The ID of the vSwitch of the extended configuration 4 (Resource Pool 4). |
LaunchTemplateConfig.4.InstanceType | ecs.g6e.xlarge | The instance type of the extended configuration 4 (Resource Pool 4). |
LaunchTemplateConfig.4.WeightedCapacity | 1 | The weight of the instance type of the extended configuration 4 (Resource Pool 4). |
LaunchTemplateConfig.5.VSwitchId | vsw-bp1oeawdo9tj2gvjp**** | The ID of the vSwitch of the extended configuration 5 (Resource Pool 5). |
LaunchTemplateConfig.5.InstanceType | ecs.g6e.2xlarge | The instance type of the extended configuration 5 (Resource Pool 5). |
LaunchTemplateConfig.5.WeightedCapacity | 1 | The weight of the instance type of the extended configuration 5 (Resource Pool 5). |