Before you purchase Elastic Compute Service (ECS) instances, you must select a cost-effective and stable instance type based on your requirements for performance, price, and workload. This topic describes how to select Alibaba Cloud ECS instance types based on your actual business scenarios.
Learn about instance families
Available instance types: For more information, see Overview of instance families.
Categories of instance families:
Enterprise-level instance families, shared instance families, ECS Bare Metal Instance families, high-performance computing instance families, and heterogeneous computing instance families
Naming conventions for instance types
Instance families that support instance type changes: For more information, see Instance types and families that support instance type changes.
Available instance types in each region: The available instance families and types vary based on the region. You can go to the Instance Types Available for Each Region page to view the available instance types in each region.
Use scenarios of instance families
Enterprise-level instance families
Heterogeneous computing instance families
Select instance families based on pre-installed software
Select instance families based on your applications and the selection principles.
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 |
Cache |
|
| 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 for 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 |
Databases |
|
| 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 |
| d series instance families are preferred. | 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
The scenarios are CPU compute-intensive. We recommend that you select an instance type with a balanced CPU-to-memory ratio such as 1:2, use an ultra disk as the system disk, and use standard SSDs or ESSDs as data disks. For scenarios that require higher network performance such as on-screen video comments, you can select an instance type with higher specifications 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 speed, compute-intensive | 1:4 |
Applications with high packet forwarding rates | g series instance families, such as g7 | High packet forwarding rate, compute-intensive | 1:4 | |
High-performance computing | hfc series instance families, such as hfc7 | High clock speed, compute-intensive | 1:2 | |
Gaming applications | High-performance client games | hfc series instance families, such as hfc7 | High clock speed | 1:2 |
Mobile or web games | g series instance families, such as g6e | Medium clock speed | 1:4 | |
Live streaming | Video forwarding | g series instance families, such as g7 | Medium clock speed, compute-intensive | 1:4 |
On-screen video comments | g series instance families, such as g7 | High packet forwarding rate, 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 each node, 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. For more information, see Select instance families based on segmented business scenarios.
Compute nodes: Select an instance family in the same manner that you select an instance family in general-purpose scenarios. For more information, see the Select instance families based on segmented business scenarios section in this topic. 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 nodes or more.
Cache nodes: are used to store hot data or deploy Really Simple Syndication (RSS) and require high disk and network I/O performance. We recommend that you select the i4g or i2g instance family.
Compute and cache nodes: are used for computing and data caching. 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.
NotePreemptible instances can be used 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 the 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 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 whose memory is cost-effective.
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. Traditionally, 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.
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 the scenarios, applications require high-performance GPU accelerators. We recommend that you use 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- 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 type and start to use 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 log on to the instance to check whether the memory usage is high. If the memory usage is high, you can change the instance type to an instance type that has a more suitable CPU-to-memory ratio from another instance family. For more information, see the following topics:
For scenarios such as insufficient resources, retirement of instance families, change to a more cost-effective instance family, or instance configuration upgrade, you can modify instance configurations based on instance family features. For more information, see Overview of instance configuration changes and Instance types and families that support instance type changes.