All Products
Search
Document Center

Function Compute:Pay-as-you-go

Last Updated:Jan 24, 2025

The pay-as-you-go billing method allows you to pay for resources after they are used. With this method, you only pay for the Function Compute resources that you use and do not need to purchase resources in advance. This topic describes the resources that support the pay-as-you-go billing method and the associated 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

Number of 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. When this feature is enabled, CPU and GPU-accelerated instances are classified as either active or idle, depending on whether they are processing requests.

    • Active instances: instances that are processing requests.

    • Idle instances: instances that are not processing requests.

  • Execution duration: Instances in Function Compute can operate in both provisioned and on-demand modes. The measurement of execution duration differs between these 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 your instances regardless of whether they are processing requests or not, until you release them. Therefore, when your provisioned instances are not processing any requests and charges continue to incur, release unneeded instances at your earliest opportunity to avoid unnecessary fees. For more information, see Configure auto scaling rules.

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 instances

The billing granularity is 1 millisecond.

The billing granularity is 1 second. Any duration not reaching a multiple of 10 seconds is rounded up to the next multiple of 10 seconds for billing.

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.

Note
  • The measurement of execution duration differs between on-demand and provisioned instances. 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. Fees are automatically deducted from your account.

More information