LoginSignup
0
0

UTMでARMとx64とを比較

Posted at

MacのUTMにて仮想環境を比較

ようやくAppleシリコン搭載のMacを購入。仮想環境を構築できるUTMでは、ネイティブであるARMだけではなく、エミュレーション(qemu)によるx64(Intel)も実行可能であるため、両者の比較を行ってみた。

対象

  • ARM: ubuntu-22.04.3-live-server-arm64.iso
  • x64: ubuntu-22.04.3-live-server-amd64.iso

方法

Unixbench

Unixで有名どころのベンチマーク。こちらのリソースを利用。

起動時間

正確ではないが、カーネルログ(コマンド”dmesg”)で落ち着くまでの所要時間で比較。

ネットワークスタック

外部通信の比較は意味がないと考え、ループバックを用いたpingおよびiperf3(TCP)を採用。

$ ping -c 100 127.0.0.1
$ iperf3 -s # Server

$ iperf3 -c 127.0.0.1 -t 100 # Client

結果サンプル

Unixbench

最後に表示されるスコアを使う。

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0    5879619.6    503.8
Double-Precision Whetstone                       55.0        658.0    119.6
Execl Throughput                                 43.0        640.4    148.9
File Copy 1024 bufsize 2000 maxblocks          3960.0     266587.5    673.2
File Copy 256 bufsize 500 maxblocks            1655.0      74073.2    447.6
File Copy 4096 bufsize 8000 maxblocks          5800.0     755574.9   1302.7
Pipe Throughput                               12440.0     387017.2    311.1
Pipe-based Context Switching                   4000.0      14765.8     36.9
Process Creation                                126.0       1417.2    112.5
Shell Scripts (1 concurrent)                     42.4       1595.3    376.2
Shell Scripts (8 concurrent)                      6.0        210.3    350.5
System Call Overhead                          15000.0     489556.4    326.4
                                                                   ========
System Benchmarks Index Score                                         276.1

上記の場合、276.1を採用

起動時間

...
[    3.150017] sr 0:0:0:0: [sr0] scsi3-mmc drive: 16x/50x cd/rw xa/form2 cdda tray
[    3.150023] cdrom: Uniform CD-ROM driver Revision: 3.20
[    3.150903] sr 0:0:0:0: Attached scsi CD-ROM sr0
[   13.263421] rfkill: input handler disabled

上記の場合、3.15(秒?)とする。

...
[   17.259990] NET: Registered PF_QIPCRTR protocol family
[   18.270481] e1000: enp0s1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[   18.271383] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s1: link becomes ready
[   43.567596] rfkill: input handler disabled

上記の場合、18.27(秒?)とする。

ping

最終結果の平均値を利用。

--- 127.0.0.1 ping statistics ---
100 packets transmitted, 100 received, 0% packet loss, time 99375ms
rtt min/avg/max/mdev = 0.146/0.690/1.321/0.238 ms

上記の場合、0.690msを採用。

iperf3

Server側で表示される最終結果を利用。

[ ID] Interval           Transfer     Bitrate
[  5]   0.00-100.00 sec  1.65 TBytes   145 Gbits/sec                  receiver

上記の場合、145Gbits/secを採用。

比較&考察

数回行った平均値を下記(pingやiperf3は最終結果自体が平均値とみなす)。

Unixbench(Score) 起動時間(秒?) ping(ms) iperf3(Gbits/s)
ARM 10755 3.08 0.108 145
x64 273 18.16 0.690 3.11

Unixbenchやiperf3の結果を見ると、40倍程度の差があり、体感(操作)的にもx64は遅く感じる。やはり、エミュレーションの限界であろうか、、。

EOF

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0