no-image

Vultr / WebARENA 最安プランで UnixBench 比較

いくら軽量化した Linux といえど、最近はメモリ 512MB では物足りなく感じることも増えてきたので、料金ほぼそのままにメモリが倍である WebARENA への引越を検討したのがこの記事のきっかけです。

Vultr は Cloud Compute $3.5 のインスタンスで Debian 9.8, WebARENA は VPS クラウド 360円のインスタンスで Ubuntu 18.04 です。どちらも CPU の割当ては 1 コアです。メモリは Vultr が 512MB で WebARENA は 1024MB なので倍違います。

UnixBench の実行

$ sudo apt update
$ sudo apt install gcc make perl
$ curl -O https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/byte-unixbench/UnixBench5.1.3.tgz
$ tar xvzf UnixBench5.1.3.tgz
$ cd UnixBench
$ ./Run

Vultr $3.5

BYTE UNIX Benchmarks (Version 5.1.3)
System: dev.kuratsuki.net: GNU/Linux
OS: GNU/Linux -- 4.9.0-8-amd64 -- #1 SMP Debian 4.9.110-3+deb9u6 (2018-10-08)
Machine: x86_64 (unknown)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: Virtual CPU a7769a6388d5 (4788.9 bogomips)
x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
14:45:02 up 122 days, 7:32, 1 user, load average: 0.11, 0.04, 0.01; runlev el

Benchmark Run: Sat Mar 16 2019 14:45:02 - 15:13:06
1 CPU in system; running 1 parallel copy of tests
Dhrystone 2 using register variables 23742739.1 lps (10.0 s, 7 samples)
Double-Precision Whetstone 4097.1 MWIPS (10.0 s, 7 samples)
Execl Throughput 3088.4 lps (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 544312.7 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 154755.4 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 1057265.1 KBps (30.0 s, 2 samples)
Pipe Throughput 885230.4 lps (10.0 s, 7 samples)
Pipe-based Context Switching 109034.4 lps (10.0 s, 7 samples)
Process Creation 7718.8 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 5671.4 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 733.8 lpm (60.0 s, 2 samples)
System Call Overhead 655215.1 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 23742739.1 2034.5
Double-Precision Whetstone 55.0 4097.1 744.9
Execl Throughput 43.0 3088.4 718.2
File Copy 1024 bufsize 2000 maxblocks 3960.0 544312.7 1374.5
File Copy 256 bufsize 500 maxblocks 1655.0 154755.4 935.1
File Copy 4096 bufsize 8000 maxblocks 5800.0 1057265.1 1822.9
Pipe Throughput 12440.0 885230.4 711.6
Pipe-based Context Switching 4000.0 109034.4 272.6
Process Creation 126.0 7718.8 612.6
Shell Scripts (1 concurrent) 42.4 5671.4 1337.6
Shell Scripts (8 concurrent) 6.0 733.8 1223.0
System Call Overhead 15000.0 655215.1 436.8
========
System Benchmarks Index Score 880.3

WebARENA 360円

BYTE UNIX Benchmarks (Version 5.1.3)
System: 6v1ct8z4: GNU/Linux
OS: GNU/Linux -- 4.15.0-20-generic -- #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018
Machine: x86_64 (x86_64)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: Intel Xeon E312xx (Sandy Bridge) (4400.0 bogomips)
x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
14:43:30 up 33 min, 1 user, load average: 0.23, 0.33, 0.28; runlevel 5

Benchmark Run: Sat Mar 16 2019 14:43:30 - 15:11:36
1 CPU in system; running 1 parallel copy of tests
Dhrystone 2 using register variables 25630360.2 lps (10.0 s, 7 samples)
Double-Precision Whetstone 4104.1 MWIPS (9.9 s, 7 samples)
Execl Throughput 2701.9 lps (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 238080.4 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 63125.8 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 737936.9 KBps (30.0 s, 2 samples)
Pipe Throughput 301805.1 lps (10.0 s, 7 samples)
Pipe-based Context Switching 82337.4 lps (10.0 s, 7 samples)
Process Creation 7315.9 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 5463.5 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 719.2 lpm (60.0 s, 2 samples)
System Call Overhead 253811.9 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 25630360.2 2196.3
Double-Precision Whetstone 55.0 4104.1 746.2
Execl Throughput 43.0 2701.9 628.4
File Copy 1024 bufsize 2000 maxblocks 3960.0 238080.4 601.2
File Copy 256 bufsize 500 maxblocks 1655.0 63125.8 381.4
File Copy 4096 bufsize 8000 maxblocks 5800.0 737936.9 1272.3
Pipe Throughput 12440.0 301805.1 242.6
Pipe-based Context Switching 4000.0 82337.4 205.8
Process Creation 126.0 7315.9 580.6
Shell Scripts (1 concurrent) 42.4 5463.5 1288.6
Shell Scripts (8 concurrent) 6.0 719.2 1198.6
System Call Overhead 15000.0 253811.9 169.2
========
System Benchmarks Index Score 602.3

結果の比較

項目VultrWebARENAVultr 基準
Dhrystone 2 using register variables23742739.125630360.2108.0%
Double-Precision Whetstone4097.14104.1100.2%
Execl Throughput3088.42701.987.5%
File Copy 1024 bufsize 2000 maxblocks544312.7238080.443.7%
File Copy 256 bufsize 500 maxblocks154755.463125.840.8%
File Copy 4096 bufsize 8000 maxblocks1057265.1737936.969.8%
Pipe Throughput885230.4301805.134.1%
Pipe-based Context Switching109034.482337.475.5%
Process Creation7718.87315.994.8%
Shell Scripts (1 concurrent)5671.45463.596.3%
Shell Scripts (8 concurrent)733.8719.298.0%
System Call Overhead655215.1253811.938.7%
System Benchmarks Index Score880.3602.368.4%

Vultr を基準として見ると、全体的にかなりの性能劣化となりました。メモリ量をとるか処理速度をとるか、悩ましいところです。