接續上一篇 sysbench CPU benchmark of different AWS EC2 instances ,這邊改用 Geekbench 來做效能測試,Geekbench 是跨平台的效能測試工具,有支援 Windows、Linux、macOS、Android 和 iOS 等系統,測試環境、比較對象和上一篇相同。
測試環境
- Ubuntu: 18.04.3 LTS
- Linux kernel: 4.15.0-1052-aws
- Geekbenck: 5.0.3
比較對象
- General purpose
- T2
- T3
- T3a
- M4
- M5
- M5a
- Compute optimized
- C4
- C5
- Memory optimized
- R4
- R5
- R5a
T 系列的機器也都同樣是開 Unlimited Mode 下去跑測試讓 CPU 可以全速運轉
執行時不用特別帶參數,像下面這樣
測試畫面
$ ./Geekbench-5.0.3-Linux/geekbench5
Geekbench 5.0.3 Tryout : https://www.geekbench.com/
Geekbench 5 is in tryout mode.
Geekbench 5 requires an active Internet connection when in tryout mode, and
automatically uploads test results to the Geekbench Browser. Other features
are unavailable in tryout mode.
Buy a Geekbench 5 license to enable offline use and remove the limitations of
tryout mode.
If you would like to purchase Geekbench you can do so online:
https://store.primatelabs.com/v5
If you have already purchased Geekbench, enter your email address and license
key from your email receipt with the following command line:
./Geekbench-5.0.3-Linux/geekbench5 -r <email address> <license key>
Running Gathering system information
System Information
Operating System Ubuntu 18.04.3 LTS 4.15.0-1052-aws x86_64
Model Amazon EC2 t3a.large
Motherboard Amazon EC2
BIOS Amazon EC2 1.0
Processor Information
Name Intel Pentium II/III
Topology 1 Processor, 1 Core, 2 Threads
Identifier AuthenticAMD Family 23 Model 1 Stepping 2
Base Frequency 2.20 GHz
L1 Instruction Cache 64.0 KB
L1 Data Cache 32.0 KB
L2 Cache 512 KB
L3 Cache 64.0 MB
Memory Information
Size 7.71 GB
Single-Core
Running AES-XTS
Running Text Compression
Running Image Compression
Running Navigation
Running HTML5
Running SQLite
Running PDF Rendering
Running Text Rendering
Running Clang
Running Camera
Running N-Body Physics
Running Rigid Body Physics
Running Gaussian Blur
Running Face Detection
Running Horizon Detection
Running Image Inpainting
Running HDR
Running Ray Tracing
Running Structure from Motion
Running Speech Recognition
Running Machine Learning
Multi-Core
Running AES-XTS
Running Text Compression
Running Image Compression
Running Navigation
Running HTML5
Running SQLite
Running PDF Rendering
Running Text Rendering
Running Clang
Running Camera
Running N-Body Physics
Running Rigid Body Physics
Running Gaussian Blur
Running Face Detection
Running Horizon Detection
Running Image Inpainting
Running HDR
Running Ray Tracing
Running Structure from Motion
Running Speech Recognition
Running Machine Learning
Uploading results to the Geekbench Browser. This could take a minute or two
depending on the speed of your internet connection.
Upload succeeded. Visit the following link and view your results online:
https://browser.geekbench.com/v5/cpu/535166
Visit the following link and add this result to your profile:
https://browser.geekbench.com/v5/cpu/535166/claim?key=185887
測試結果
接著看測試結果,免費版的 Geekbench 測試時必須要有網路連線,結果不會直接顯示在本機,要上傳到他們的伺服器上看,好處應該是比較不怕造假(假設有對資料做應該有的基本驗證機制)或弄錯,畫面呈現如下,除了效能測試的分數以外,也一些作業系統、CPU、記憶體等資訊:
下面是這次測試全部結果的連結:
- c4.large: https://browser.geekbench.com/v5/cpu/535204
- c5.large: https://browser.geekbench.com/v5/cpu/535289
- t2.large: https://browser.geekbench.com/v5/cpu/535068
- t3.large: https://browser.geekbench.com/v5/cpu/534981
- t3a.large: https://browser.geekbench.com/v5/cpu/535014
- m4.large: https://browser.geekbench.com/v5/cpu/535317
- m5.large: https://browser.geekbench.com/v5/cpu/535363
- m5a.large: https://browser.geekbench.com/v5/cpu/535410
- r4.large: https://browser.geekbench.com/v5/cpu/535696
- r5.large: https://browser.geekbench.com/v5/cpu/535659
- r5a.large: https://browser.geekbench.com/v5/cpu/535472
直接把單核心和多核心測試分數統計到表格來看:
各 Instance type 的單核心、多核心分數統計
C4 | C5 | T2 | T3 | T3a | M4 | M5 | M5a | R4 | R5 | R5a | |
Single-Core | 832 | 927 | 713 | 719 | 661 | 730 | 859 | 765 | 732 | 849 | 736 |
Multi-Core | 964 | 1107 | 1415 | 970 | 860 | 858 | 1022 | 989 | 862 | 1015 | 950 |
跟上一篇 sysbench 測試的結果大不相同,畢竟用來測試的工作本來就不同,但令人不解的是 T2 得到的分數勝過 T3 ,再測一次即便分數有低了許多(675/1349、差了居然 5%,似乎用 Geekbench 測 EC2 的成績誤差比較大),但單核心分數仍比 T3a 來的高、多核心分數還是遠高於 T3 和 T3a 的成績(甚至也遠高於 C5/M5/R5 ),似乎怪怪的 …
各 Instance type 單核心的各測試項目分數統計
更進一步看各項測試的單核心得分,因為測試項目有二十多項 (Crypto Score, Integer Score, Floating Point Score, AES-XTS, Text Compression, Image Compression, Navigation, HTML5, SQLite, PDF Rendering, Text Rendering, Clang, Camera, N-Body Physics, Rigid Body Physics, Gaussian Blur, Face Detection, Horizon Detection, Image Inpainting, HDR, Ray Tracing, Structure from Motion, Speech Recognition, Machine Learning,不過 Crypto Score 的分數看起來就是 AES-XTS 的分數),畫在同一張圖表上面實在不好看,拆成兩份圖表來做比較
各 Instance type 單核心的各測試項目分數表格:
各 Instance type 單核心的各測試項目分數柱狀圖:
可以看到在單核心的部份, C5 幾乎拿了所有測試項目的最高分,這個沒什麼問題也很合理,次之就是 M5, R5 這兩種機器,至於 AMD 的處理器就只有在 Crypto Score / AES-XTS、Gaussian Blur 佔到優勢,但也謹此於此,除此之外其他項目的表現就不太好看了,很多甚至是比上一代的機器 (T2、M4、R4) 來的還差,不知道究竟是指令集差異的關係、還是 Intel 有對 Geekbench 的測試做最佳化,又或者是 AWS 對於不同系列的主機資源分配方式不同,比較能確定的只有一點。那就是看來還需要再多找些其他測試來比較看看才行。
另一點令人意外的是 T2 在許多測試上的分數是比 T3 還來的高的,例如 Integer Score、Text Compression、Navigation、HTML5、SQLite、Text Rendering、Image Inpainting、Machine Learning,不知道這是不是又是另一個因為底層硬體造成的差異 (T2 使用的虛擬化是 AWS 使用相對多年的 Xen 、 T3 則是比較新的 KVM + Nitro)。從機器上看到 T3 系列的 CPU 用的都是 Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz 這一顆,但 T2 就有看到比較多種,像 Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz、Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz、Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz 等,但畢竟都是經過虛擬化的資源,除了底層硬體差異外、在資源分配上可能也有一些不同的參數在做調整,大概只有 AWS 內部人員有辦法知道是怎麼一回事了。
看完了單核心的分數以及合理、不合理的地方之後,眼尖的人大概也已經發現另一個單核心對多核心測試得分上面的一個怪異現象:T2 單核心全輸給 C5 、但多核心卻大獲全勝,這個用 Geekbench Browser 裡面的比較功能來看是滿清楚的,只是還沒想到可以怎麼解釋會比較合理:
- https://browser.geekbench.com/v5/cpu/compare/536000?baseline=535289
- https://browser.geekbench.com/v5/cpu/compare/535068?baseline=535289
最後還有一點最還有不在上列測試清單的 t3a.small 也遠高於 t3a.large ,會測到 t3a.small 這個規格原先單純是因為手誤選錯,但看到結果後覺得不太對勁,於是又多測了幾次,卻都是如此,讓人摸不著頭緒 … 這個就留給有興趣研究或是路過的高手來解答了