Before you purchase Elastic Compute Service (ECS) instances, you must select a cost-effective and stable instance type based on your performance, price, and workload requirements. This topic describes how to select Alibaba Cloud ECS instance types based on your actual business scenarios.
Learn about instance families
Before you select an instance type, read the following topics:
Classification and naming of instance types: describes the classification of instance families and naming conventions of instance types.
Overview of instance families: describes the instance families that are available for purchase.
Use scenarios of instance families
Enterprise-level instance families
Heterogeneous computing instance families
Select instance families based on pre-installed applications
Select instance families based on the pre-installed applications on instances.
Application type | Common application | Selection principle | Recommended instance family |
Load balancing | Nginx | Select instance families that support frequent establishment of connections.
| c8i, c7, c7nex, and g5ne |
Remote Procedure Call (RPC) |
| Select instance families that can provide a large amount of memory for network connection-intensive workloads. | g8a, g7nex, g8i, and g7 |
Caching |
|
| r8i, r8a, r7, and r7a |
Configuration center | ZooKeeper | Select instance families that can handle a large number of I/O operations generated when applications initiate negotiations.
| c8a, c7, c8i, and u1 |
Message queues |
| Cloud disks are preferred to ensure message integrity.
| c8a, c7, c8i, and u1 |
Container orchestration | Kubernetes | ECS bare metal instances and containers are combined to maximize computing power. | ebmc6e, ebmg6e, ebmc6, ebmg6, ebmc6a, ebmc7a, ebmg6a, and ebmg7a |
Large table storage | HBase |
| d3c, d3s, and i4 |
Database |
|
| g8a, g7, g8i, and i4 |
SQLServer |
| g8a, g7, r7, r8i, and g8i | |
Text search | Elasticsearch |
| i4, i4r, i3, and i2 |
Real-time computing |
| Select general-purpose instance families and cloud disks based on the storage capacity or select d series instance families. | i4g, i4, and d3c |
Offline computing |
| Select d series instance families. | d3s and d3c |
Video transcoding |
|
| c8y |
Big data |
|
| g8y and r8y |
Select instance families based on segmented business scenarios
Instance families that are recommended for general-purpose applications, gaming applications, and live streaming
For CPU compute-intensive scenarios, such as general-purpose applications, gaming applications, and live streaming, we recommend that you select an instance type with a balanced CPU-to-memory ratio, such as 1:2, and use ESSDs as system disks and data disks. For scenarios that require higher network performance such as on-screen video comments, select a high-specification instance type to improve packet forwarding rates.
Scenario category | Scenario | Recommended instance family | Performance requirement | CPU-to-memory ratio |
General-purpose applications | Balanced performance applications and backend applications | g series instance families, such as g7 | Medium clock speeds and compute-intensive | 1:4 |
Applications that have high packet forwarding rates | g series instance families, such as g7 | High packet forwarding rates and compute-intensive | 1:4 | |
High-performance computing | hfc series instance families, such as hfc7 | High clock speeds and compute-intensive | 1:2 | |
Gaming applications | High-performance client games | hfc series instance families, such as hfc7 | High clock speeds | 1:2 |
Mobile or web games | g series instance families, such as g6e | Medium clock speeds | 1:4 | |
Live streaming | Video forwarding | g series instance families, such as g7 | Medium clock speeds and compute-intensive | 1:4 |
On-screen video comments | g series instance families, such as g7 | High packet forwarding rates and compute-intensive | 1:4 |
Recommended instance families for big data scenarios, such as Hadoop, Spark, and Kafka
In big data scenarios, such as Hadoop, Spark, and Kafka, each node has different performance requirements. You must balance the performance of all nodes, including the computing performance, storage throughput, and network performance.
Management nodes: Select an instance family in the same manner that you select an instance family in general-purpose scenarios. We recommend that you select g series instance families.
Compute nodes: Select an instance family in the same manner that you select an instance family in general-purpose scenarios. We recommend that you select g series instance families. Select instance types based on the cluster size. For example, you can select ecs.g7.4xlarge for a cluster that consists of less than 100 nodes and ecs.g7.8xlarge for a cluster that consists of 100 or more nodes.
Cache nodes: used to store hot data or deploy Really Simple Syndication (RSS). These nodes require high disk and network I/O performance. We recommend that you select the i4g or i2g instance family.
Compute and cache nodes: used to compute and cache data. When you select an instance family, consider the computing performance, I/O performance, and disk capacity. We recommend that you select the i4, i4r, or d3c instance family.
NoteYou can use preemptible instances as compute nodes to improve cost-effectiveness. For more information, see What are preemptible instances?
Data nodes: require high storage throughput, high network throughput, and balanced CPU-to-memory ratios. We recommend that you use d series big data instance families. For example, you can select ecs.d2s.5xlarge and ecs.d3s.4xlarge for MapReduce and Hive and ecs.d2s.10xlarge for Spark and MLib.
Recommended instance families for databases, caches, and search scenarios
In most cases, the databases, caches, and search scenarios require CPU-to-memory ratios higher than 1:4. Specific software in the scenarios is sensitive to latency and storage I/O capabilities. We recommend that you select instance families that provide cost-effective memory.
Scenario category | Scenario | Recommended instance family | CPU-to-memory ratio | Data disk |
Relational databases | High performance and high availability at the application layer | i series instance families | 1:4 | Local SSDs, ultra disks, and standard SSDs |
Small and medium-sized databases | g series instance families or other instance families that have a CPU-to-memory ratio of 1:4 | 1:4 | Ultra disks and standard SSDs | |
High-performance databases | i series and r series instance families | 1:8 | Ultra disks and standard SSDs | |
Distributed cache | Medium memory usage | g series instance families or other instance families that have a CPU-to-memory ratio of 1:4 | 1:4 | Ultra disks and standard SSDs |
High memory usage | r series and i series instance families | 1:8 | Ultra disks and standard SSDs | |
NoSQL databases | High performance and high availability at the application layer | i series instance families | 1:4 | Local SSDs, ultra disks, and standard SSDs |
Small and medium-sized databases | g series instance families or other instance families that have a CPU-to-memory ratio of 1:4 | 1:4 | Ultra disks and standard SSDs | |
High-performance databases | i4 and i4r instance families | 1:8 | Ultra disks, standard SSDs, and local SSDs | |
ElasticSearch | Small clusters that rely on cloud disks to ensure high data availability | g series instance families or other instance families that have a CPU-to-memory ratio of 1:4 | 1:4 | Ultra disks and standard SSDs |
Large clusters that require high availability | d series instance families | 1:4 | Local SSDs, ultra disks, and standard SSDs |
This section uses databases as an example. In normal cases, business systems directly connect to OLTP databases, and data redundancy is implemented by RAIDs. However, you can use Alibaba Cloud ECS to flexibly deploy lightly and heavily loaded databases.
For lightly loaded databases, use i4r and i4g instance families with cloud disks, which are more cost-effective.
Heavily loaded databases require high storage IOPS and low read/write latency. We recommend that you use i series instance families equipped with local SSDs. The local SSDs are high I/O Non-Volatile Memory Express (NVMe) SSDs that can meet the requirements of large heavily loaded databases.
Recommended instance families for scenarios such as deep learning and image processing
In scenarios such as deep learning and image processing, applications require high-performance GPU accelerators. We recommend that you use instance families that have the following GPU-to-CPU ratios in different scenarios:
Deep learning training: a GPU-to-CPU ratio in the range of 1:8 to 1:12
General-purpose deep learning: a GPU-to-CPU ratio in the range of 1:4 to 1:48
Image recognition and inference: a GPU-to-CPU ratio in the range of 1:4 to 1:12
Speech recognition and synthesis inference: a GPU-to-CPU ratio in the range of 1:16 to 1:48
The following figure shows the GPU-accelerated and FPGA-accelerated instance families recommended for common AI and image or video processing scenarios.
Check and adjust your selection
After you create an instance of the selected instance type and start using the instance, we recommend that you check whether the instance type is suitable based on the performance monitoring data of the instance.
If you select the ecs.g8i.xlarge instance type to create an instance and find that the CPU utilization of the instance is low, we recommend that you check whether the memory usage of the instance is high by using one of the following methods:
If the memory usage of the instance is high, you can change the instance to an instance type that has a more suitable CPU-to-memory ratio. For more information, see the following topics: