Function Compute supports the following billing methods: trial quotas, pay-as-you-go, and resource plans. CU usage is used as a unified billable item. All the previous billable items, including the number of function invocations, active GPU usage, idle GPU usage, active vCPU usage, idle vCPU usage, memory usage, and disk usage, are converted to CU usage for billing. This topic describes the conversion factors and unit prices of CU usage and provides billing examples.
You can log on to the Function Compute console and view the following monthly information in the Global Statistics section of the Overview page: invocations, active vCPU usage, idle vCPU usage, memory usage, disk usage, and active and idle GPU usage (including Tesla series and Ada series). Then, use the price calculator to convert the above resource usage to CU usage and calculate the total usage fee. The resource usage of all RAM users is calculated under the Alibaba Cloud account. Statistics are collected under the Alibaba Cloud account and bills are generated accordingly.
Starting from 00:00 on January 5, 2024, CDT is used to bill outbound Internet traffic of Function Compute. You are charged for Internet traffic based on billing rules of CDT. For more information, see Supported services. For more information, see [Product Change] Quota change of free Internet traffic.
Starting from August 27, 2024, Function Compute applies CU usage as a unified billable item for the original billable items, including the number of function invocations, active GPU usage, idle GPU usage, active vCPU usage, idle vCPU usage, memory usage, and disk usage. The original billable items are converted to CU usage, in CUs, based on conversion factors. The CU conversion factors vary based on different resource types. For more information, see Conversion factors.
If resources of other Alibaba Cloud services are consumed when you use Function Compute, pay attention to the billing of the related services.
Billing methods
Trial quotas
Function Compute provides a trial CU plan for users who activate Function Compute for the first time. If you have not purchased other types of resource plans, the resource usage that exceeds the trial quota in each cycle is billed on a pay-as-you-go basis. For more information, see Trial quotas.
Resource plans
Function Compute provides CU resource plans of five sizes. After you buy a resource plan, the resource plan is preferentially used to offset resource usage. You are charged on a pay-as-you-go basis when the quota in the resource plan is used up. Resource plans allow you to use the same amount of resources at more favorable prices. This helps you reduce costs. For more information, see Resource plans.
Pay-as-you-go
You are charged based on actual function execution durations. For more information, see Pay-as-you-go.
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 GPU usage, idle GPU usage, active vCPU usage, idle vCPU usage, memory usage, and disk 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 | Tesla series Active GPU usage | Tesla series Idle GPU usage | Ada series Active GPU usage | Ada series Idle GPU usage | Active vCPU usage | Idle vCPU usage | Memory usage | Disk usage |
Unit | CU/10,000 invocations | CU/GB-second | CU/GB-second | CU/GB-second | CU/GB-second | CU/vCPU-second | CU/vCPU-second | CU/GB-second | CU/GB-second |
CU conversion factor | 75 | 2.1 | 0.5 | 1.5 | 0.25 | 1 | 0 | 0.15 | 0.05 |
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 provisioned and on-demand modes. Measurement of execution duration of instances differs between the preceding two modes. 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 Configure provisioned instances.
Billing example
Assume that you have consumed the following resources in a month: 12 billion function invocations, 100 million GB-seconds of active GPU usage (Tesla series), 400 million GB-seconds of idle GPU usage (Tesla series), 800 million vCPU-seconds of vCPU usage, 2 billion GB-seconds of memory usage, and 0 million GB-seconds of disk usage. The following table shows the CU usage and total cost.
Resource usage type | Total usage | Conversion factor | CU usage after conversion |
Active vCPU usage | 800,000,000 vCPU-seconds | 1 CU/vCPU-second | 800,000,000 CU |
Memory usage | 2,000,000,000 GB-seconds | 0.15 CU/GB-second | 300,000,000 CU |
Disk usage | 0 GB-seconds | 0.05 CU/GB-second Note: The disk size of 512 MB is free of charge. You are charged only for disk capacity exceeds 512 MB. | 0 CU |
Tesla series Active GPU usage | 100,000,000 GB-seconds | 2.1 CU/GB-second | 210,000,000 CU |
Tesla series Idle GPU usage | 400,000,000 GB-seconds | 0.5 CU/GB-second | 200,000,000 CU |
Number of function invocations | 12,000,000,000 invocations | 0.0075 CUs/invocation | 90,000,000 CU |
Total CU usage: 1,600,000,000 CUs. |
Fee = Tier 1 unit price × Tier 1 usage + Tier 2 unit price × Tier 2 usage + Tier 3 unit price × Tier 3 usage = USD 0.000020/CU × 100,000,000 CUs + USD 0.000017/CU × 400,000,000 CUs + USD 0.000014/CU × 1,100,000,000 CUs = USD 24,200
The vCPU usage, memory usage, disk usage, and GPU usage are calculated based on the specifications that you configure for your function and durations of usage, not based on the actual amount of consumed resources during function invocations.