VPSを借りたら、一度はベンチマークを計ってみたいですよね。Linuxには、有名な UnixBench がありますので、UnixBench の導入方法をご紹介します。
UnixBench の計測時間は、約1時間かかります。
UnixBenchをインストール
// UnixBench & 必要な物をインストール # apt-get install gcc make libx11-dev libgl1-mesa-dev libxext-dev perl perl-modules // 作業ディレクトリに移動 # cd /tmp // UnixBenchをダウンロード # wget http://byte-unixbench.googlecode.com/files/UnixBench5.1.3.tgz // 展開 # tar xvf UnixBench5.1.3.tgz // UnixBenchのディレクトリに移動 # cd UnixBench/ // コンパイル # make // UnixBench実行! # ./Run
実際に、UnixBench を実行してみましょう!
UnixBenchの結果例
さくらのVPS(v3) 2Gプラン 東京リージョンで、UnixBench を実行してみました。
======================================================================== BYTE UNIX Benchmarks (Version 5.1.3) System: www: GNU/Linux OS: GNU/Linux -- 3.2.0-4-amd64 -- #1 SMP Debian 3.2.57-3+deb7u2 Machine: x86_64 (unknown) Language: en_US.utf8 (charmap="ANSI_X3.4-1968", collate="ANSI_X3.4-1968") CPU 0: Intel Xeon E312xx (Sandy Bridge) (5000.2 bogomips) Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSCALL/SYSRET CPU 1: Intel Xeon E312xx (Sandy Bridge) (5000.2 bogomips) Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSCALL/SYSRET CPU 2: Intel Xeon E312xx (Sandy Bridge) (5000.2 bogomips) Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSCALL/SYSRET 21:02:58 up 3:03, 1 user, load average: 0.05, 0.03, 0.53; runlevel 2 ------------------------------------------------------------------------ Benchmark Run: 火 7月 01 2014 21:02:58 - 21:31:08 3 CPUs in system; running 1 parallel copy of tests Dhrystone 2 using register variables 28315241.8 lps (10.0 s, 7 samples) Double-Precision Whetstone 3144.3 MWIPS (9.9 s, 7 samples) Execl Throughput 2828.8 lps (30.0 s, 2 samples) File Copy 1024 bufsize 2000 maxblocks 946992.8 KBps (30.0 s, 2 samples) File Copy 256 bufsize 500 maxblocks 273665.0 KBps (30.0 s, 2 samples) File Copy 4096 bufsize 8000 maxblocks 1074727.6 KBps (30.0 s, 2 samples) Pipe Throughput 1998392.1 lps (10.0 s, 7 samples) Pipe-based Context Switching 20902.3 lps (10.0 s, 7 samples) Process Creation 6625.0 lps (30.0 s, 2 samples) Shell Scripts (1 concurrent) 8665.3 lpm (60.0 s, 2 samples) Shell Scripts (8 concurrent) 2461.8 lpm (60.0 s, 2 samples) System Call Overhead 3319004.6 lps (10.0 s, 7 samples) System Benchmarks Index Values BASELINE RESULT INDEX Dhrystone 2 using register variables 116700.0 28315241.8 2426.3 Double-Precision Whetstone 55.0 3144.3 571.7 Execl Throughput 43.0 2828.8 657.9 File Copy 1024 bufsize 2000 maxblocks 3960.0 946992.8 2391.4 File Copy 256 bufsize 500 maxblocks 1655.0 273665.0 1653.6 File Copy 4096 bufsize 8000 maxblocks 5800.0 1074727.6 1853.0 Pipe Throughput 12440.0 1998392.1 1606.4 Pipe-based Context Switching 4000.0 20902.3 52.3 Process Creation 126.0 6625.0 525.8 Shell Scripts (1 concurrent) 42.4 8665.3 2043.7 Shell Scripts (8 concurrent) 6.0 2461.8 4103.1 System Call Overhead 15000.0 3319004.6 2212.7 ======== System Benchmarks Index Score 1152.2 ------------------------------------------------------------------------ Benchmark Run: 火 7月 01 2014 21:31:08 - 21:59:19 3 CPUs in system; running 3 parallel copies of tests Dhrystone 2 using register variables 84626036.2 lps (10.0 s, 7 samples) Double-Precision Whetstone 9428.4 MWIPS (9.9 s, 7 samples) Execl Throughput 10679.5 lps (29.9 s, 2 samples) File Copy 1024 bufsize 2000 maxblocks 968456.2 KBps (30.0 s, 2 samples) File Copy 256 bufsize 500 maxblocks 256144.9 KBps (30.0 s, 2 samples) File Copy 4096 bufsize 8000 maxblocks 1983646.3 KBps (30.0 s, 2 samples) Pipe Throughput 5948310.9 lps (10.0 s, 7 samples) Pipe-based Context Switching 905256.3 lps (10.0 s, 7 samples) Process Creation 34040.3 lps (30.0 s, 2 samples) Shell Scripts (1 concurrent) 19575.8 lpm (60.0 s, 2 samples) Shell Scripts (8 concurrent) 2732.8 lpm (60.0 s, 2 samples) System Call Overhead 4865382.0 lps (10.0 s, 7 samples) System Benchmarks Index Values BASELINE RESULT INDEX Dhrystone 2 using register variables 116700.0 84626036.2 7251.6 Double-Precision Whetstone 55.0 9428.4 1714.3 Execl Throughput 43.0 10679.5 2483.6 File Copy 1024 bufsize 2000 maxblocks 3960.0 968456.2 2445.6 File Copy 256 bufsize 500 maxblocks 1655.0 256144.9 1547.7 File Copy 4096 bufsize 8000 maxblocks 5800.0 1983646.3 3420.1 Pipe Throughput 12440.0 5948310.9 4781.6 Pipe-based Context Switching 4000.0 905256.3 2263.1 Process Creation 126.0 34040.3 2701.6 Shell Scripts (1 concurrent) 42.4 19575.8 4616.9 Shell Scripts (8 concurrent) 6.0 2732.8 4554.7 System Call Overhead 15000.0 4865382.0 3243.6 ======== System Benchmarks Index Score 3103.0