To select an instance type, you must know the key features of each instance type. Knowing the features of each instance type allows you to select a variety of instance types to manage scenarios such as insufficient resources, instance families phase-out, and the use of preemptible instances and take full advantages of the elasticity and flexibility of ECS.

This topic describes how to select enterprise-level instance families, instead of entry-level instance families (also called shared instance families). For more information about the selection of entry-level instance families, see Overview.

Learn instance families

When you create an ECS instance, you want to select the most cost-effective and stable instance type to suit your performance, prices, and workload needs. Alibaba Cloud provides a variety of instance families suited for different business scenarios with different specifications of vCPUs, memory, network performance, and throughput. An instance family is further divided into multiple instance types. Instance family names are in the ecs. <Instance family> format, and instance type names are in the ecs. <Instance family>.<nx>large format.
  • ecs: the product code of ECS.
  • <Instance family>: consists of lowercase letters and digits.
    • Lowercase letters are abbreviations of the performance field of the instance family. Some of the abbreviations are described as follows:
      • c: compute optimized (computational)
      • g: general purpose (general)
      • r: memory optimized (ram)
      • ne: enhanced network performance (network enhanced)
    • Digits identify the release dates of instance types within an instance family. A larger digit represents a newer generation of the instance family and is cheaper, more effective, and has higher performance.
  • <nx>large: the number of vCPUs of the instance type. The larger the digit n is, the more vCPUs the instance type has.
For example, ecs.g6.2xlarge represents an instance type that belongs to the general purpose instance family g6 and has eight vCPUs. g6 is a newer-generation instance family than g5, g4, and sn2ne.

Select instance types

You can use one of the following methods to view details about instance families and types to select an appropriate instance type:
  • Instance families: See this topic to learn details about instance families without logging on with an Alibaba Cloud account.
  • DescribeInstanceTypes: Call this API operation to obtain the latest performance specifications of instance types. You must log on with an Alibaba Cloud account to perform this operation.
    aliyun ecs DescribeInstanceTypes --InstanceTypeFamily ecs.g6
  • Pricing: View the pricing information, latest special offers, and the estimated cost on the pricing page.
  • Custom Launch: Learn more about instance purchase instructions in the Instance Type section of the Basic Configurations step.

Select instance families based on scenarios

The following figure shows certain ECS instance families and the business scenarios for which they are suited.Compute optimized instance families

Select instance families based on applications

If you are using software or applications similar to those in the following figure, select corresponding instance families from the right side of the picture.Select instances based on workloads

Select instance families based on user-created services

If you are using user-created services, select corresponding instance families based on your services and the selection principles.

Application type Common application Selection principle Recommended instance family
Load balancing NGINX Connections can be frequently established.
  • CPU computing power: high.
  • Memory: not high.
Instance families: c6 and hfc6
RPC
  • SOFA
  • Dubbo
A huge amount of memory is available for network connection-intensive workloads. Instance families: g6
Cache
  • Redis
  • Memcache
  • Solo
  • CPU computing power: not high.
  • Memory: high.
  • Instance families: r6 and re6
  • Block Storage: standard SSDs or enhanced SSDs (ESSDs)
Configuration center ZooKeeper A large number of I/O operations generated when applications initiate negotiations can be handled.
  • CPU computing power: not high.
  • Memory: not high.
  • Instance families: c6
  • Block Storage: standard SSDs or enhanced SSDs
Message queues
  • Kafka
  • RabbitMQ
Disks are preferred for the purpose of message integrity.
  • CPU computing power: not high.
  • vCPU-to-memory ratio: 1:1.
  • Storage: not high.
  • Instance families: c6
  • Block Storage: standard SSDs or enhanced SSDs
Container orchestration Kubernetes The X-Dragon architecture and containers are combined to maximize computing power. Instance families: ebmc6 and ebmg6
Large table storage HBase
  • Typically, d series instance families are suitable.
  • If your business requires ultra-high IOPS, you can select i series instance families.
  • Instance families: d1, d1ne, and d2s
  • i2
Database
  • MySQL
  • NoSQL
  • If your business requires scalable storage, you can select enhanced SSDs.
  • If your business is I/O-sensitive, i series instance families are preferred.
  • Instance families: c6, g6, and r6

    Block Storage: enhanced SSDs

  • i2
SQLServer
  • Windows features single-channel I/O configuration while high I/O capabilities are required. Therefore, enhanced SSDs are recommended.
  • The logical and physical sectors of ECS instances are set to 4 KB in size.
  • Instance families: c6, g6, and r6
  • Block Storage: enhanced SSDs
Text search Elasticsearch
  • Instance types that have high vCPU-to-memory ratios are recommended.
  • I/O capabilities can meet the requirements for exporting database data in the .es format.
  • Instance families: g6

    Block Storage: enhanced SSDs

  • d1, d1ne, and d2s
Real-time computing
  • Flink
  • Blink
You can select general purpose ECS instances attached with disks or select d series instances. d1, d1ne, and d2s
Offline computing
  • Hadoop
  • HDFS
  • CDH
d series instance families are preferred. d1, d1ne, and d2s

Recommended instance families for scenarios such as common scenarios, game servers, and live streaming

These scenarios are CPU-compute intensive. We recommend that you select an instance type with a relatively balanced CPU-to-memory ratio, typically 1:2, use an ultra disk as the system disk, and use standard SSDs or enhanced SSDs 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 the packet forwarding rate.
Scenario category Specific scenario Recommended instance family Performance requirement CPU-to-memory ratio
Common scenarios Balanced performance applications and backend applications g series instance families, such as g6 Medium clock speed, compute-intensive 1:4
Applications with high packet forwarding rates g series instance families, such as g6 High packet forwarding rates, compute-intensive 1:4
High-performance computing c series instance families, such as c6 High clock speed, compute-intensive 1:2
Game applications High-performance client games c series instance families, such as c6 High clock speed 1:2
Mobile or web games g series instance families, such as g6 Medium clock speed 1:4
Live streaming applications Video forwarding g series instance families, such as g6 Medium clock speed, compute-intensive 1:4
On-screen video comments g series instance families, such as g6 High packet forwarding rates, compute-intensive 1:4

Recommended instance families for big data scenarios such as Hadoop, Spark, and Kafka

These scenarios have different performance requirements for each node. You must balance the performance of each node, including computing performance, storage throughput, and network performance.
  • Management nodes: Select an instance family in the same manner as you would in common scenarios. For more information, see the Recommended instance families for scenarios such as common scenarios, game servers, and live streaming section.
  • Compute nodes: Select an instance family in the same manner as you would in common scenarios. For more information, see the Recommended instance families for scenarios such as common scenarios, game servers, and live streaming section. You must select instance types based on the cluster size. For example, you can select ecs.g6.4xlarge for clusters with less than 100 nodes and ecs.g6.8xlarge for clusters with more than 100 nodes.
    Note Compute nodes can be billed on preemptible instances to improve cost-effectiveness. For more information, see Overview.
  • 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 family. For example, you can select ecs.d1ne.6xlarge for MapReduce and Hive, or ecs.d1ne.8xlarge for Spark and MLib.
Select instance families from big data instance families

Recommended instance families for scenarios such as databases, caches, and search scenarios

Typically, these scenarios require that the CPU-to-memory ratio is greater than 1:4. Some software in these scenarios is sensitive to latency and storage I/O capabilities. We recommend that you select instance families whose unit price of memory is more reasonable.
Scenario category Specific scenario Recommended instance family CPU-to-memory ratio Data disk
Relational databases High performance and dependent on high availability in 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 with CPU-to-memory ratios of 1:4 1:4 Ultra disks and standard SSDs
High-performance databases r series instance families 1:8 Ultra disks and standard SSDs
Distributed caches Medium memory usage scenarios g series instance families, or other instance families with CPU-to-memory ratios of 1:4 1:4 Ultra disks and standard SSDs
High memory usage scenarios r series instance families 1:8 Ultra disks and standard SSDs
NoSQL databases High performance and high availability in 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 with CPU-to-memory ratios of 1:4 1:4 Ultra disks and standard SSDs
High-performance databases r series instance families 1:8 Ultra disks and standard SSDs
ElasticSearch Small clusters that depend on disks to ensure high data availability g series instance families, or other instance families with CPU-to-memory ratios of 1:4 1:4 Ultra disks and standard SSDs
Large clusters and dependent on high availability in the application layer d series instance families 1:4 Local SSDs, ultra disks, and standard SSDs
Take databases as an example. Traditionally, business systems directly connect to online transaction processing (OLTP) databases and data redundancy is mainly achieved by RAID. However, if you use ECS provided by Alibaba Cloud, you can flexibly deploy both lightly and heavily loaded databases.
  • Lightly loaded databases: use enterprise-level instance families with disks, which are more cost-effective.
  • Heavily load databases: require high storage IOPS and low read/write latency. We recommend that you use i series instance families with local SSDs. The local SSDs are high I/O NVMe SSDs that can meet the requirements of large heavily-loaded databases.
Select instance families based on databases

Recommended instance families for scenarios such as deep learning and image processing

In these scenarios, applications require high-performance GPU accelerators. The following section describes recommendations for the GPU-to-CPU ratio:

  • Deep learning training: The recommended GPU-to-CPU ratio is 1:8 to 1:12.
  • General-purpose deep learning: The recommended GPU-to-CPU ratio is 1:4 to 1:48.
  • Image recognition and reasoning: The recommended GPU-to-CPU ratio is 1:4 to 1:12.
  • Speech recognition and synthesis reasoning: The recommended GPU-to-CPU ratio is 1:16 to 1:48.

Check and adjust your selection

After you select an instance type and start using the instance, we recommend that you check whether the instance type is suitable based on the performance monitoring information.

If you select the ecs.g6.xlarge instance type and find that the CPU utilization 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 to another instance family with a more suitable CPU-to-memory ratio. For more information, see the following topics:

For scenarios such as insufficient resources, instance families phase-out, change of the current instance family to a more cost-effective one, you can upgrade or downgrade the instance configurations based on the instance family features. The following table lists some recommendations for instance configuration changes. For more information, see Overview of instance upgrade and downgrade and Instance type changes.

Current instance families Preferred target instance family Alternative target instance family
sn1 and sn2
  • c6
  • g6
  • r6
  • c5 and sn1ne
  • g5 and sn2ne
  • r5 and se1ne
c4 hfc6 and c6 hfc5 and c5
ce4 r6 r5 and se1ne
cm4 hfc6 hfc5 and g5
n1, n2, and e3
  • c6
  • g6
  • r6
  • c5 and sn1ne
  • g5 and sn2ne
  • r5 and se1ne
  • t1
  • s1, s2, and s3
  • m1 and m2
  • c1 and c2
  • c6
  • g6
  • r6
  • c5 and sn1ne
  • g5 and sn2ne
  • r5 and se1ne

References

For more information about application scenarios, see Selection of enterprise-level instance types.