ECS instance type selection

Updated at:

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:

  1. Instance type categorization and naming: describes the classification of instance families and naming conventions of instance types.

  2. Instance family overview: describes the instance families that are available for purchase.

Use scenarios of instance families

Enterprise-level instance families

image

Heterogeneous computing instance families

image

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.

  • CPU computing power: high.

  • Amount of memory: moderate.

c9i, c9ae, c8i, c7, c7nex, g5ne

Remote Procedure Call (RPC)

  • SOFA

  • Dubbo

Select instance families that can provide a large amount of memory for network connection-intensive workloads.

g9i, g9ae, g8a, g7nex, g8i,g7

Caching

  • Redis

  • Memcache

  • Solo

  • CPU computing power: moderate.

  • Amount of memory: large.

r9i, r9ae, r8i, r8a, r7, r7a

Configuration center

ZooKeeper

Select instance families that can handle a large number of I/O operations generated when applications initiate negotiations.

  • CPU computing power: moderate.

  • Amount of memory: moderate.

c9i, c9ae, c8a, c7, c8i, u2a

Message queues

  • Kafka

  • RabbitMQ

Cloud disks are preferred to ensure message integrity.

  • CPU computing power: moderate.

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

  • Storage: moderate.

c9ae, c8a, c7, c8i, u1

Container orchestration

Kubernetes

ECS bare metal instances and containers are combined to maximize computing power.

ebmc9i, ebmg9i, ebmc9ae, ebmg9ae, ebmc7a, ebmg7a

Large table storage

HBase

  • In most cases, you can select d series instance families.

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

d3c, d3s, and i5

Database

  • MySQL

  • NoSQL

  • If your business requires scalable storage, select instance families with Enterprise SSDs (ESSDs).

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

g9i, r9i, g9ae, r9ae, g8a, g7, g8i, i5

SQLServer

  • Windows provides single-channel I/O configuration. Therefore, high I/O capabilities are required. In this case, select instance families with ESSDs.

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

g9i, r9i, g9ae, r9ae, g8a, g8i, r8i, g7, r7

Text search

Elasticsearch

  • Select instance types that have high memory-to-vCPU ratios.

  • I/O capabilities can meet the requirements for exporting database data in the .es format.

i4, i4r, i3, and i2

Real-time computing

  • Flink

  • Blink

Select general-purpose instance families and cloud disks based on the storage capacity or select d series instance families.

i5g, i4g, i4, d3c

Offline computing

  • Hadoop

  • HDFS

  • CDH

Select d series instance families.

d3s and d3c

Video transcoding

  • Video-on-demand (VOD)

  • Live streaming

  • CPU computing power: high.

  • Amount of memory: moderate.

  • Number of I/O operations: moderate.

c9i, c9ae, hfc9i, c8y, hfc8i

Big data

  • Spark

  • Hive

  • CPU computing power: high.

  • Bandwidth of memory: high.

  • Bandwidth of storage for I/O operations: high.

g9ae, r9ae, g8y, r8y

High-performance computing

EDA (Electronic Design Automation),

  • For workloads such as chip design and simulation-based verification, prioritize single-core CPU performance, cache performance, and memory access efficiency.

  • Configure memory based on the design scale and EDA tool requirements, balancing task execution efficiency and software licensing costs.

hpc9a, hpc7ip

CAE (Computer-Aided Engineering)

  • For simulations in areas such as fluid mechanics and structural mechanics, prioritize floating-point performance and memory bandwidth.

  • For multi-node parallel simulations, use a low-latency, high-bandwidth network to reduce communication overhead betweenodes.

hpc8ae, hpc8i

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

Medium clock speeds and compute-intensive

1:4

Applications that have high packet forwarding rates

g series instance families

High packet forwarding rates and compute-intensive

1:4

High-performance computing

hfc series instance families

High clock speeds and compute-intensive

1:2

Gaming applications

High-performance client games

hfc series instance families,

High clock speeds

1:2

Mobile or web games

g series instance families

Medium clock speeds

1:4

Live streaming

Video forwarding

g series instance families

Medium clock speeds and compute-intensive

1:4

On-screen video comments

g series instance families

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.

    Note

    You can use spot instances as compute nodes to improve cost-effectiveness. For more information, see What is spot instance?

  • 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.

image

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

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 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: