Starting from 00:00 on June 14, 2024, Function Compute introduces the idle billing for GPU usage to help you save costs. Idle GPU usage is priced at USD 0.000007/CU.
You can request to enable the idle mode when you configure a provisioned instance policy for your function. After you enable the idle mode, GPU resources for GPU-accelerated instances are frozen when no requests are being processed. The GPU-accelerated instances enter the idle state. For more information, see Configure provisioned instances. The idle GPU usage is billed at USD 0.000007/CU, which significantly reduces your costs. For more information, see Billing overview.
Billing examples
This section compares fees that are generated if the GPU idle mode is enabled and if the GPU idle mode is not enabled. In this example, you deploy a Stable Diffusion application with 16 GB of Tesla GPU cards and specify to reserve GPU-accelerated instances for 1 hour, during which the function is invoked for 1,800 times. Each of the invocation takes 1 second.
The following sections compare fees that are generated if the GPU idle mode is enabled and if the GPU idle mode is not enabled.
Idle mode not enabled
If the idle mode is not enabled, GPU-accelerated instances are always active regardless of whether the function is invoked. In this case, you are charged based on the entire reservation period, which is 1 hour.
GPU usage fee if idle mode is not enabled |
Active GPU usage = GPU specification × Provisioned duration = 16 GB × 3,600 seconds = 57,600 CUs, which falls into tiered 0. For more information, see Billing overview. |
Fee = Tier 0 unit price × Usage = USD 0.000018/CU × 57,600 CUs = USD 1.0368 |
Idle mode enabled
If the idle mode is enabled, you are charged based on the active GPU usage and idle GPU usage. The active GPU usage fee is calculated based on the active duration, specifically, 1,800 seconds (1,800 invocations x 1 seconds/invocation). The idle GPU usage fee is calculated based on the idle duration, which is 1,800 seconds.
GPU usage fee if idle mode is enabled |
Active GPU usage = GPU specification × Execution duration = 16 GB × 1,800 seconds = 28,800 CUs, which falls into tiered 0. For more information, see Billing overview. Idle GPU usage = GPU specification × Idle duration = 16 GB × 1,800 seconds = 28,800 CUs |
Fee = Tier 0 unit price × Active GPU usage + Idle GPU price × Idle GPU usage = USD 0.000018/CU × 28,800 CUs + USD 0.000007/CU × 28,800 CUs = USD 0.72 |
Mapping of GPU compute units
Function Compute provides GPU-accelerated instances of Tesla series and Ampere series. The following table shows the correspondence between the computing power units.
GPU card type | CU | GB-second |
Tesla series | 1 | 1 |
Ampere series | 1 | 1 |