You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ju...@apache.org on 2022/08/12 02:47:12 UTC

[apisix-website] branch master updated: docs: add Google/AWS/Azure test blog (#1282)

This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-website.git


The following commit(s) were added to refs/heads/master by this push:
     new c40429a02a2 docs: add Google/AWS/Azure test blog (#1282)
c40429a02a2 is described below

commit c40429a02a23f1a7eb5daa559c6700897fff8a84
Author: Sylvia <39...@users.noreply.github.com>
AuthorDate: Fri Aug 12 10:47:07 2022 +0800

    docs: add Google/AWS/Azure test blog (#1282)
---
 ...arm-performance-google-aws-azure-with-apisix.md | 133 +++++++++++++++++++++
 ...arm-performance-google-aws-azure-with-apisix.md | 126 +++++++++++++++++++
 2 files changed, 259 insertions(+)

diff --git a/blog/en/blog/2022/08/12/arm-performance-google-aws-azure-with-apisix.md b/blog/en/blog/2022/08/12/arm-performance-google-aws-azure-with-apisix.md
new file mode 100644
index 00000000000..03e09be470b
--- /dev/null
+++ b/blog/en/blog/2022/08/12/arm-performance-google-aws-azure-with-apisix.md
@@ -0,0 +1,133 @@
+---
+title: "ARM is trending! Performance Comparisons among Google, AWS, and Azure"
+authors:
+  - name: "Shirui Zhao"
+    title: "Author"
+    url: "https://github.com/soulbird"
+    image_url: "https://github.com/soulbird.png"
+  - name: "Sylvia"
+    title: "Technical Writer"
+    url: "https://github.com/SylviaBABY"
+    image_url: "https://avatars.githubusercontent.com/u/39793568?v=4"
+keywords: 
+- API gateway
+- ARM
+- Azure
+- AWS
+- Google
+- Apache APISIX
+description: This article uses API Gateway Apache APISIX to compare the performance in ARM among Google, AWS, and Azure in network IO-intensive scenarios.
+tags: [Ecosystem]
+---
+
+> This article uses API Gateway Apache APISIX to compare the performance in ARM among Google, AWS, and Azure in network IO-intensive scenarios.
+
+<!--truncate-->
+
+<head>
+    <link rel="canonical" href="https://api7.ai/2022/08/12/arm-performance-google-aws-azure-with-apisix/" />
+</head>
+
+## Background
+
+The ARM architecture belongs to the [RISC](https://en.wikipedia.org/wiki/Reduced_instruction_set_computer). The RISC microprocessor architecture design uses a highly optimized set of instructions to enable small processors to efficiently handle complex tasks.
+
+ARM has become the cornerstone of the world's largest computing ecosystem and mobile devices, and is considered by many experts to be the future of cloud computing due to its low power consumption, flexible licensing and low cost.
+
+Therefore, mainstream cloud vendors led by AWS, Google Cloud Platform (GCP) and Azure have successively launched servers with ARM architecture. Among them, AWS launched the first server processor AWS Graviton based on ARM architecture in 2018.
+
+### AWS Graviton
+
+AWS Graviton is a series of server processors based on the [ARM architecture](https://www.arm.com/) released by AWS in 2018. The first generation of AWS Graviton processors uses custom chips and 64-bit Neoverse cores.
+
+Released in 2020, AWS Graviton2 processors represent a major leap forward in performance and functionality compared to first-generation AWS Graviton processors. 7x faster performance, 4x more cores, 2x cache, 5x faster memory, and more.
+
+The latest AWS Graviton3 processors to be released at the end of May 2022 are based on the more advanced [Neoverse V1](https://www.arm.com/zh-TW/products/silicon-ip-cpu/neoverse/neoverse-v1) design, they offer up to twice the floating point performance, twice the cryptographic performance, and three times the ML compared to the AWS Graviton2 processors performance, including support for bfloat16. The following figure shows the main models equipped with AWS Graviton3 processors:
+
+![AWS Graviton3 processors](https://static.apiseven.com/2022/blog/0812/1.png)
+
+### Google Cloud Platform T2A
+
+The Google Cloud Platform(GCP) Tau T2A VM is a preview of Google's first ARM-based virtual machine in July 2022, powered by Ampere® Altra® Arm processors based on the Neoverse N1 design. Tau T2A VMs come in a variety of predefined VM shapes with up to 48 vCPUs per VM and 4GB of memory per vCPU.
+
+They offer up to 32 Gbps of network bandwidth and a wide range of network-attached storage options, making the Tau T2A VM suitable for scale-out workloads including web servers, containerized microservices, data record processing, media transcoding, and Java applications. The main models are as follows:
+
+![Tau T2A VM](https://static.apiseven.com/2022/blog/0812/2.png)
+
+### Azure Arm-based Virtual Machines
+
+In April, Microsoft announced a preview of its family of Azure virtual machines based on Ampere® Altra® Arm processors. The new VMs are designed to efficiently run scale-out workloads, web servers, application servers, open source databases, cloud-native and rich .NET applications, Java applications, game servers, media servers, and more. The new VM series includes general Dpsv5 and memory-optimized Epsv5 VMs. The main models are as follows:
+
+![Dpsv5 and Epsv5 VMs](https://static.apiseven.com/2022/blog/0812/3.png)
+
+## Three cloud vendors ARM server performance test
+
+In this article, we will reflect the overall performance of each server by testing single-core performance. Here, the network IO-intensive API gateway Apache APISIX is selected to bind a single CPU core for stress testing on three models: AWS c7g.large, GCP t2a-standard-2 and Azure D2ps v5 (belonging to the Dpsv5-series, dual-core CPU), and analyze the performance of the server through the two indicators of QPS and response delay.
+
+[Apache APISIX](https://github.com/apache/apisix) is a cloud-native, high-performance, scalable API gateway. Based on NGNIX + LuaJIT and etcd, APISIX has the characteristics of dynamic routing and plug-in hot loading compared with traditional API gateways, which is especially suitable for API management under cloud native architecture.
+
+![Apache APISIX](https://static.apiseven.com/2022/blog/0812/4.png)
+
+Next, we will use the APISIX official open source performance [test script for testing](https://github.com/apache/apisix/blob/master/benchmark/run.sh).
+
+### Test case
+
+We will test the performance of Apache APISIX under two typical scenarios in order to obtain more realistic and rich test data:
+
+* **Scenario 1: Single upstream.** In this scenario, a single upstream (without any plugins) is used to test the performance of APISIX in pure proxy back-to-origin mode.
+
+* **Scenario 2: Single upstream + multiple plugins.** This scenario uses a single upstream with multiple plugins and two plugins are used here. It mainly tests the performance of APISIX when the two core consumption performance plugins, `limit-count` and `prometheus`, are enabled.
+
+### Test Results
+
+The figure below is the QPS (queries per second) test result and the higher the number, the better the performance.
+
+![QPS result](https://static.apiseven.com/2022/blog/0812/5.png)
+
+The figure below is the response delay test results in milliseconds. The smaller the number, the better the performance.
+
+![Response delay results](https://static.apiseven.com/2022/blog/0812/6.png)
+
+From the perspective of QPS and response delay, under network IO-intensive API gateways like Apache APISIX, AWS C7g has a 100% performance improvement compared to GCP T2A, and Azure Dpsv5 has a performance lead of about 15% compared to GCP T2A.
+
+## Cost-performance comparison
+
+Since this article only focuses on testing the performance of ARM machines from different cloud vendors, so we will ignore the change of "the same number of CPU cores with different memory", and analyze the cost-performance ratio of AWS Graviton3 and GCP T2A only from the perspective of the number of CPU cores.
+
+:::note
+
+In the current test scenario, the cost-performance ratio can be understood as: QPS/cost.
+
+:::
+
+The table below compares server hourly prices for different cores for AWS C7g (US East Ohio), GCP T2A (us-central1) and Azure Dpsv5 (East US):
+
+| VM series / vCPU | 1       | 2       | 4       | 8      | 16      | 32      | 64      |
+|------------------|---------|---------|:--------|:-------|:--------|:--------|:--------|
+| AWS C7g          | $0.0361 | $0.0723 | $0.1445 | $0.289 | $0.5781 | $1.1562 | $1.7342 |
+| GCP T2A          | $0.0385 | $0.077  | $0.154  | $0.308 | $0.616  | $1.232  | $1.848  |
+| Azure Dpsv5      | *       | $0.077  | $0.154  | $0.308 | $0.616  | $1.232  | $1.848  |
+
+The following table summarizes the cost and cost–performance ratio of AWS c7g.large and GCP t2a-standard-2 running for one year, referring to the QPS data for a single upstream in the Apache APISIX performance test. The larger the number, the higher the QPS can be obtained at the unit price.
+
+|                    | Annual cost         | Cost performance (QPS/cost) |
+|--------------------|-----------------|--------------------|
+| AWS c7g.large      | $633.3          | 36.3               |
+| GCP t2a-standard-2 | $674.5          | 16.8               |
+| Azure D2ps v5      | $398.0(41% off) | 33.6               |
+
+From the test results, AWS C7g is more cost-effective than GCP T2A and Azure Dpsv5. Although Azure Dpsv5 has only a 15% performance improvement compared to GCP T2A, the cost performance is nearly double.
+
+## Summary
+
+AWS launched the first ARM-based processor, AWS Graviton, in 2018. It was about 4 years ahead of GCP for the deployment of the ARM-based server field. Now the AWS Graviton processor has developed to the third generation.
+
+Through the performance test results and price–performance ratio analysis of Apache APISIX, we can see that AWS Graviton3 has higher performance and cost-effective than GCP T2A and Azure Dpsv5. This is inseparable from the fact that AWS has been deeply involved in the field of ARM-based servers for many years.
+
+In addition, we used Apache APISIX bound single-core tests during our testing, and the price-performance ratio of AWS Graviton 3 may be further improved if multiple cores are used.
+
+## Reference
+
+* [New – Amazon EC2 C7g Instances, Powered by AWS Graviton3 Processors](https://aws.amazon.com/cn/blogs/aws/new-amazon-ec2-c7g-instances-powered-by-aws-graviton3-processors/)
+* [Tau T2A machine series (Preview)](https://cloud.google.com/compute/docs/general-purpose-machines#t2a_machines)
+* [Now in preview: Azure Virtual Machines with Ampere Altra Arm-based processors](https://azure.microsoft.com/en-us/blog/now-in-preview-azure-virtual-machines-with-ampere-altra-armbased-processors/)
diff --git a/blog/zh/blog/2022/08/12/arm-performance-google-aws-azure-with-apisix.md b/blog/zh/blog/2022/08/12/arm-performance-google-aws-azure-with-apisix.md
new file mode 100644
index 00000000000..ea430203720
--- /dev/null
+++ b/blog/zh/blog/2022/08/12/arm-performance-google-aws-azure-with-apisix.md
@@ -0,0 +1,126 @@
+---
+title: "ARM 架构正当时,三大云厂商产品究竟有多厉害"
+authors:
+  - name: "赵士瑞"
+    title: "Author"
+    url: "https://github.com/soulbird"
+    image_url: "https://github.com/soulbird.png"
+  - name: "苏钰"
+    title: "Technical Writer"
+    url: "https://github.com/SylviaBABY"
+    image_url: "https://avatars.githubusercontent.com/u/39793568?v=4"
+keywords: 
+- API gateway
+- ARM
+- Azure
+- AWS
+- Google
+- Apache APISIX
+description: 本文使用 API Gateway Apache APISIX 来比较 Google、AWS 和 Azure 在网络 IO 密集型场景下的 ARM 架构性能。
+tags: [Ecosystem]
+---
+
+> 本文使用 API Gateway Apache APISIX 来比较 Google、AWS 和 Azure 在网络 IO 密集型场景下的 ARM 架构性能。
+
+<!--truncate-->
+
+## 背景
+
+ARM 架构属于 [RISC 设计家族](https://en.wikipedia.org/wiki/Reduced_instruction_set_computer)。RISC 微处理器架构设计使用一组高度优化的指令,使小型处理器能够有效地处理复杂的任务。
+
+ARM 已成为全球最大的计算机生态系统和移动设备的基石,以其低功耗、灵活的许可和低成本等特点,被许多专家认为是云计算的未来。因此,以 AWS、Google Cloud Platform(GCP) 和 Azure 为首的主流云厂商都陆续推出了 ARM 架构的服务器。其中 AWS 更是早在 2018 年就推出了第一款基于 ARM 架构的服务器处理器 AWS Graviton。
+
+### AWS Graviton
+
+AWS Graviton 是 AWS 于 2018 年发布的基于 ARM 架构的一系列服务器处理器,第一代 AWS Graviton 处理器采用定制芯片和 64 位 Neoverse 内核。
+
+AWS Graviton2 于 2020 年发布,与第一代 AWS Graviton 处理器相比,AWS Graviton2 处理器在性能和功能方面实现了重大飞跃。性能提升 7 倍、计算核心数量达到 4 倍、缓存达到 2 倍、内存速度提升 5 倍等等。
+
+最新的 AWS Graviton3 处理器在 2022 年 5 月底发布,基于更加先进的 [Neoverse V1](https://www.arm.com/zh-TW/products/silicon-ip-cpu/neoverse/neoverse-v1) 设计,与前代处理器相比,更是提升了高达两倍的浮点性能、两倍的加密性能和三倍的 ML 性能,包括对 bfloat16 的支持。下图展示了搭载 AWS Graviton3 处理器的主要机型:
+
+![AWS Graviton3 处理器主要机型](https://static.apiseven.com/2022/blog/0812/1.png)
+
+### Google Cloud Platform T2A
+
+Google Cloud Platform(以下简称 GCP)T2A VM 是 Google 在 2022 年 7 月推出的首款 ARM 架构的虚拟机预览版,由基于 Neoverse N1 设计的 Ampere® Altra® Arm 处理器提供支持。
+
+Tau T2A VM 有多种预定义的 VM 形状,每个 VM 最多 48 个 vCPU,每个 vCPU 4GB 内存。它们提供高达 32 Gbps 的网络带宽和广泛的网络附加存储选项,使 Tau T2A VM 适用于横向扩展工作负载,包括 Web 服务器、容器化微服务、数据记录处理、媒体转码和 Java 应用程序。主要机型如下图所示:
+
+![Tau T2A VM](https://static.apiseven.com/2022/blog/0812/2.png)
+
+### Azure ARM-based Virtual Machines
+
+2022 年 4 月,微软宣布推出基于 Ampere® Altra® Arm 处理器的 Azure 虚拟机系列预览版。新的 VM 旨在高效运行横向扩展工作负载、Web 服务器、应用程序服务器、开源数据库、云原生以及丰富的 .NET 应用程序、Java 应用程序、游戏服务器和媒体服务器等。新的 VM 系列包括通用 Dpsv5 和内存优化的 Epsv5 VM,主要机型如下图所示:
+
+![Dpsv5 和 Epsv5 VM](https://static.apiseven.com/2022/blog/0812/3.png)
+
+## 三大云厂商 ARM 服务器性能测试
+
+在本文中,我们将通过测试单核心性能来反映各服务器的整体性能。这里选取网络 IO 密集型的 API 网关 Apache APISIX,分别在 AWS c7g.large、GCP t2a-standard-2 和 Azure D2ps v5(属于 Dpsv5 系列,双核 CPU)三款机型上绑定单个 CPU 核心进行压力测试,并通过 QPS 和响应延迟两个指标来分析服务器的性能。
+
+[Apache APISIX](https://github.com/apache/apisix) 是一个云原生、高性能、可扩展的 API 网关。基于 NGNIX + LuaJIT 和 etcd,APISIX 与传统 API 网关相比,具有动态路由和插件热加载特性,特别适合云原生架构下的 API 管理。
+
+![Apache APISIX](https://static.apiseven.com/2022/blog/0812/4.png)
+
+接下来我们将使用 APISIX 官方开源的[性能测试脚本](https://github.com/apache/apisix/blob/master/benchmark/run.sh)进行测试。
+
+### 测试用例
+
+本文我们将测试 Apache APISIX 在两个典型场景下的表现,以便获取更加真实、丰富的测试数据。
+
+- 场景一:单个上游。该场景下使用单个上游(不包含任何插件),主要测试 APISIX 在纯代理回源模式下的性能表现。
+- 场景二:单上游+多插件。该场景使用单上游与多插件配合,在这里使用了两个插件。主要测试 APISIX 在开启 `limit-count` 和 `prometheus` 两个核心消耗性能插件时的性能表现。
+
+### 测试结果
+
+下图是 QPS(每秒查询数)测试结果, 数字越大代表其性能越好。
+
+![QPS 结果](https://static.apiseven.com/2022/blog/0812/5.png)
+
+下图是响应延迟测试结果,单位为毫秒。数字越小代表其性能越好。
+
+![响应延迟结果](https://static.apiseven.com/2022/blog/0812/6.png)
+
+从 QPS 和响应延迟来看,在类似 Apache APISIX 这种网络 IO 密集型的 API 网关下,AWS C7g 相比 GCP T2A 有 100% 的性能提升,Azure Dpsv5 相比 GCP T2A 则有 15% 左右的性能领先。
+
+## 机器性价比比较
+
+由于本文仅专注于测试不同云厂商 ARM 机器的性能,所以在结果呈现中我们将忽略 “CPU 核心数相同时内存不同” 这一变化,只从 CPU 核心数的角度来分析 AWS Graviton3 和 GCP T2A 的性价比。
+
+:::note
+
+在当前的测试场景下,性价比可以理解为:QPS/成本。
+
+:::
+
+下表是 AWS C7g (US East Ohio) 、GCP T2A (us-central1) 和 Azure Dpsv5 (East US) 不同核心的服务器每小时价格对比:
+
+| VM series / vCPU | 1       | 2       | 4       | 8      | 16      | 32      | 64      |
+|------------------|---------|---------|:--------|:-------|:--------|:--------|:--------|
+| AWS C7g          | $0.0361 | $0.0723 | $0.1445 | $0.289 | $0.5781 | $1.1562 | $1.7342 |
+| GCP T2A          | $0.0385 | $0.077  | $0.154  | $0.308 | $0.616  | $1.232  | $1.848  |
+| Azure Dpsv5      | *       | $0.077  | $0.154  | $0.308 | $0.616  | $1.232  | $1.848  |
+
+参考前文中对 Apache APISIX 性能测试中的单个上游时的 QPS 数据,下表则汇总了 AWS c7g.large、GCP t2a-standard-2 和 Azure Dpsv5 运行一年的成本和性价比。其中只有微软官方公布了对应虚拟机的折扣。其中数字越大,则表明在单位价格能获取到更高的 QPS。
+
+|                    | 一年成本         | 性价比(QPS / 成本) |
+|--------------------|-----------------|--------------------|
+| AWS c7g.large      | $633.3          | 36.3               |
+| GCP t2a-standard-2 | $674.5          | 16.8               |
+| Azure D2ps v5      | $398.0(41%折扣) | 33.6               |
+
+从测试结果来看,AWS C7g 相比 GCP T2A 和 Azure Dpsv5 拥有更高的性价比。虽然 Azure Dpsv5 相比 GCP T2A 只有 15% 的性能提升, 但是性价比却高了接近一倍。
+
+## 总结
+
+AWS 在 2018 年就推出了首款 ARM 架构的处理器 AWS Graviton,比 GCP 提前了大约 4 年进行了基于 ARM 架构的服务器领域的布局,如今 AWS Graviton 处理器已经发展到了第三代。
+
+通过 Apache APISIX 的性能测试结果和性价比分析,我们可以看出 AWS Graviton3 拥有比 GCP T2A 和 Azure Dpsv5 更高的性能和性价比。这于 AWS 在 ARM 服务器领域深耕多年是分不开的。
+
+此外,我们在测试过程中仅使用了 Apache APISIX 绑定单核心测试。如果使用多核,AWS Graviton 3 所呈现的性价比可能会进一步提高。
+
+## 参考链接
+
+- [New – Amazon EC2 C7g Instances, Powered by AWS Graviton3 Processors](https://aws.amazon.com/cn/blogs/aws/new-amazon-ec2-c7g-instances-powered-by-aws-graviton3-processors/)
+- [Tau T2A machine series (Preview)](https://cloud.google.com/compute/docs/general-purpose-machines#t2a_machines)
+- [Now in preview: Azure Virtual Machines with Ampere Altra Arm-based processors](https://azure.microsoft.com/en-us/blog/now-in-preview-azure-virtual-machines-with-ampere-altra-armbased-processors/)