はじめに
UbuntuでもARM64対応しているのでベンチマークを図ってみたいと思います。
注意としてはベンチマークの測定方法はUnixbench を利用しています。また、コア数やメモリサイズは揃えていますがこれが性能に直結するものではありません。
仮想マシン
Arm64
Standard D2ps v5 (2 vcpu 数、8 GiB メモリ)
ubuntu 20.04
x86
Standard D2s v5 (2 vcpu 数、8 GiB メモリ)
ubuntu 20.04
ベンチマーク
ベンチマークはUnixbench です。古典なみに古いツールです。
新規に仮想マシンを作成後に最新パッチを適用して、makeしてRunしてます。
-
GitHub - kdlucas/byte-unixbench: Automatically exported from code.google.com/p/byte-unixbench
Automatically exported from code.google.com/p/byte-unixbench - kdlucas/byte-unixbench
github.com
arm64
======================================================================== BYTE UNIX Benchmarks (Version 5.1.3) System: vm1: GNU/Linux OS: GNU/Linux -- 5.15.0-1017-azure -- #20~20.04.1-Ubuntu SMP Fri Aug 5 15:46:55 UTC 2022 Machine: aarch64 (aarch64) Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8") CPU 0: (50.0 bogomips) CPU 1: (50.0 bogomips) 09:33:10 up 7 min, 1 user, load average: 0.28, 0.28, 0.16; runlevel 2022-09-02 ------------------------------------------------------------------------ Benchmark Run: Fri Sep 02 2022 09:33:10 - 10:01:06 2 CPUs in system; running 1 parallel copy of tests Dhrystone 2 using register variables 41558067.4 lps (10.0 s, 7 samples) Double-Precision Whetstone 8489.0 MWIPS (9.9 s, 7 samples) Execl Throughput 1551.0 lps (30.0 s, 2 samples) File Copy 1024 bufsize 2000 maxblocks 1000987.0 KBps (30.0 s, 2 samples) File Copy 256 bufsize 500 maxblocks 280817.8 KBps (30.0 s, 2 samples) File Copy 4096 bufsize 8000 maxblocks 2631185.5 KBps (30.0 s, 2 samples) Pipe Throughput 1483946.3 lps (10.0 s, 7 samples) Pipe-based Context Switching 67291.5 lps (10.0 s, 7 samples) Process Creation 3919.4 lps (30.0 s, 2 samples) Shell Scripts (1 concurrent) 5076.1 lpm (60.0 s, 2 samples) Shell Scripts (8 concurrent) 923.4 lpm (60.0 s, 2 samples) System Call Overhead 1026485.2 lps (10.0 s, 7 samples) System Benchmarks Index Values BASELINE RESULT INDEX Dhrystone 2 using register variables 116700.0 41558067.4 3561.1 Double-Precision Whetstone 55.0 8489.0 1543.5 Execl Throughput 43.0 1551.0 360.7 File Copy 1024 bufsize 2000 maxblocks 3960.0 1000987.0 2527.7 File Copy 256 bufsize 500 maxblocks 1655.0 280817.8 1696.8 File Copy 4096 bufsize 8000 maxblocks 5800.0 2631185.5 4536.5 Pipe Throughput 12440.0 1483946.3 1192.9 Pipe-based Context Switching 4000.0 67291.5 168.2 Process Creation 126.0 3919.4 311.1 Shell Scripts (1 concurrent) 42.4 5076.1 1197.2 Shell Scripts (8 concurrent) 6.0 923.4 1539.0 System Call Overhead 15000.0 1026485.2 684.3 ======== System Benchmarks Index Score 1097.0 ------------------------------------------------------------------------ Benchmark Run: Fri Sep 02 2022 10:01:06 - 10:29:02 2 CPUs in system; running 2 parallel copies of tests Dhrystone 2 using register variables 83094942.4 lps (10.0 s, 7 samples) Double-Precision Whetstone 16967.4 MWIPS (9.9 s, 7 samples) Execl Throughput 2641.2 lps (30.0 s, 2 samples) File Copy 1024 bufsize 2000 maxblocks 1544714.1 KBps (30.0 s, 2 samples) File Copy 256 bufsize 500 maxblocks 476166.9 KBps (30.0 s, 2 samples) File Copy 4096 bufsize 8000 maxblocks 3586514.2 KBps (30.0 s, 2 samples) Pipe Throughput 2939663.0 lps (10.0 s, 7 samples) Pipe-based Context Switching 340913.0 lps (10.0 s, 7 samples) Process Creation 6997.1 lps (30.0 s, 2 samples) Shell Scripts (1 concurrent) 7081.4 lpm (60.0 s, 2 samples) Shell Scripts (8 concurrent) 952.7 lpm (60.0 s, 2 samples) System Call Overhead 1788235.3 lps (10.0 s, 7 samples) System Benchmarks Index Values BASELINE RESULT INDEX Dhrystone 2 using register variables 116700.0 83094942.4 7120.4 Double-Precision Whetstone 55.0 16967.4 3085.0 Execl Throughput 43.0 2641.2 614.2 File Copy 1024 bufsize 2000 maxblocks 3960.0 1544714.1 3900.8 File Copy 256 bufsize 500 maxblocks 1655.0 476166.9 2877.1 File Copy 4096 bufsize 8000 maxblocks 5800.0 3586514.2 6183.6 Pipe Throughput 12440.0 2939663.0 2363.1 Pipe-based Context Switching 4000.0 340913.0 852.3 Process Creation 126.0 6997.1 555.3 Shell Scripts (1 concurrent) 42.4 7081.4 1670.1 Shell Scripts (8 concurrent) 6.0 952.7 1587.9 System Call Overhead 15000.0 1788235.3 1192.2 ======== System Benchmarks Index Score 1964.9
x86
======================================================================== BYTE UNIX Benchmarks (Version 5.1.3) System: vm2: GNU/Linux OS: GNU/Linux -- 5.15.0-1017-azure -- #20~20.04.1-Ubuntu SMP Fri Aug 5 12:16:53 UTC 2022 Machine: x86_64 (x86_64) Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8") CPU 0: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz (5586.9 bogomips) Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization CPU 1: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz (5586.9 bogomips) Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization 09:33:36 up 9 min, 1 user, load average: 0.17, 0.28, 0.22; runlevel 2022-09-02 ------------------------------------------------------------------------ Benchmark Run: Fri Sep 02 2022 09:33:36 - 10:01:37 2 CPUs in system; running 1 parallel copy of tests Dhrystone 2 using register variables 48857719.5 lps (10.0 s, 7 samples) Double-Precision Whetstone 7604.7 MWIPS (9.9 s, 7 samples) Execl Throughput 5492.7 lps (30.0 s, 2 samples) File Copy 1024 bufsize 2000 maxblocks 1444104.5 KBps (30.0 s, 2 samples) File Copy 256 bufsize 500 maxblocks 392564.2 KBps (30.0 s, 2 samples) File Copy 4096 bufsize 8000 maxblocks 4050371.6 KBps (30.0 s, 2 samples) Pipe Throughput 2181327.3 lps (10.0 s, 7 samples) Pipe-based Context Switching 62719.1 lps (10.0 s, 7 samples) Process Creation 12014.2 lps (30.0 s, 2 samples) Shell Scripts (1 concurrent) 12737.4 lpm (60.0 s, 2 samples) Shell Scripts (8 concurrent) 1912.5 lpm (60.0 s, 2 samples) System Call Overhead 2260230.9 lps (10.0 s, 7 samples) System Benchmarks Index Values BASELINE RESULT INDEX Dhrystone 2 using register variables 116700.0 48857719.5 4186.6 Double-Precision Whetstone 55.0 7604.7 1382.7 Execl Throughput 43.0 5492.7 1277.4 File Copy 1024 bufsize 2000 maxblocks 3960.0 1444104.5 3646.7 File Copy 256 bufsize 500 maxblocks 1655.0 392564.2 2372.0 File Copy 4096 bufsize 8000 maxblocks 5800.0 4050371.6 6983.4 Pipe Throughput 12440.0 2181327.3 1753.5 Pipe-based Context Switching 4000.0 62719.1 156.8 Process Creation 126.0 12014.2 953.5 Shell Scripts (1 concurrent) 42.4 12737.4 3004.1 Shell Scripts (8 concurrent) 6.0 1912.5 3187.5 System Call Overhead 15000.0 2260230.9 1506.8 ======== System Benchmarks Index Score 1857.7 ------------------------------------------------------------------------ Benchmark Run: Fri Sep 02 2022 10:01:37 - 10:29:43 2 CPUs in system; running 2 parallel copies of tests Dhrystone 2 using register variables 54639330.7 lps (10.0 s, 7 samples) Double-Precision Whetstone 13755.0 MWIPS (9.9 s, 7 samples) Execl Throughput 3079.2 lps (29.9 s, 2 samples) File Copy 1024 bufsize 2000 maxblocks 1165131.7 KBps (30.0 s, 2 samples) File Copy 256 bufsize 500 maxblocks 301810.9 KBps (30.0 s, 2 samples) File Copy 4096 bufsize 8000 maxblocks 3941914.2 KBps (30.0 s, 2 samples) Pipe Throughput 1758248.2 lps (10.0 s, 7 samples) Pipe-based Context Switching 291597.9 lps (10.0 s, 7 samples) Process Creation 19583.2 lps (30.0 s, 2 samples) Shell Scripts (1 concurrent) 6154.6 lpm (60.0 s, 2 samples) Shell Scripts (8 concurrent) 883.8 lpm (60.1 s, 2 samples) System Call Overhead 1298700.8 lps (10.0 s, 7 samples) System Benchmarks Index Values BASELINE RESULT INDEX Dhrystone 2 using register variables 116700.0 54639330.7 4682.0 Double-Precision Whetstone 55.0 13755.0 2500.9 Execl Throughput 43.0 3079.2 716.1 File Copy 1024 bufsize 2000 maxblocks 3960.0 1165131.7 2942.3 File Copy 256 bufsize 500 maxblocks 1655.0 301810.9 1823.6 File Copy 4096 bufsize 8000 maxblocks 5800.0 3941914.2 6796.4 Pipe Throughput 12440.0 1758248.2 1413.4 Pipe-based Context Switching 4000.0 291597.9 729.0 Process Creation 126.0 19583.2 1554.2 Shell Scripts (1 concurrent) 42.4 6154.6 1451.5 Shell Scripts (8 concurrent) 6.0 883.8 1473.0 System Call Overhead 15000.0 1298700.8 865.8 ======== System Benchmarks Index Score 1763.8
まとめ
これらのベンチマークによってどちらが良いという結論は特にありません。コスト、性能、アーキテクチャで適材適所で選択してください。