The pay-as-you-go billing method allows you to pay for resources after they are used. If you use the pay-as-you-go billing method, you pay only for the Function Compute resources that you use. You do not need to purchase resources in advance. This topic describes the resources that support the pay-as-you-go billing method and the settlement rules.
Prices
CU usage is billed monthly on a tiered basis. The following table describes the details.
Tier | CU usage (CU) | Unit price | Discounted unit price August 27, 2024 to August 27, 2025 |
1 | (0, 100 million] | USD 0.000020/CU | USD 0.0000160/CU |
2 | (100 million, 500 million] | USD 0.000017/CU | USD 0.0000136/CU |
3 | > 500 million | USD 0.000014/CU | USD 0.0000112/CU |
Conversion factors
The original billable items of Function Compute, including the number of function invocations, active vCPU usage, idle vCPU usage, memory usage, disk usage, active GPU usage, and idle GPU usage are converted to CU usage based on the following formula: Resource usage × Conversion factor = CU Usage.
The following table lists the conversion factors.
Billable item | Function invocations | Active vCPU usage | Idle vCPU usage | Memory usage | Disk usage | Tesla series active GPU usage | Tesla series idle GPU usage | Ada series active GPU usage | Ada series idle GPU usage |
Unit | CU/10,000 invocations | CU/vCPU-second | CU/vCPU-second | CU/GB-second | CU/GB-second | CU/GB-second | CU/GB-second | CU/GB-second | CU/GB-second |
CU conversion factor | 75 | 1 | 0 | 0.15 | 0.05 | 2.1 | 0.5 | 1.5 | 0.25 |
Terms
Idle mode: Function Compute supports the idle mode feature. After the idle mode feature is enabled, elastic instances and GPU-accelerated instances in Function Compute are classified into active and idle instances based on whether they are processing requests.
Active instance: Instances that are processing requests.
Idle instance: Instances that are not processing requests after the idle mode is enabled.
Execution duration: Instances in Function Compute can be used in the provisioned and on-demand modes. Measurement of the execution duration of instances in the preceding two modes varies. For more information, see Instance types and usage modes.
On-demand mode: Function Compute automatically allocates and releases function instances. The billing of an on-demand function instance starts when the function instance starts to execute requests and ends when the requests are executed.
Provisioned mode: Function instances are allocated, released, and managed by yourself. The billing of a provisioned instance starts when Function Compute allocates the instance and ends when you release the instance.
In provisioned mode, you are charged for instances until you release the instances, even if the instances do not process any requests. If your provisioned instances do not process any requests and fees continue to incur, release the instances at the earliest opportunity. For more information, see Modify or delete a provisioned instance policy.
Billing granularity
The following table describes the billing granularities of different types of instances based on the execution duration of the instances.
Instance type | On-demand mode | Provisioned mode |
CPU-accelerated instances | The billing granularity is milliseconds. | The billing granularity is 10 seconds. Execution seconds that are not tens are rounded up to the nearest tens. Note For example, if the execution duration of a provisioned instance is 51 seconds, you are charged for 60 seconds. If the execution duration is 61 seconds, you are charged for 70 seconds. |
GPU-accelerated instances | The billing granularity is 1 second. Partial seconds are rounded up to full seconds for billing. Note For example, if the execution duration of an on-demand GPU-accelerated instance is 51 milliseconds, you are charged for 1 second. If the execution duration is 10.5 seconds, you are charged for 11 seconds. |
The execution duration refers to the running period of a function. The execution duration varies based on instance modes. For more information, see Terms.
The billing cycle is 1 hour. Fees are settled on an hourly basis based on the corresponding billing granularity.
Billing cycle
Bills are generated on an hourly basis. The bill of an hour is generated one to two hours after the current hour.
In each billing cycle, the CU usage of each function is measured and rounded up. CU usage of all functions are summed to calculate the total fee in the billing cycle. Fees are automatically deducted from your account balance. You can view the billing details in the Expenses and Costs console.
More information
If you want to use the same amount of resources at a more favorable price, you can use resource plans. For more information, see Resource plans.
If bills continue to be generated after you terminate Function Compute services, see Why am I still charged after I stop services in Function Compute?
If you want to unsubscribe from Function Compute, refer to Can I unsubscribe from Function Compute if I have an overdue payment and no longer want to use the service? How do I settle overdue payments?