VPS

VPS比較で使っている指標Unixbenchとは何か、何故重要か

文章目的

このサイトでサーバーの性能の比較に使っているUnixbenchとは何を意味する指標なのか、その数値がサーバー選びで何故重要なのかを説明させて頂きます。

Unixbenchの数字は何を表す?

Georgeと呼ばれるSPARCstation 20/61(CPU: superSPARC+ 60MHz / メモリ: 128MB)という昔のサーバーの性能を10とした場合の数値。
Unixbenchの値が100ならGeorgeの10倍の性能を発揮している事になる。
つまり、Unixbenchの値が大きい程、システム全体としての性能が良いという事になる。

CPUの数が同じでも、性能は測ってみないと分からないので、その数値と値段を比べた価格対性能比がVPS選びでは重要になる。
なので、費用対効果が高いVPSやクラウドのサーバーを選ぶという事は、1円あたりのUnixbenchの値がより高い物を選ぶ事が基本となる。
その上で、後はディスク単価・メモリ単価も見ていき、自分のニーズにあったサーバーを選ぶ。

テストの内容は以下の通りで、ハードウェア、OS全体がスコアに影響する指標になっている。

テスト名テストの内容
Dhrystone文字列の処理性能=>HW/SW全体の設計、コンパイラー/リンカーのオプション、コード最適化、メモリーキャッシュ、待機状況、整数のデータタイプが影響

[英語原文]
Developed by Reinhold Weicker in 1984. This benchmark is used to measure and compare the performance of computers. The test focuses on string handling, as there are no floating point operations. It is heavily influenced by hardware and software design, compiler and linker options, code optimization, cache memory, wait states, and integer data types.

Whetstone浮動小数点数演算の効率=>OSとCPUの処理性能

[英語原文]
This test measures the speed and efficiency of floating-point operations. This test contains several modules that are meant to represent a mix of operations typically performed in scientific applications. A wide variety of C functions including sin, cos, sqrt, exp, and log are used as well as integer and floating-point math operations, array accesses, conditional branches, and procedure calls. This test measure both integer and floating-point arithmetic.

execl Throughputexeclというシステムコールの性能=>OSとCPUの処理性能

[英語原文]
This test measures the number of execl calls that can be performed per second. execl is part of the exec family of functions that replaces the current process image with a new process image. It and many other similar commands are front ends for the function execve().

File Copyファイルの読み書き速度

[英語原文]
This measures the rate at which data can be transferred from one file to another, using various buffer sizes. The file read, write and copy tests capture the number of characters that can be written, read and copied in a specified time (default is 10 seconds).

Pipe Throughputパイプ処理性能=>OSとCPUの処理性能

[英語原文]
A pipe is the simplest form of communication between processes. Pipe throughput is the number of times (per second) a process can write 512 bytes to a pipe and read them back. The pipe throughput test has no real counterpart in real-world programming.

Pipe-based Context Switchingプロセスの切り替わり性能=>OSとCPUの処理性能

[英語原文]
This test measures the number of times two processes can exchange an increasing integer through a pipe. The pipe-based context switching test is more like a real-world application. The test program spawns a child process with which it carries on a bi-directional pipe conversation.

Process Creationプロセスのフォーク性能=>OSとCPUの処理性能

[英語原文]
This test measure the number of times a process can fork and reap a child that immediately exits. Process creation refers to actually creating process control blocks and memory allocations for new processes, so this applies directly to memory bandwidth. Typically, this benchmark would be used to compare various implementations of operating system process creation calls.

Shell Scripts Shellスクリプトの実行性能=>OSとCPUの処理性能

[英語原文]
The shells scripts test measures the number of times per minute a process can start and reap a set of one, two, four and eight concurrent copies of a shell scripts where the shell script applies a series of transformation to a data file.

System Call Overheadシステムコールの性能=>OSとCPUの処理性能

[英語原文]
This estimates the cost of entering and leaving the operating system kernel, i.e., the overhead for performing a system call. It consists of a simple program repeatedly calling the getpid (which returns the process id of the calling process) system call. The time to execute such calls is used to estimate the cost of entering and exiting the kernel.

Graphical Tests 2Dと3Dの性能テスト=>HWとドライバーの性能

[英語原文]
Both 2D and 3D graphical tests are provided; at the moment, the 3D suite in particular is very limited, consisting of the ubgears program. These tests are intended to provide a very rough idea of the system’s 2D and 3D graphics performance. Bear in mind, of course, that the reported performance will depend not only on hardware, but on whether your system has appropriate drivers for it


Unixbenchの実行結果例

以下のような内容が出力される。
CPU性能の要素が大きいので、単一CPUと複数のCPUでの性能が表示される。

   #    #  #    #  #  #    #          #####   ######  #    #   ####   #    #
   #    #  ##   #  #   #  #           #    #  #       ##   #  #    #  #    #
   #    #  # #  #  #    ##            #####   #####   # #  #  #       ######
   #    #  #  # #  #    ##            #    #  #       #  # #  #       #    #
   #    #  #   ##  #   #  #           #    #  #       #   ##  #    #  #    #
    ####   #    #  #  #    #          #####   ######  #    #   ####   #    #

   Version 5.1.3                      Based on the Byte Magazine Unix Benchmark

   Multi-CPU version                  Version 5 revisions by Ian Smith,
                                      Sunnyvale, CA, USA
   January 13, 2011                   johantheghost at yahoo period com

------------------------------------------------------------------------------
   Use directories for:
      * File I/O tests (named fs***) = /root/bench/byte-unixbench/UnixBench/tmp
      * Results                      = /root/bench/byte-unixbench/UnixBench/results
------------------------------------------------------------------------------


1 x Dhrystone 2 using register variables  1 2 3 4 5 6 7 8 9 10

1 x Double-Precision Whetstone  1 2 3 4 5 6 7 8 9 10

1 x Execl Throughput  1 2 3

1 x File Copy 1024 bufsize 2000 maxblocks  1 2 3

1 x File Copy 256 bufsize 500 maxblocks  1 2 3

1 x File Copy 4096 bufsize 8000 maxblocks  1 2 3

1 x Pipe Throughput  1 2 3 4 5 6 7 8 9 10

1 x Pipe-based Context Switching  1 2 3 4 5 6 7 8 9 10

1 x Process Creation  1 2 3

1 x System Call Overhead  1 2 3 4 5 6 7 8 9 10

1 x Shell Scripts (1 concurrent)  1 2 3

1 x Shell Scripts (8 concurrent)  1 2 3

4 x Dhrystone 2 using register variables  1 2 3 4 5 6 7 8 9 10

4 x Double-Precision Whetstone  1 2 3 4 5 6 7 8 9 10

4 x Execl Throughput  1 2 3

4 x File Copy 1024 bufsize 2000 maxblocks  1 2 3

4 x File Copy 256 bufsize 500 maxblocks  1 2 3

4 x File Copy 4096 bufsize 8000 maxblocks  1 2 3

4 x Pipe Throughput  1 2 3 4 5 6 7 8 9 10

4 x Pipe-based Context Switching  1 2 3 4 5 6 7 8 9 10

4 x Process Creation  1 2 3

4 x System Call Overhead  1 2 3 4 5 6 7 8 9 10

4 x Shell Scripts (1 concurrent)  1 2 3

4 x Shell Scripts (8 concurrent)  1 2 3

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: centos-g-4vcpu-16gb-nyc1-01: GNU/Linux
   OS: GNU/Linux -- 3.10.0-862.2.3.el7.x86_64 -- #1 SMP Wed May 9 18:05:47 UTC 2018
   Machine: x86_64 (x86_64)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Xeon(R) Platinum 8168 CPU @ 2.70GHz (5387.3 bogomips)
          x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   CPU 1: Intel(R) Xeon(R) Platinum 8168 CPU @ 2.70GHz (5387.3 bogomips)
          x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   CPU 2: Intel(R) Xeon(R) Platinum 8168 CPU @ 2.70GHz (5387.3 bogomips)
          x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   CPU 3: Intel(R) Xeon(R) Platinum 8168 CPU @ 2.70GHz (5387.3 bogomips)
          x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   01:59:41 up 3 min,  1 user,  load average: 0.21, 0.18, 0.08; runlevel 2019-02-27

------------------------------------------------------------------------
Benchmark Run: 水  2月 27 2019 01:59:41 - 02:28:29
4 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       42648481.9 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     3657.7 MWIPS (14.4 s, 7 samples)
Execl Throughput                                928.4 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        504053.2 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          128658.5 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       1724224.1 KBps  (30.0 s, 2 samples)
Pipe Throughput                              629775.4 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 146018.4 lps   (10.0 s, 7 samples)
Process Creation                               5311.6 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   3139.2 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   2442.2 lpm   (60.0 s, 2 samples)
System Call Overhead                         484943.0 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   42648481.9   3654.5
Double-Precision Whetstone                       55.0       3657.7    665.0
Execl Throughput                                 43.0        928.4    215.9
File Copy 1024 bufsize 2000 maxblocks          3960.0     504053.2   1272.9
File Copy 256 bufsize 500 maxblocks            1655.0     128658.5    777.4
File Copy 4096 bufsize 8000 maxblocks          5800.0    1724224.1   2972.8
Pipe Throughput                               12440.0     629775.4    506.3
Pipe-based Context Switching                   4000.0     146018.4    365.0
Process Creation                                126.0       5311.6    421.6
Shell Scripts (1 concurrent)                     42.4       3139.2    740.4
Shell Scripts (8 concurrent)                      6.0       2442.2   4070.3
System Call Overhead                          15000.0     484943.0    323.3
                                                                   ========
System Benchmarks Index Score                                         836.4

------------------------------------------------------------------------
Benchmark Run: 水  2月 27 2019 02:28:29 - 02:57:17
4 CPUs in system; running 4 parallel copies of tests

Dhrystone 2 using register variables      170132750.7 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                    14686.1 MWIPS (14.3 s, 7 samples)
Execl Throughput                              11938.7 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks       1014899.3 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          270994.9 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       3407898.7 KBps  (30.0 s, 2 samples)
Pipe Throughput                             2514818.0 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 610702.4 lps   (10.0 s, 7 samples)
Process Creation                              35845.6 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                  19810.5 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   2789.8 lpm   (60.0 s, 2 samples)
System Call Overhead                        1810556.8 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0  170132750.7  14578.6
Double-Precision Whetstone                       55.0      14686.1   2670.2
Execl Throughput                                 43.0      11938.7   2776.5
File Copy 1024 bufsize 2000 maxblocks          3960.0    1014899.3   2562.9
File Copy 256 bufsize 500 maxblocks            1655.0     270994.9   1637.4
File Copy 4096 bufsize 8000 maxblocks          5800.0    3407898.7   5875.7
Pipe Throughput                               12440.0    2514818.0   2021.6
Pipe-based Context Switching                   4000.0     610702.4   1526.8
Process Creation                                126.0      35845.6   2844.9
Shell Scripts (1 concurrent)                     42.4      19810.5   4672.3
Shell Scripts (8 concurrent)                      6.0       2789.8   4649.7
System Call Overhead                          15000.0    1810556.8   1207.0
                                                                   ========
System Benchmarks Index Score                                        3036.2

Windowsの場合は?

Windowsの場合はPower shell経由で

winsat formal

というコマンドを通じて、コンピューターのパフォーマンス計測が出来る。

Get-CimInstance Win32_WinSat

と打って、見やすい形で結果を確認する。

おまけ

ディスクのベンチマーク

dd if=/dev/zero of=test bs=1M count=1000;rm -f test;
VPS関連最新ニュース
2023/12/06 「MariaDB vs MySQL vs PostgreSQL比較」の最新版デフォルトの比較ベンチマーク結果更新
2023/12/04 トップページも指標をGeekBench5に統一。詳しくは「Geekbenchとは何か」という記事を参照
2023/12/03 「クラウド環境にはどのOSが最適?LinuxのOS(ディストリビューション)の選び方」という記事を提供 [更に読む]
キャンペーン中
〜2024/1/31 さくらのVPS[解説]が容量倍増の変更手数料を無料に
〜2023/12/22 16:00 ConoHa[解説] v3が初回の長期割に対し更に割引: 6ヶ月以上でメモリ1GB以下は9%、2GB以上は何と36%割引
〜2023/12/18 XServer VPS[解説]が初回の長期割に対し更に割引: 1年:25%、2年30%、3年:35%