Choosing the Right ECS Instance through Benchmarking

简介: Performance benchmarking of ECS Instances with Phoronix Test Suite

Banner_Blog_19_11__ngular_bower_grunt_nodejs_Fix

By Ngoi Se Keng, Alibaba Cloud Tech Share Author and Alibaba Cloud MVP

Background

We are spoiled with choices when it comes to choosing a cloud compute instance. The luxury of having these choices also means that choosing the right instance is not an easy task. Apart from deciding the right cloud vendor, we also need to identify the appropriate instance's family type as well as right instance type. The considerations when choosing the right instance shall include (and not limited to) budget allocation, target workload behavior, service level agreement, regulatory, and compliance.

Generally, to decide on the right instance, we first need to understand the target workload behavior. For example, does the workload involve heavy calculation, or does it involve analysis of huge sets of historical data files? Obviously, domain knowledge and experience play a key role in understanding the workload behavior. If you lack experience regarding the target workload, talk to someone that have experience with it. In my opinion, experience is of remarkable importance in determining the workload behavior.

Most cloud providers provide different types of servers to cater for various scenarios. Table 1 shows the high level use cases of generic family types. For more details on Alibaba Cloud ECS family type, you may refer to this link.

table1

Table 1: Family Type and Use Cases

Once you've narrowed down to a particular family type, it's time to select the appropriate instance type that meets the minimum workload capacity. Usually, the capacity requirement could be derived from business requirements or is resulted from certain service level agreement. Again, it's our responsibility to figure it out. Figure 1 suggests a general flow on right instance selection.

1

Figure 1: Instance Selection Flowchart

1. Motivation

This post presents an approach that may be beneficial in the instance type selection process. In a nutshell, the suggested approach is to benchmark the selected instance type's performance with a benchmarking test suite – Phoronix. The article will subsequently propose a desired instance type based on the outcome of the said benchmarking activity. Please note that the configuration recommendations in this post is only for reference and may exclude other kinds of considerations like regulation, and cloud vendor's SLA. In reality, those considerations are vital in drawing conclusion on instance type selection as well. There are tons of good guidelines and discussions out there (such as my previous post ) that discusses on general considerations when choosing the right instance.

2. Benchmarking Environment Setup

For the purpose of discussion, we presumed that there is a request to prepare an on-cloud compute instance for running video clip transcoding services in Singapore region. In addition, we assumed that there is neither a reference system nor prior setup on such service for us to refer to.

In general, the high level requirements for a video clip transcoding service is as such:
The service would be served via Web API (web application) and transcoding task would be performed with open transcoding libraries like ffmpeg. The transcoded output would be available for download once it's ready and there is no need to store the transcoded output. In addition, the video size uploaded by user is limited to 50MB. The service would be running for a temporary period only, and hence, it would be better if there is no lock-in period for compute instance. At the same time, the service is running on best effort mode and there is no committed service duration for each transcoding request. Lastly, the maximum budget allocated for the compute instance shall not more than USD 250 per month (pretty reasonable, ya?).

Goal: Ultimately, we want a compute instance that fulfilled the
provided requirement with maximum cost efficiency!

3. Selecting the Right Instance

3.1. Family Type Selection

The presumed scenario is pretty straightforward (yes, I know), and obviously, the requirements for real-world applications would be much more complicated than that. Anyway, based on these requirements, we understand that the service (video transcoding) workload should be mainly CPU bound (I believe). Hence, we'll tentatively explore the instance type under the "CPU Optimized" family. By the way, it's possible to revisit/reconsider other family types if none of the instance type from this family type is within our budget.

Tentative Family Type: CPU Optimized

3.2 Instance Type Selection

Specifically for Alibaba Cloud Singapore region, there are numerous choices for instances type under "Compute Optimized" family, such as "se1", "cm4", "ce4", and "c4". To find out more details on each instance type, please visit this link. Table 2 shows the cost of relevant pay-as-you-go (on-demand) instance type with 100GB SSD storage. We decided on 100GB storage as there is no storage requirement in the workload and we would like to keep our cost low while enjoying reasonable IOPS. Refer to this link to find out more about storage performance.
table2

Table 2: Cost for Relevant Instance Type

Based on the monthly costs, there are two instance types, namely ecs.c4.xlarge and ecs.cm4.xlarge, that could be considered as our compute instance. Benchmarking would be carried out on the two mentioned instance types in order to figure out the best cost efficiency instance type. Besides, for comparison purpose, we'll also be benchmarking an instance type (ecs.n4.xlarge) from "General Purpose" family. The detail specifications of each instance type are shown in Table 3.

Benchmarked instance types: ecs.c4.xlarge, ecs.cm4.xlarge, ecs.n4.xlarge

table3

Table 3: Instance Type Specifications

3.3 Benchmarking Tool and Criteria

Benchmarking would be carried out on CPU, Memory, Storage, and Network Throughput. However, we shall place more emphasis on the benchmark result of CPU since the requested workload (video transcoding) is mainly CPU bound (hypothesized). As stated earlier, this post would rely on Phoronix Test Suite for benchmarking. Briefly, Phoronix Test Suite is an open-source benchmarking tool that widely used by industries to test server performance. For more details, you can visit this link.

The following test Profiles have been setup in Phoronix Test Suite for benchmarking activity:

table4

Table 4: Phoronix Test Profile

4. Benchmarking Result

The benchmarking result are shown in the following section. Alternatively, you may visit the complete result at this link. By the way, the setup step for Phoronix Test Suite is available under Appendix section.

4.1. CPU

The ecs.n4.xlarge (Yes, the General Purpose Type!) outperformed the other two instances type in most of the CPU test profiles. Particularly, for "pts/ffmpeg" test, it's 17.93% better than the worst performing instance (ecs.cm4.xlarge), which is a "Compute Optimized" instance that has the same number of cores. The benchmark result suggests that ecs.n4.xlarge is the most appealing instance type (cheapest and best performing so far) for our workload. Anyway, we'll hold our decision until we've verified the test profiles of other resources. Table 5 summarizes the CPU benchmarking result.

table5

Table 5: Benchmark – CPU Performance

i. Test Profile - pts/ffmpeg

2

ii. Test Profile - pts/openssl-1.8.0

3

iii. Test Profile - pts/compress-gzip

4

iv. Test Profile - pts/apache

5

v. Test Profile - pts/stress-ng

6

4.2. Memory

The ecs.cm4.xlarge instance type claimed the top place in the memory test profile benchmarking. It's kind of expected since the instance type has the most amount of RAM (16GB). However, the cheaper ecs.n4.xlarge instance type is almost on-par with the best performing instance type. Table 6 shows the memory benchmark result.

Table 6: Benchmark - Memory

table6

i. Test Profile - pts/stream (Copy)

7

ii. Test Profile - pts/stream (Scale)

8

iii. Test Profile - pts/stream (Triad)

9

iv. Test Profile - pts/stream (Add)

10

v. Test Profile - pts/ramspeed (Integer)

11

vi. Test Profile - pts/ramspeed (Floating Point)

12

4.3. Storage

There is no significance difference in terms of storage benchmarking. All of the instance types storage performance are comparable. Table 7 shows the storage benchmark result.

table7

Table 7: Benchmark - Storage

i.Test Profile - pts/fio (Random Read – MB/s)

13

ii.Test Profile - pts/fio (Random Read – IOPS)

14

iii.Test Profile - pts/fio (Random Write – MB/s)

15

iv.Test Profile - pts/fio (Random Write – IOPS)

16

v.Test Profile - pts/fio (Sequential Read – MB/s)

17

vi.Test Profile - pts/fio (Sequential Read – IOPS)

18

vii.Test Profile - pts/fio (Sequential Write – MB/s)

19

viii.Test Profile - pts/fio (Sequential Write – IOPS)

20

4.4. Network Throughput

The instance type from "Compute Optimized" family are clearly the winner for this benchmarking testing. The difference between the top and the lowest benchmark is up to 47.13%. However, the actual impact for our application could be small since the video size is limited to 50MB. Table 8 shows the network throughput benchmark result.

table8

Table 8: Benchmark - Network Throughput

i. Test Profile - pts/iperf (TCP)

21

ii. Test Profile - pts/iperf (UDP)

22

5. Conclusion

The benchmark's result obtained above suggests that ecs.n4.xlarge is the best, cost-efficient (performance/cost) instance type among the other benchmarked instance types. For our workload, this instance type is the best fit. Additionally, I couldn't help but to reiterate how affordable it is for its performance!

What does this result mean? Does it mean that Alibaba Cloud incorrectly labeled their servers? Not so much. In fact, the definition of "compute optimized" may vary significantly based on the actual application. For example, the server may have unimpressive performances for each category, but when put as a whole, it may be the perfect one for your application. Such result also indirectly indicates that we shouldn't solely rely on "Family Type" when choosing an instance type. Like this post, the "tentative" selected family type – "Compute Optimized" ended up not being the most cost-efficient instance type in our context. This is also influenced by the way we define the performance, to some extent.

In short, treat the "Family Type" only as reference. If there is a specific feature that you are looking for in your server, then you should perform benchmarking according to the actual workload behavior. You will then be able to find your RIGHT INSTANCE objectively!

6. Appendix

The steps and setup for Phoronix Test Suite used in the benchmarking activity above are shown below:

1.Install Phoronix Test Suite at the benchmarking instance.

wget http://phoronix-test-suite.com/releases/repo/pts.debian/files/phoronix-test-suite_7.6.0_all.deb
sudo apt-get install --yes ./phoronix-test-suite_7.6.0_all.deb unzip

2.Install selected test profile the benchmarking instance.

phoronix-test-suite install pts/openssl-1.8.0
phoronix-test-suite install pts/apache
phoronix-test-suite install pts/stress-ng
phoronix-test-suite install pts/compress-gzip
phoronix-test-suite install pts/ffmpeg
phoronix-test-suite install pts/stream
phoronix-test-suite install pts/ramspeed
phoronix-test-suite install pts/fio
phoronix-test-suite install pts/iperf

3.Configure and "batch" mode setup accordingly.

phoronix-test-suite batch-setup

4.Execute the tests accordingly.

phoronix-test-suite batch-run pts/openssl-1.8.0 pts/apache pts/stress-ng pts/compress-gzip pts/ffmpeg pts/stream pts/ramspeed pts/fio pts/iperf

5.For pts/iperf test, setup corresponding iperf server for data packet transferring. Install the iperf3 in another server (same instance type as the benchmark instance) before executing step 4.

sudo apt-get install --yes iperf3
iperf3 -s
相关实践学习
通义万相文本绘图与人像美化
本解决方案展示了如何利用自研的通义万相AIGC技术在Web服务中实现先进的图像生成。
7天玩转云服务器
云服务器ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,可降低 IT 成本,提升运维效率。本课程手把手带你了解ECS、掌握基本操作、动手实操快照管理、镜像管理等。了解产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
2月前
|
存储 安全 固态存储
2026阿里云服务器价格表:最新收费标准与38元1年、9.9元1个月、99元1年等活动价格参考
阿里云服务器收费标准涵盖实例配置、带宽及云盘三大核心组件,价格随规格、时长动态调整。2026年活动中推出多类优惠:轻量应用服务器2核4G低至9.9元/月、199元/年;经济型e实例2核2G 3M带宽99元/年;九代ECS(如计算型c9i 8核16G)年付低至6.4折。选购时需注意带宽与CPU/内存的匹配、云盘类型选择及实例适用场景。用户还可领取各种优惠券,在活动价基础上进一步减免,实现成本优化。
1055 4
|
2月前
|
人工智能 监控 数据可视化
9.9元起搭建AI数字员工!阿里云OpenClaw部署教程、命令大全与新手排错手册
在AI Agent快速普及的今天,OpenClaw(Clawdbot)凭借轻量化、可扩展、支持浏览器自动化与多IM平台接入等优势,成为个人与小微企业打造专属AI数字员工的首选工具。但传统部署方式需要配置环境、编写代码、调试端口,对零基础用户极不友好。阿里云推出的OpenClaw一键部署方案,彻底解决了这一痛点:官方镜像预装、零代码可视化配置、低成本轻量服务器、新用户享海量免费Token,全程最快10分钟即可完成部署,让每个人都能拥有24小时待命的AI助手。
1320 1
|
2月前
|
存储 人工智能 监控
应用创新丨从 OpenClaw 狂欢看企业级应用启示
技术层面借鉴、集成思路升维,在安全可控的前提下,开始 Agent 探索之旅
|
2月前
|
人工智能 网络安全 数据库
小白必看!阿里云部署OpenClaw(Clawdbot)超简单步骤+iMessage接入教程+避坑攻略
在2026年AI自动化与多端协同浪潮中,OpenClaw(原Clawdbot,曾用名Moltbot)凭借开源特性、灵活的交互能力与强大的任务执行效率,成为苹果生态用户提升个人效率的核心工具。这款开源AI智能体框架,截至2026年3月,在GitHub平台星标数量已突破19万,Fork数超3.5万,支持通过自然语言完成文件管理、信息检索、流程自动化等多样化任务,而iMessage作为苹果生态专属即时通讯工具,深度集成于iPhone、Mac、iPad等全苹果设备,具备原生流畅、即时推送、无广告干扰的优势,是苹果用户日常沟通、高效办公的核心载体。
524 1
|
2月前
|
JSON Linux API
OpenClaw阿里云、MacOS、Linux、Windows11 全平台部署:多模态信息整合与自动化工作流实战指南
在信息来源日益多样化的环境中,文本、表格、图表、网页、文档等不同类型的数据往往分散存在,手动整合耗时且容易出错。OpenClaw 作为支持多模态输入与结构化输出的 AI 智能体框架,能够将各类信息统一读取、解析、清洗、归纳,并形成可直接使用的结论与报告,同时支持自动化流程调度,大幅降低重复劳动。本文围绕多模态信息整合与自动化执行展开,提供完整的使用逻辑、技能配置、调度方法,并附上 2026 年阿里云、MacOS、Linux、Windows11 全平台部署流程、阿里云百炼 API 与免费大模型 Coding Plan 配置方案,所有内容均为实战说明,不含营销表述。
990 6
|
2月前
|
存储 固态存储 大数据
阿里云服务器2核8G、4核16G、8核32G可选实例规格、收费标准与活动价格
2026年阿里云调整了2核8G、4核16G、8核32G配置的价格与优惠,提供经济型e、通用算力型(u1、u2i、u2a)及第九代企业级实例(c9i,g9i, r9i等)供选择,满足不同用户需求。经济型e实例适合个人开发者及轻量应用;通用算力型实例平衡性能与成本,适合中小企业;第九代企业级实例提供极致性能,适合高性能需求场景。用户可根据业务需求、性能要求及预算选择合适的实例规格与付费模式,并利用优惠券进一步节省成本。
797 1
|
10月前
|
存储 分布式计算 算法
Java 大视界 -- Java 大数据在智能教育在线考试监考与作弊检测中的技术创新(193)
本文探讨了Java大数据技术在智能教育在线考试监考与作弊检测中的创新应用。随着在线考试的普及,作弊问题日益突出,传统监考方式难以应对。通过Java大数据技术,可实现考生行为分析、图像识别等多维度监控,提升作弊检测的准确性与效率。结合Hadoop与Spark等技术,系统能实时处理海量数据,构建智能监考体系,保障考试公平性,推动教育评价体系的数字化转型。
|
算法 安全 Java
真实世界的密码学(二)(1)
真实世界的密码学(二)
396 3
|
人工智能 弹性计算 运维
ECS控制台,AI助手与极简管控体验
本文介绍了ECS控制台的演进及最新AI工具功能。控制台作为运维平台,需兼顾用户体验、可靠性和安全性。针对不同用户(个人开发者、企业级用户、资源管理员和架构师),控制台提供了定制化AI助手,涵盖售前选型、售中购买、售后运维等全链路支持。AI助手可智能分析用户需求,推荐合适规格,并提供实例诊断、命令解释等功能,简化操作流程。此外,还推出了简洁版控制台,优化了小资源量用户的使用体验,减少复杂度,提升效率。未来,控制台将朝着更智能、个性化的chat ops方向发展。