2019年9月に「Always Free」プランが発表された Oracle Cloud Infrastructure (OCI) 。1/8 OCPU という小さなスペックながら、2台の Compute Instance が永久無料で立てられるので、個人利用では重宝します。
一方、 Google Cloud Platform (GCP) には、以前から永久無料で利用できる Google Compute Engine が存在します。f1-micro という最小スペックの VM インスタンスを1台、永久無料で立てられます。
今回は OCI と GCP の永久無料枠で作成できる VM のスペックを UnixBench というベンチマークツールで簡易的に計測してみました。
GCP の検証
まずは GCP (GCE) の検証から行っていきます。
永久無料枠の確認
永久無料で作成できる GCE のスペックを確認します。
こちらの公式ページによると、
- f1-micro インスタンス
- HDD 30GB
- 次のいずれかのリージョンに作成すること : us-west1・us-central1・us-east1
といったスペックになります。日本リージョンが選べないので、ネットワークの影響を受けそうです。今回はなるべく日本から近い us-west-1 リージョンを選びました。OS は CentOS Linux 7 にします。
スペックの確認
作成したインスタンスに SSH 接続し、各種スペックをコマンドで確認します。
- OS・カーネル
- CentOS 7 を選択しています
$ cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
$ cat /proc/version
Linux version 3.10.0-957.12.2.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) ) #1 SMP Tue May 14 21:24:32 UTC 2019
- CPU
- Intel Xeon プロセッサの論理 CPU が1スレッド割り当てられているようです
$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 79
model name : Intel(R) Xeon(R) CPU @ 2.20GHz
stepping : 0
microcode : 0x1
cpu MHz : 2200.000
cache size : 56320 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt arat md_clear spec_ctrl intel_stibp arch_capabilities
bogomips : 4400.00
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
$ lscpu
アーキテクチャ: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 1
On-line CPU(s) list: 0
コアあたりのスレッド数:1
ソケットあたりのコア数:1
Socket(s): 1
NUMAノード: 1
ベンダーID: GenuineIntel
CPUファミリー: 6
モデル: 79
Model name: Intel(R) Xeon(R) CPU @ 2.20GHz
ステッピング: 0
CPU MHz: 2200.000
BogoMIPS: 4400.00
ハイパーバイザーベンダー:KVM
仮想化タイプ: 完全仮想化
L1d キャッシュ: 32K
L1i キャッシュ: 32K
L2 キャッシュ: 256K
L3 キャッシュ: 56320K
NUMAノード 0 CPU: 0
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt arat md_clear spec_ctrl intel_stibp arch_capabilitie
- メモリ
Total online memory
を見ると、640MB らしいですね
$ cat /proc/meminfo
MemTotal: 601324 kB
MemFree: 97592 kB
MemAvailable: 313568 kB
Buffers: 0 kB
Cached: 321924 kB
SwapCached: 0 kB
Active: 286112 kB
Inactive: 122688 kB
Active(anon): 100956 kB
Inactive(anon): 19128 kB
Active(file): 185156 kB
Inactive(file): 103560 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 86908 kB
Mapped: 8316 kB
Shmem: 33208 kB
Slab: 41816 kB
SReclaimable: 22288 kB
SUnreclaim: 19528 kB
KernelStack: 1696 kB
PageTables: 12756 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 300660 kB
Committed_AS: 375508 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 5088 kB
VmallocChunk: 34359731200 kB
HardwareCorrupted: 0 kB
AnonHugePages: 4096 kB
CmaTotal: 0 kB
CmaFree: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 53236 kB
DirectMap2M: 575488 kB
DirectMap1G: 0 kB
$ lsmem
RANGE SIZE STATE REMOVABLE BLOCK
0x0000000000000000-0x0000000027ffffff 640M online no 0-4
Memory block size: 128M
Total online memory: 640M
Total offline memory: 0B
- ディスク
- HDD 30GB 分です
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 30G 0 disk
└─sda1 8:1 0 30G 0 part /
$ fdisk -l
Disk /dev/sda: 32.2 GB, 32212254720 bytes, 62914560 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O サイズ (最小 / 推奨): 4096 バイト / 4096 バイト
Disk label type: dos
ディスク識別子: 0x0009ab11
デバイス ブート 始点 終点 ブロック Id システム
/dev/sda1 * 2048 62910539 31454246 83 Linux
$ df -hT
ファイルシス タイプ サイズ 使用 残り 使用% マウント位置
/dev/sda1 xfs 30G 2.6G 28G 9% /
devtmpfs devtmpfs 287M 0 287M 0% /dev
tmpfs tmpfs 294M 0 294M 0% /dev/shm
tmpfs tmpfs 294M 33M 262M 12% /run
tmpfs tmpfs 294M 0 294M 0% /sys/fs/cgroup
tmpfs tmpfs 59M 0 59M 0% /run/user/1000
UnixBench をインストールする
それでは、ベンチマークツールの UnixBench をインストールしてみます。UnixBench 自体の説明は後述します。
root ユーザに切り替えて次のように作業していきます。
# インストールに必要なライブラリをインストールする
$ yum install -y gcc perl-Time-HiRes git
# UnixBench を GitHub からダウンロードする
$ git clone https://github.com/kdlucas/byte-unixbench
# 次のように実行できる
$ cd byte-unixbench/UnixBench
$ ./Run
./Run
で実行できますが、標準では複数のテスト項目をそれぞれ10回ずつ実行するので、30分〜1時間くらいかかったりします。オプション引数で繰り返し実行する回数を指定できるので、とりあえず試してみる場合は、次のように -i
オプションを指定して各項目を1回だけテストするようにしてみましょう。
$ ./Run -i 1
ちなみに GCE で上のとおり1回だけ実行したところ、約8分ほどでベンチマークが終了しました。結果は後でお見せします。
なお、 ./Run
を実行すると
sh: 3dinfo: command not found
といったエラーメッセージが途中に出力されますが、無視して大丈夫です (GUI を持つ環境でのベンチマークに使用されるコマンドのようで、CUI しかない今回の環境ではなくても問題ありません)。
OCI の検証
続いて OCI の無料インスタンスを検証します。
永久無料枠の確認
永久無料で作成できる OCI Compute Instance のスペックを確認します。
こちらの公式ページによると、
- 1/8 OCPU
- メモリ 1GB
というスペックになります。上のページには明確な記載はありませんが、デフォルトスペックのまま作成すると、Block Volume (Boot Volume) の容量は 46.6GB になります。
OCI では RedHat Enterprise Linux をベースとした「Oracle Linux」という OS を選べるので、今回はこちらを選択しました。
スペックの確認
作成したインスタンスに SSH 接続し、各種スペックをコマンドで確認します。
- OS・カーネル
- GCE では CentOS 7 を使っていましたが、OCI では Oracle Linux 7 を使用しています
$ cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="7.7"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.7"
PRETTY_NAME="Oracle Linux Server 7.7"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:7:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"
ORACLE_BUGZILLA_PRODUCT_VERSION=7.7
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=7.7
$ cat /proc/version
Linux version 4.14.35-1902.5.2.2.el7uek.x86_64 (mockbuild@jenkins-10-147-72-125-7c8f8a55-5830-4984-91ee-384b1f56e7c3) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-16.0.3) (GCC)) #2 SMP Fri Sep 20 00:39:39 GMT 2019
- CPU
- AMD EPYC 7551 という CPU の論理 CPU が2スレッド割り当てられています
$ cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 23
model : 1
model name : AMD EPYC 7551 32-Core Processor
stepping : 2
microcode : 0x1000065
cpu MHz : 1996.249
cache size : 512 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl xtopology cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibpb vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 virt_ssbd arat
bugs : fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass
bogomips : 3992.49
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : AuthenticAMD
cpu family : 23
model : 1
model name : AMD EPYC 7551 32-Core Processor
stepping : 2
microcode : 0x1000065
cpu MHz : 1996.249
cache size : 512 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl xtopology cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibpb vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 virt_ssbd arat
bugs : fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass
bogomips : 3992.49
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:
$ lscpu
アーキテクチャ: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 2
On-line CPU(s) list: 0,1
コアあたりのスレッド数:2
ソケットあたりのコア数:1
Socket(s): 1
NUMAノード: 1
ベンダーID: AuthenticAMD
CPUファミリー: 23
モデル: 1
Model name: AMD EPYC 7551 32-Core Processor
ステッピング: 2
CPU MHz: 1996.249
BogoMIPS: 3992.49
ハイパーバイザーベンダー:KVM
仮想化タイプ: 完全仮想化
L1d キャッシュ: 64K
L1i キャッシュ: 64K
L2 キャッシュ: 512K
L3 キャッシュ: 16384K
NUMAノード 0 CPU: 0,1
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl xtopology cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibpb vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 virt_ssbd arat
- メモリ
Total online memory
を見ると確かに 1GB です
$ cat /proc/meminfo
MemTotal: 994512 kB
MemFree: 201420 kB
MemAvailable: 468164 kB
Buffers: 12 kB
Cached: 418696 kB
SwapCached: 6496 kB
Active: 310044 kB
Inactive: 313380 kB
Active(anon): 106536 kB
Inactive(anon): 147428 kB
Active(file): 203508 kB
Inactive(file): 165952 kB
Unevictable: 7936 kB
Mlocked: 7936 kB
SwapTotal: 8388604 kB
SwapFree: 8316668 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 210144 kB
Mapped: 39676 kB
Shmem: 43672 kB
Slab: 122096 kB
SReclaimable: 49984 kB
SUnreclaim: 72112 kB
KernelStack: 2576 kB
PageTables: 7080 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 8885860 kB
Committed_AS: 969512 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
HardwareCorrupted: 0 kB
AnonHugePages: 94208 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
CmaTotal: 0 kB
CmaFree: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 258916 kB
DirectMap2M: 786432 kB
DirectMap1G: 0 kB
$ lsmem
RANGE SIZE STATE REMOVABLE BLOCK
0x0000000000000000-0x000000003fffffff 1G online no 0-7
Memory block size: 128M
Total online memory: 1G
Total offline memory: 0B
- ディスク
- デフォルトのまま作ったので 46.6GB です
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 46.6G 0 disk
├─sda2 8:2 0 8G 0 part [SWAP]
├─sda3 8:3 0 38.4G 0 part /
└─sda1 8:1 0 200M 0 part /boot/efi
$ fdisk -l
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Disk /dev/sda: 50.0 GB, 50010783744 bytes, 97677312 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O サイズ (最小 / 推奨): 4096 バイト / 1048576 バイト
Disk label type: gpt
Disk identifier: 55333A97-0254-4C27-AE53-78CF37C38A1E
# Start End Size Type Name
1 2048 411647 200M EFI System EFI System Partition
2 411648 17188863 8G Linux swap
3 17188864 97675263 38.4G Microsoft basic
$ df -hT
ファイルシス タイプ サイズ 使用 残り 使用% マウント位置
devtmpfs devtmpfs 459M 0 459M 0% /dev
tmpfs tmpfs 486M 0 486M 0% /dev/shm
tmpfs tmpfs 486M 56M 431M 12% /run
tmpfs tmpfs 486M 0 486M 0% /sys/fs/cgroup
/dev/sda3 xfs 39G 3.2G 36G 9% /
/dev/sda1 vfat 200M 9.7M 191M 5% /boot/efi
tmpfs tmpfs 98M 0 98M 0% /run/user/1000
UnixBench をインストールする
UnixBench のインストール方法は GCE と全く同じように出来ました。root ユーザに切り替えて次のように作業していきます。
# インストールに必要なライブラリをインストールする
$ yum install -y gcc perl-Time-HiRes git
# UnixBench を GitHub からダウンロードする
$ git clone https://github.com/kdlucas/byte-unixbench
# 次のように実行できる
$ cd byte-unixbench/UnixBench
$ ./Run
こちらは仮想 CPU が2コアあるので、
$ ./Run -i 1
で1回だけ実行した場合でも、ベンチマーク終了までに14・15分ほどかかりました。
仮想2コアの OCI で1回だけベンチマークを回した時の処理時間が、仮想1コアの GCE のちょうど2倍くらいになっている、というところで、なんとなくスペックの感覚が分かるかもしれません。
ベンチマーク結果を比較する
それでは今後は、2台のマシンで $ ./Run
を実行し、各テスト項目を10回ずつ実行させます。GCE では35分程、OCI では55分程度かかりました。まずはそれぞれの結果をそのまま貼り付けます。
- GCE
BYTE UNIX Benchmarks (Version 5.1.3)
System: gce: GNU/Linux
OS: GNU/Linux -- 3.10.0-957.12.2.el7.x86_64 -- #1 SMP Tue May 14 21:24:32 UTC 2019
Machine: x86_64 (x86_64)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: Intel(R) Xeon(R) CPU @ 2.20GHz (4400.0 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
11:09:48 up 199 days, 13:48, 1 user, load average: 0.00, 0.03, 0.12; runlevel 2019-05-25
------------------------------------------------------------------------
Benchmark Run: 水 12月 11 2019 11:09:48 - 11:40:00
1 CPU in system; running 1 parallel copy of tests
Dhrystone 2 using register variables 23103289.5 lps (10.0 s, 7 samples)
Double-Precision Whetstone 848.1 MWIPS (18.7 s, 7 samples)
Execl Throughput 792.5 lps (29.5 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 219410.8 KBps (30.2 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 65312.6 KBps (30.1 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 484991.8 KBps (30.1 s, 2 samples)
Pipe Throughput 190043.1 lps (10.0 s, 7 samples)
Pipe-based Context Switching 42573.7 lps (10.1 s, 7 samples)
Process Creation 2178.9 lps (30.1 s, 2 samples)
Shell Scripts (1 concurrent) 571.6 lpm (60.2 s, 2 samples)
Shell Scripts (8 concurrent) 76.3 lpm (60.2 s, 2 samples)
System Call Overhead 136303.4 lps (10.1 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 23103289.5 1979.7
Double-Precision Whetstone 55.0 848.1 154.2
Execl Throughput 43.0 792.5 184.3
File Copy 1024 bufsize 2000 maxblocks 3960.0 219410.8 554.1
File Copy 256 bufsize 500 maxblocks 1655.0 65312.6 394.6
File Copy 4096 bufsize 8000 maxblocks 5800.0 484991.8 836.2
Pipe Throughput 12440.0 190043.1 152.8
Pipe-based Context Switching 4000.0 42573.7 106.4
Process Creation 126.0 2178.9 172.9
Shell Scripts (1 concurrent) 42.4 571.6 134.8
Shell Scripts (8 concurrent) 6.0 76.3 127.2
System Call Overhead 15000.0 136303.4 90.9
========
System Benchmarks Index Score 244.2
- OCI
- OCI は2コア割り当てられているので、単一コアの結果と、全コアの結果とで、2つの結果が表示されます
BYTE UNIX Benchmarks (Version 5.1.3)
System: oci: GNU/Linux
OS: GNU/Linux -- 4.14.35-1902.5.2.2.el7uek.x86_64 -- #2 SMP Fri Sep 20 00:39:39 GMT 2019
Machine: x86_64 (x86_64)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: AMD EPYC 7551 32-Core Processor (3992.5 bogomips)
Hyper-Threading, x86-64, MMX, AMD MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
CPU 1: AMD EPYC 7551 32-Core Processor (3992.5 bogomips)
Hyper-Threading, x86-64, MMX, AMD MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
11:09:43 up 68 days, 20:29, 1 user, load average: 0.02, 0.63, 1.07; runlevel 2019-10-03
------------------------------------------------------------------------
Benchmark Run: 水 12月 11 2019 11:09:43 - 11:37:38
2 CPUs in system; running 1 parallel copy of tests
Dhrystone 2 using register variables 12221596.8 lps (10.0 s, 7 samples)
Double-Precision Whetstone 1810.1 MWIPS (9.6 s, 7 samples)
Execl Throughput 1467.7 lps (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 288014.9 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 76655.5 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 793446.8 KBps (30.0 s, 2 samples)
Pipe Throughput 453280.9 lps (10.0 s, 7 samples)
Pipe-based Context Switching 25922.3 lps (10.0 s, 7 samples)
Process Creation 1651.2 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 1957.0 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 309.5 lpm (60.2 s, 2 samples)
System Call Overhead 608527.3 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 12221596.8 1047.3
Double-Precision Whetstone 55.0 1810.1 329.1
Execl Throughput 43.0 1467.7 341.3
File Copy 1024 bufsize 2000 maxblocks 3960.0 288014.9 727.3
File Copy 256 bufsize 500 maxblocks 1655.0 76655.5 463.2
File Copy 4096 bufsize 8000 maxblocks 5800.0 793446.8 1368.0
Pipe Throughput 12440.0 453280.9 364.4
Pipe-based Context Switching 4000.0 25922.3 64.8
Process Creation 126.0 1651.2 131.1
Shell Scripts (1 concurrent) 42.4 1957.0 461.6
Shell Scripts (8 concurrent) 6.0 309.5 515.9
System Call Overhead 15000.0 608527.3 405.7
========
System Benchmarks Index Score 398.8
------------------------------------------------------------------------
Benchmark Run: 水 12月 11 2019 11:37:38 - 12:05:47
2 CPUs in system; running 2 parallel copies of tests
Dhrystone 2 using register variables 14083940.1 lps (10.0 s, 7 samples)
Double-Precision Whetstone 2044.0 MWIPS (10.0 s, 7 samples)
Execl Throughput 1786.9 lps (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 313838.1 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 82689.2 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 833086.6 KBps (30.1 s, 2 samples)
Pipe Throughput 528729.6 lps (10.0 s, 7 samples)
Pipe-based Context Switching 86881.3 lps (10.0 s, 7 samples)
Process Creation 5149.4 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 2033.5 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 338.4 lpm (60.2 s, 2 samples)
System Call Overhead 708171.0 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 14083940.1 1206.9
Double-Precision Whetstone 55.0 2044.0 371.6
Execl Throughput 43.0 1786.9 415.6
File Copy 1024 bufsize 2000 maxblocks 3960.0 313838.1 792.5
File Copy 256 bufsize 500 maxblocks 1655.0 82689.2 499.6
File Copy 4096 bufsize 8000 maxblocks 5800.0 833086.6 1436.4
Pipe Throughput 12440.0 528729.6 425.0
Pipe-based Context Switching 4000.0 86881.3 217.2
Process Creation 126.0 5149.4 408.7
Shell Scripts (1 concurrent) 42.4 2033.5 479.6
Shell Scripts (8 concurrent) 6.0 338.4 564.0
System Call Overhead 15000.0 708171.0 472.1
========
System Benchmarks Index Score 531.7
ここで UnixBench の見方を押さえておきます。
UnixBench は複数のテストを実施し、テスト項目ごとにスコアを出力してくれます。結果の最後に出てくる INDEX
列の数値がスコアです。テスト項目ごとに意味を押さえながら、スコアを横並びにしてみます。
テスト項目 | GCE (全1コア) | OCI (1コア) | OCI (全2コア) |
---|---|---|---|
Dhrystone 2 using register variables 整数の演算処理性能 |
1979.7 | 1047.3 | 1206.9 |
Double-Precision Whetstone 浮動小数点の演算処理性能 |
154.2 | 329.1 | 371.6 |
Execl Throughput システムコールの処理性能 |
184.3 | 341.3 | 415.6 |
File Copy 1024 bufsize 2000 maxblocks ファイルコピーによる CPU 性能 |
554.1 | 727.3 | 792.5 |
File Copy 256 bufsize 500 maxblocks ファイルコピーによる CPU 性能 |
394.6 | 463.2 | 499.6 |
File Copy 4096 bufsize 8000 maxblocks ファイルコピーによる CPU 性能 |
836.2 | 1368.0 | 1436.4 |
Pipe Throughput パイプの処理性能 |
152.8 | 364.4 | 425.0 |
Pipe-based Context Switching プロセス切替の処理性能 |
106.4 | 64.8 | 217.2 |
Process Creation プロセス作成の処理性能 |
172.9 | 131.1 | 408.7 |
Shell Scripts (1 concurrent) 単一シェルスクリプトの処理性能 |
134.8 | 461.6 | 479.6 |
Shell Scripts (8 concurrent) シェルスクリプトの並列処理性能 |
127.2 | 515.9 | 564.0 |
System Call Overhead システムコールの負荷試験 |
90.9 | 405.7 | 472.1 |
System Benchmarks Index Score 総合スコア |
244.2 | 398.8 | 531.7 |
GCE は1コア、OCI は2コアという仮想 CPU の違いがあるため、「GCE (全1コア)」と「OCI (全2コア)」を比べると OCI の圧勝 です。「Dhrystone 2 using register variables」というテスト項目だけ、スコア的に OCI が負けていますが、総合スコアでは2倍以上の数値になっています。
「GCE (全1コア)」と「OCI (1コア)」の単一コア同士でも比較してみます。単一コア同士でも OCI の方が性能が高いようです。「Pipe-based Context Switching」と「Process Creation」のみ OCI のスコアが負けていますが、その他の項目では4倍以上のスコアになっている項目もあり、総合スコアでは1.6倍ほどの値になっています。
まとめ
今回は「永久無料で作成できるクラウド VM」同士でベンチマークを比較しました。そもそものマシンスペックや OS イメージに差異があるため、性能に関して単純比較はできませんが、永久無料で作成できる VM としては、GCE よりも OCI の方が高性能な VM を作れることが確認できました。OCI はさらにこのスペックの VM を2台まで無料で作成できるので、よりお得に感じます。
マシンの性能は様々な要素に左右されるため、一概には言えませんが、UnixBench というツールによって性能を数値化でき、比較しやすくなることが確認できました。ただ、UnixBench のテスト項目を見ると CPU 性能に依存するテストが多いことが分かります。ネットワークの通信速度などはまた別の話になることに留意しましょう。
OCI は「Gen 2 Cloud」と呼ばれるクラウド基盤の構成を採用しており、ノイジーネイバー問題なども大きく解消されています。サーバ性能を使い切り、低いコストで高い効果を得られることが期待できます。OCI はまだまだ日本語文献が少ない印象がありますが、これからの普及に期待です。