All Products
Search
Document Center

Elastic Compute Service:Best practices for selecting instance types

Last Updated:Oct 27, 2023

Before you select an Elastic Compute Service (ECS) instance type, you must understand the key features of each instance type. Then, in the case of insufficient resources, instance families retirement, and the use of preemptible instances, you can select a variety of instance types to 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 information about how to select entry-level instance families, see Shared instance families or Overview.

Learn about instance families

Before you create an instance, you must select a cost-effective and stable instance type that is suitable for your requirements based on performance, price, and workload. ECS provides various instance families that are suitable for different business scenarios. Each instance family consists of multiple instance types. Instance types comprise varying combinations of compute, memory, network, and storage capacity and allow you to choose an appropriate mix of resources for your applications.

Each instance family name is in the ecs.<Instance family> format. Each instance type name is in the ecs.<Instance family>.<nx>large format.

  • ecs: is the product code of ECS.

  • <Instance family>: consists of an instance family name body and an instance family name suffix.

    Note

    The following tables describe the names of common instance types in instance families.

    • x86-based computing instance families and ARM-based computing instance families

      Element

      Description

      Meaning

      Instance family name body

      Consists of lowercase letters and a number.

      • Lowercase letters: are an abbreviation that indicates the performance characteristics of the instance family.

      • The number: indicates the generation to which the instance family belongs.

        A larger number indicates a newer generation of instance families that are more cost-effective and deliver higher performance.

      • c: compute-optimized

      • g: general-purpose

      • r: memory-optimized

      • re: memory-enhanced or high memory

      • hf, hc, hg, and hr: high clock speeds (or high frequency)

      • i: local SSDs

      • d: big data

      • s: shared

      • t: burstable

      For example, ecs.g6.2xlarge is an instance type that belongs to the g6 general-purpose instance family and has eight vCPUs. g6 is a newer-generation instance family than g5.

      Instance family name suffix

      Consists of lowercase letters.

      • ae: performance-enhanced

      • re: RDMA-enhanced

      • se: storage-enhanced

      • ne: network-enhanced

      • t: security-enhanced

      • p: persistent memory-optimized

    • Heterogeneous computing instance families, ECS Bare Metal Instance families, and Super Computing Cluster (SCC) instance families

      Heterogeneous computing instance families, ECS Bare Metal Instance families, and SCC instance families are named based on in-house naming conventions. Each instance family name consists of lowercase letters and a number.

      Element

      Description

      Meaning

      Instance family name body

      Consists of lowercase letters.

      • gn: NVIDIA GPU-accelerated compute-optimized

      • vgn: NVIDIA GRID vGPU-accelerated dedicated

      • sgn: NVIDIA GRID vGPU-accelerated shared

      • gi: Intel GPU-accelerated compute-optimized

      • f: FPGA-accelerated compute-optimized

      • ebmc, ebmg, ebmr, ebmgn, and ebmhf: ECS Bare Metal Instance

      • sccc, sccg, scch, sccgn, and scchf: SCC

      Instance family name suffix

      Consists of lowercase letters and a number or only a number.

      • 6v: 6 indicates the Volta or Turing architecture, and v indicates V100 GPUs with 16 GB of memory each.

        For example, gn6v is a compute-optimized instance family that is powered by NVIDIA V100 GPUs with 16 GB of memory each based on the Volta or Turing architecture.

      • 6e: 6 indicates the Volta or Turing architecture, and e, which is short for extend, indicates second-generation V100 GPUs with 32 GB of memory each.

        For example, gn6e is a compute-optimized instance family that is powered by NVIDIA V100 GPUs with 32 GB of memory each based on the Volta or Turing architecture.

      • 6i: 6 indicates the Volta or Turing architecture, and i indicates T4 GPUs.

        For example, gn6i is a compute-optimized instance family that is powered by NVIDIA T4 GPUs based on the Volta or Turing architecture.

      • 6s: 6 indicates the Volta or Turing architecture, and s indicates sixth-generation SG-1.

        For example, ebmgi6s is a visual computing instance family that is powered by Intel® Server GPUs and sixth-generation SG-1.

      • 7: indicates the Ampere architecture.

      • 7i: 7 indicates the Ampere architecture, and i, which is short for inference, indicates A10 GPUs with 24 GB of memory each.

      • 7e: 7 indicates the Ampere architecture.

      • 7s: 7 indicates the Ampere architecture, and s indicates seventh-generation A30 GPUs.

  • <nx>large: is an indicator of the number of vCPUs of the instance type. A larger value of n in<nx> indicates a larger number of vCPUs of the instance type. For example, xlarge indicates four vCPUs, 2xlarge indicates eight vCPUs, and 3xlarge indicates 12 vCPUs.

Select instance types

You can use one of the following methods to view details about instance families and instance types to select an appropriate instance type:

  • Instance families: See this topic to learn details of instance families without logging on with an Alibaba Cloud account.

  • DescribeInstanceTypes: Call this API operation to obtain the most recent performance specifications of instance types. To call the operation, log on with an Alibaba Cloud account.

    aliyun ecs DescribeInstanceTypes --InstanceTypeFamily ecs.g6
  • Pricing tab of the ECS product page: Access this tab to view the pricing information and most recent special offers and estimate your costs.

Select instance families based on scenarios

The following figure shows some ECS general purpose computing instance families and the business scenarios to which they are suited. Compute optimized instance families

The following figure shows some ECS heterogeneous computing instance families and the business scenarios to which they are suited. hetero-computing

Select instance families based on applications

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

Select instance families based on user-defined services

If you are using user-defined services, select 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.

  • Amount of memory: not large.

c6e, hfc7, and g5ne

RPC

  • SOFA

  • Dubbo

A large amount of memory is available for network connection-intensive workloads.

g6e, g6, g6a, and g7a

Cache

  • Redis

  • Memcache

  • Solo

  • CPU computing power: moderate.

  • Amount of memory: large.

  • r6e, re6, re6p, re7p, and r7p

  • Elastic Block Storage: standard SSDs or enhanced SSDs (ESSDs)

Configuration Center

ZooKeeper

Able to handle a large number of I/O operations generated when applications initiate negotiations.

  • CPU computing power: moderate.

  • Amount of memory: not large.

  • c6e, c6, c6a, and c7a

  • Elastic Block Storage: standard SSDs or enhanced SSDs (ESSDs)

Message queues

  • Kafka

  • RabbitMQ

Cloud disks are preferred for message integrity.

  • CPU computing power: moderate.

  • vCPU-to-memory ratio: 1:1.

  • Storage: not high.

  • c6e, c6, c6a, and c7a

  • Elastic Block Storage: standard SSDs or enhanced SSDs (ESSDs)

Container orchestration

Kubernetes

The 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

  • Typically, d series instance families are suitable.

  • If your business requires ultra-high IOPS, you can select i series instance families.

  • d2c and d2s

  • i3

Databases

  • MySQL

  • NoSQL

  • If your business requires scalable storage, you can select ESSDs.

  • If your business is I/O-sensitive, i series instance families are recommended.

  • c6e, g6e, and r6e

    Elastic Block Storage: ESSDs

  • i3 and i4p

SQLServer

  • Windows provides single-channel I/O configuration while high I/O capabilities are required. ESSDs are recommended.

  • The logical and physical sectors of ECS instances are set to 4 KB in size.

  • c6e, g6e, and r6e

  • Elastic Block Storage: ESSDs

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.

  • g6e, g6, g6a, and g7a

    Elastic Block Storage: ESSDs

  • d2c and d2s

Real-time computing

  • Flink

  • Blink

You can select general purpose instance families and cloud disks or select d series instance families.

d2c and d2s

Offline computing

  • Hadoop

  • HDFS

  • CDH

d series instance families are recommended.

d2c and d2s

Instance families that are recommended for general-purpose applications, gaming applications, 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 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 the packet forwarding rates.

Scenario category

Scenario

Recommended instance family

Performance requirement

CPU-to-memory ratio

Common scenarios

Balanced performance applications and backend applications

g series instance families, such as g6e

Medium clock speed, compute-intensive

1:4

Applications with high packet forwarding rates

g series instance families, such as g6e

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

Game 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 g6e

Medium clock speed, compute-intensive

1:4

On-screen video comments

g series instance families, such as g6e

High packet forwarding rate, compute-intensive

1:4

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

In these scenarios, the performance requirements are not the same for each node. You must balance the performance of each node, including the computing performance, storage throughput, and network performance.

Select instance families from big data instance families

Recommended instance families for databases, caches, and search scenarios

Typically, these scenarios require CPU-to-memory ratios 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 memory is cost-effective.

Scenario category

Scenario

Recommended instance family

CPU-to-memory ratio

Data disk

Relational database services

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 that have a CPU-to-memory ratio 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 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 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 that have a CPU-to-memory ratio 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 rely on 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

Take databases as an example. Traditionally, business systems directly connect to online transaction processing (OLTP) databases and data redundancy is implemented by RAIDs. However, you can use ECS provided by Alibaba Cloud to flexibly deploy both lightly and heavily loaded databases.

  • Lightly loaded databases: use enterprise-level 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 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 GPU-to-CPU ratios are recommended for different scenarios:

  • Deep learning training: A GPU-to-CPU ratio that ranges from 1:8 to 1:12 is recommended.

  • General-purpose deep learning: A GPU-to-CPU ratio that ranges from 1:4 to 1:48 is recommended.

  • Image recognition and inference: A GPU-to-CPU ratio that ranges from 1:4 to 1:12 is recommended.

  • Speech recognition and synthesis inference: A GPU-to-CPU ratio that ranges from 1:16 to 1:48 is recommended.

The following figure shows the GPU- and FPGA-accelerated instance families recommended for common AI and image or video processing scenarios. Select GPU- and FPGA-accelerated instance families

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 its actual performance information.

Assume that you select the ecs.g6e.xlarge instance type. If you 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 an instance type that has a more suitable CPU-to-memory ratio within another instance family. For more information, see the following topics:

For scenarios such as insufficient resources, retirement of instance families, changing to a more cost-effective instance family, or upgrading of instance configurations, you can change the instance configurations based on instance family features. For more information, see Overview of instance configuration changes and Instance families that support instance type changes.