Billing Example 1: Resource Utilization Optimization for Multiple Jobs
AI DataLake provides the following types of resources:
- Yearly/Monthly and pay-per-use reserved resource pools
- Pay-per-use elastic resources
- Pay-per-use storage resources
Billing Scenarios
User A purchases a reserved resource pool with 20 vCPUs in AI DataLake.
- The unit price of the reserved resource pool is $0.08 USD/vCPU/hour. Billing starts after the resource is purchased. Resources that are no longer needed should be deleted timely.
In this example, as the job running time is uncertain, the purchased resources are occupied for 30 days, 24 hours per day.
The estimated fee of the reserved resource pool is $1,152 USD (20 vCPUs x $0.08 USD/vCPU/hour x 30 days x 24 hours).
- The unit price of elastic resources is $0.08 USD/vCPU/hour.
Configure endpoints A and B.
| Endpoint | Resource Pool | Resource Allocation Mode |
|---|---|---|
| Endpoint A | N/A | On-demand |
| Endpoint B | Resource pool 1 | Hybrid |
User A runs the following jobs in sequence.
Assume that each T period is 4 hours. The job is executed once a day in the same period for 30 consecutive days.
| Endpoint | Job | Required Resource | Time Range | Duration |
|---|---|---|---|---|
| Endpoint A | Job1 | 10 vCPUs | T1–T3 | 8 hours |
| Endpoint B | Job2 | 10 vCPUs | T1–T4 | 12 hours |
| Endpoint B | Job3 | 20 vCPUs | T2–T4 | 8 hours |
| Endpoint B | Job4 | 20 vCPUs | T2–T4 | 8 hours |
Job Submission Timeline and Resource Allocation
The unit price in this example is only used to describe the calculation method, and the calculation results are estimated fees. Actual fees may vary due to changes in unit prices and real-world usage. Use the data published on the Huawei Cloud official website.
| Job | Required Resource | Time Range | Duration | Scheduling Logic | Billing Mode | Fee |
|---|---|---|---|---|---|---|
| Job1 | 10 vCPUs | T1–T3 | 8 hours | Elastic resources | Pay-per-use | Fee = 10 vCPUs × $0.08 USD/vCPU/hour × 8 hours = $6.4 USD |
| Job2 | 10 vCPUs | T1–T4 | 12 hours | Reserved resources | Prepaid | Fee of the reserved resource pool: $1,152 USD |
| Job3 | 20 vCPUs | T2–T4 | 8 hours | Elastic resources | Pay-per-use | Fee = 20 vCPUs × $0.08 USD/vCPU/hour × 8 hours = $12.8 USD |
| Job4 | 20 vCPUs | T2–T4 | 8 hours | Elastic resources | Pay-per-use | Fee = 20 vCPUs × $0.08 USD/vCPU/hour × 8 hours = $12.8 USD |
| Total | Pay-per-use fee of elastic resources + Fee of reserved resources = ($32 USD/day × 30 days) + $1,152 USD = $2,112 USD | |||||
The reserved resource pool has 20 vCPUs in total. From T1 to T4, Job2 occupies 10 vCPUs. From T2 to T4, Job3 and Job4 both require 20 vCPUs. However, only 10 vCPUs are available in the reserved resource pool, so elastic resources are scheduled. The remaining 10 vCPUs in the reserved resource pool are still idle and billed.
Improving Resource Utilization
The unit price in this example is only used to describe the calculation method, and the calculation results are estimated fees. Actual fees may vary due to changes in unit prices and real-world usage. Use the data published on the Huawei Cloud official website.
In this example, only Job2 uses the reserved resource pool, and the other three jobs use pay-per-use elastic resources.
To improve resource utilization and reduce costs, you can increase the specifications of the reserved resource pool (from 20 vCPUs to 30 vCPUs) and optimize resource scheduling.
Method: Increase the specifications of the reserved resource pool (from 20 vCPUs to 30 vCPUs) and adjust the job execution time (run Job4 after T4 to prevent it from preempting resources with Job3).
The estimated fee of the reserved resource pool is $1,728 USD (30 vCPUs x $0.08 USD/vCPU/hour x 30 days x 24 hours).
After the specifications are increased, the fees are as follows.
| Job | Required Resource | Time Range | Duration | Scheduling Logic | Billing Mode | Fee |
|---|---|---|---|---|---|---|
| Job1 | 10 vCPUs | T1–T3 | 8 hours | Elastic resources | Pay-per-use | Fee = 10 vCPUs × $0.08 USD/vCPU/hour × 8 hours = $6.4 USD |
| Job2 | 10 vCPUs | T1–T4 | 12 hours | Reserved resources | Prepaid | Fee of the shared reserved resource pool: $1,728 USD |
| Job3 | 20 vCPUs | T2–T4 | 8 hours | Reserved resources | Prepaid | |
| Job4 | 20 vCPUs | T4-T6 | 8 hours | Reserved resources | Prepaid | |
| Total | Pay-per-use fee of elastic resources + Fee of reserved resources = ($6.4 USD/day × 30 days) + $1,728 USD = $1,920 USD | |||||
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot