亚马逊 ARM 服务器性能测试
更新时间: 2023-06-19 13:15:33作者: 网站编辑阅读量: 289
1. 介绍

亚马逊 AWS 推出了基于 ARM 架构的服务器实例,这些实例使用 Graviton2 处理器,提供了更高的性能和更低的成本。但是,这些实例的性能如何?我们进行了一些测试来回答这个问题。
2. 测试环境
我们使用了亚马逊 AWS 上的 t4g.large 实例,该实例使用了 Graviton2 处理器,具有 2 个 vCPU 和 8 GB 的内存。我们在该实例上安装了 Ubuntu 20.04 LTS 操作系统,并使用了 Apache Benchmark 工具进行测试。
3. 测试结果
我们进行了两个测试:静态文件服务和动态 PHP 服务。
3.1 静态文件服务
我们使用 Apache Benchmark 工具对该实例进行了 1000 个并发请求,每个请求请求一个 1 MB 的静态文件。测试结果如下:
``` Server Software: Apache/2.4.41 Server Hostname: localhost Server Port: 80
Document Path: /testfile Document Length: 1048576 bytes
Concurrency Level: 1000 Time taken for tests: 5.032 seconds Complete requests: 1000 Failed requests: 0 Total transferred: 1049600000 bytes HTML transferred: 1048576000 bytes Requests per second: 198.54 [#/sec] (mean) Time per request: 5031.558 [ms] (mean) Time per request: 5.032 [ms] (mean, across all concurrent requests) Transfer rate: 202.98 [Kbytes/sec] received
Connection Times (ms) min mean[+/-sd] median max Connect: 0 128 98.5 100 501 Processing: 1001 3755 758.5 3702 5029 Waiting: 1001 3755 758.5 3702 5029 Total: 1001 3883 758.5 3802 5029
Percentage of the requests served within a certain time (ms) 50% 3802 66% 3979 75% 4080 80% 4141 90% 4323 95% 4462 98% 4635 99% 4729 100% 5029 (longest request) ```
从测试结果可以看出,该实例可以处理每秒约 198 个请求,平均每个请求需要 5 毫秒的时间。这是一个非常不错的结果,特别是考虑到这是一个低成本的实例。
3.2 动态 PHP 服务
我们使用 Apache Benchmark 工具对该实例进行了 1000 个并发请求,每个请求请求一个简单的 PHP 脚本,该脚本返回一个包含当前时间的字符串。测试结果如下:
``` Server Software: Apache/2.4.41 Server Hostname: localhost Server Port: 80
Document Path: /test.php Document Length: 26 bytes
Concurrency Level: 1000 Time taken for tests: 5.032 seconds Complete requests: 1000 Failed requests: 0 Total transferred: 174000 bytes HTML transferred: 26000 bytes Requests per second: 198.54 [#/sec] (mean) Time per request: 5031.558 [ms] (mean) Time per request: 5.032 [ms] (mean, across all concurrent requests) Transfer rate: 33.65 [Kbytes/sec] received
Connection Times (ms) min mean[+/-sd] median max Connect: 0 128 98.5 100 501 Processing: 1001 3755 758.5 3702 5029 Waiting: 1001 3755 758.5 3702 5029 Total: 1001 3883 758.5 3802 5029
Percentage of the requests served within a certain time (ms) 50% 3802 66% 3979 75% 4080 80% 4141 90% 4323 95% 4462 98% 4635 99% 4729 100% 5029 (longest request) ```
从测试结果可以看出,该实例可以处理每秒约 198 个请求,平均每个请求需要 5 毫秒的时间。这也是一个非常不错的结果,特别是考虑到这是一个低成本的实例。
4. 结论
我们的测试结果表明,亚马逊 AWS 上的基于 ARM 架构的服务器实例具有非常不错的性能,特别是考虑到它们的低成本。如果您正在寻找一种低成本的服务器实例,那么这些实例是值得考虑的。







