All Products
Search
Document Center

Function Compute:Pay-as-you-go

Last Updated:Aug 27, 2024

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 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.

Important

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 granularity

The following table describes the billing granularities of execution duration for different types of instances.

Instance type

On-demand mode

Provisioned mode

Elastic Instances

The billing granularity is milliseconds.

The billing granularity is seconds. Execution durations 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 seconds. 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.

Note
  • 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 one hour. Fees are settled on an hourly basis based on the corresponding billing granularity.

Billing cycle

Bills are generated on an hourly basis. The billing time is about 1 to 2 hours after the end of the current billing cycle. Fees are automatically deducted from your account.

More information