Function Compute provides elastic instances and GPU-accelerated instances. This topic describes the types, specifications, usage notes, and usage modes of the instances.
Instance types
Elastic instance: The basic type of instance provided by Function Compute. Elastic instances are suitable for scenarios in which traffic spikes occur and compute-intensive scenarios.
GPU-accelerated instance: Instances that use the Ampere and Turing architectures for GPU acceleration. In most cases, GPU-accelerated instances are used in scenarios such as audio and video processing, AI, and image processing. Instances of this type accelerate business by offloading loads to GPU hardware.
The following topics describe the best practices for GPU-accelerated instances in different scenarios:
ImportantGPU-accelerated instances can be deployed only by using container images.
For optimal user experience, join the DingTalk group 11721331 and provide the following information:
Your organization name, such as your company name.
The ID of your Alibaba Cloud account.
The region where you want to use GPU-accelerated instances. Example: China (Shenzhen).
Your contact information, such as your mobile number, email address, or DingTalk account.
Instance specifications
Elastic instances
The following table describes the specifications of elastic instances. You can select instance specifications based on your business requirements.
vCPU (core)
Memory size (MB)
Maximum code package size (GB)
Maximum function execution duration (seconds)
Maximum disk size (GB)
Maximum bandwidth (Gbit/s)
Valid values: 0.05 to 16
Note: The value must be a multiple of 0.05.
Valid values: 128 to 32768
Note: The value must be a multiple of 64.
10
86400
10
Valid values:
512 MB. This is the default value.
10 GB.
5
NoteThe ratio of vCPU capacity to memory capacity (in GB) ranges from 1:1 to 1:4.
GPU-accelerated instances
The following table describes the specifications of GPU-accelerated instances. You can select instance specifications based on your business requirements.
Instance specification
Card type
vGPU memory (MB)
vGPU computing power (card)
vCPU (core)
Memory size (MB)
fc.gpu.tesla.1
Tesla T4
Valid values: 1024 to 16384 (1 GB to 16 GB)
Note: The value must be a multiple of 1024.
The value is calculated based on the following formula: vGPU computing power = vGPU memory (GB)/16. For example, if you set the vGPU memory to 5 GB, the maximum vGPU computing power is 5/16.
Note: Computing resources are automatically allocated by Function Compute. You do not need to manually allocate computing resources.
Valid values: 0.05 to the value of [vGPU memory (GB)/2].
Note: The value must be a multiple of 0.05. For more information, see GPU specifications.
Valid values: 128 to the value of [vGPU memory (GB) x 2048].
Note: The value must be a multiple of 64. For more information, see GPU specifications.
fc.gpu.ampere.1
Ampere A10
Valid values: 1024 to 24576 (1 GB to 24 GB)
Note: The value must be a multiple of 1024.
The value is calculated based on the following formula: vGPU computing power = vGPU memory (GB)/24. For example, if you set the vGPU memory to 5 GB, the maximum vGPU computing power is 5/24.
Note: Computing resources are automatically allocated by Function Compute. You do not need to manually allocate computing resources.
Valid values: 0.05 to the value of [vGPU memory (GB)/3].
Note: The value must be a multiple of 0.05. For more information, see GPU specifications.
Valid values: 128 to the value of [vGPU memory (GB) x 4096)/3].
Note: The value must be a multiple of 64. For more information, see GPU specifications.
The GPU-accelerated instances of Function Compute also support the following resource specifications.
Image size (GB)
Maximum function execution duration (seconds)
Maximum disk size (GB)
Maximum bandwidth (Gbit/s)
Container Registry Enterprise Edition (Standard Edition): 10
Container Registry Enterprise Edition (Advanced Edition): 10
Container Registry Enterprise Edition (Basic Edition): 10
Container Registry Personal Edition (free): 10
86400
10
5
NoteSpecifying the instance type as g1 achieves the same effect as selecting the fc.gpu.tesla.1 instance specification.
GPU-accelerated instances of the T4 type are supported in the following regions: China (Hangzhou), China (Shanghai), China (Beijing), China (Zhangjiakou), China (Shenzhen), Japan (Tokyo), US (Virginia), and Singapore.
GPU-accelerated instances of the A10 type are supported in the following regions: China (Hangzhou), China (Shanghai), Japan (Tokyo), and Singapore.
GPU specifications
Usage notes
If you want to reduce the cold start duration or improve resource utilization, you can use the following solutions:
Provisioned mode: the ideal solution to resolve the cold start issue. In this mode, you can reserve a fixed number of instances based on your resource budget, reserve resources for a specific period of time based on business fluctuation, or select an auto scaling policy based on usage thresholds. After the provisioned mode is used, the average cold start latency of instances is reduced.
High concurrency for a single instance: the ideal solution to improve resource utilization of instances. We recommend that you configure a high concurrency for instances based on the resource demands of your business. If you use this solution, the CPU and memory are preemptively shared when multiple tasks are executed on one instance at the same time. This way, resource utilization is improved.
Usage modes
GPU-accelerated instances and elastic instances support the following usage modes.
On-demand mode
In on-demand mode, Function Compute automatically allocates and releases instances for functions. In this mode, the billed execution duration starts from the time when a request is sent to execute a function and ends at the time when the request is completely executed. An on-demand instance can process one or more requests at a time. For more information, see Configure instance concurrency.
Execution duration of functions by a single instance that processes a single request at a time
When an on-demand instance processes a single request, the billed execution duration starts from the time when the request arrives at the instance and ends at the time when the request is completely executed.
Execution duration of functions by a single instance that concurrently processes multiple requests at a time
If you use an on-demand instance to concurrently process multiple requests, the billed execution duration starts from the time when the first request arrives at the instance and ends at the time when the last request is completely executed. You can reuse resources to concurrently process multiple requests. This way, resource costs can be reduced.
Provisioned mode
In provisioned mode, function instances are allocated, released, and managed by yourself. For more information, see Configure provisioned instances and auto scaling rules. In provisioned mode, the billed execution duration starts from the time when Function Compute starts a provisioned instance and ends at the time when you release the instance. You are charged for the instance until you release the instance, regardless of whether the provisioned instance executes requests.
Additional information
For information about the billing methods of Function Compute, see Billing overview.
For information about how to use SDKs to configure and change the instance type of a function, see Specify the instance type.
For information about how to specify the type and specifications of an instance in the Function Compute console, see Manage functions.