ここのところ、RasPi2 でいろいろ遊んでいますが、そういえば母艦である osx 機で UnixBench を計測していないことに気がつきました。で、その結果。
UnixBench にパッチを当てる情報は、以下を参考にしました。
Patch for UnixBench 5.1.3 on Mac OS X Mavericks (10.9)
https://gist.github.com/barusan/11033924
blog
http://www.baru-san.net/archives/267
ありがたく、使わせていただきます。
wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/byte-unixbench/UnixBench5.1.3.tgz
git clone https://gist.github.com/11033924.git
tar xvf UnixBench5.1.3.tgz
cd UnixBench/
patch -p1 < ../11033924/UnixBench5.1.3.mavericks.patch
make
./Run
な感じで計測。
========================================================================
BYTE UNIX Benchmarks (Version 5.1.3)
System: HOPE.local: Darwin
OS: Darwin -- 13.4.0 -- Darwin Kernel Version 13.4.0: ....::
::
CPU 7: Intel(R) Core(TM) ...::
::
------------------------------------------------------------------------
Benchmark Run: 日 7 12 2015 16:14:49 - 16:42:55
8 CPUs in system; running 1 parallel copy of tests
Dhrystone 2 using register variables 34704465.0 lps (10.0 s, 7 samples)
Double-Precision Whetstone 6360.0 MWIPS (9.8 s, 7 samples)
Execl Throughput 903.5 lps (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 800480.2 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 219592.2 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 2163139.0 KBps (30.0 s, 2 samples)
Pipe Throughput 1281398.1 lps (10.0 s, 7 samples)
Pipe-based Context Switching 103377.8 lps (10.0 s, 7 samples)
Process Creation 4573.6 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 5948.9 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 1956.7 lpm (60.0 s, 2 samples)
System Call Overhead 1350215.3 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 34704465.0 2973.8
Double-Precision Whetstone 55.0 6360.0 1156.4
Execl Throughput 43.0 903.5 210.1
File Copy 1024 bufsize 2000 maxblocks 3960.0 800480.2 2021.4
File Copy 256 bufsize 500 maxblocks 1655.0 219592.2 1326.8
File Copy 4096 bufsize 8000 maxblocks 5800.0 2163139.0 3729.6
Pipe Throughput 12440.0 1281398.1 1030.1
Pipe-based Context Switching 4000.0 103377.8 258.4
Process Creation 126.0 4573.6 363.0
Shell Scripts (1 concurrent) 42.4 5948.9 1403.0
Shell Scripts (8 concurrent) 6.0 1956.7 3261.2
System Call Overhead 15000.0 1350215.3 900.1
========
System Benchmarks Index Score 1092.0
------------------------------------------------------------------------
Benchmark Run: 日 7 12 2015 16:42:55 - 17:11:05
8 CPUs in system; running 8 parallel copies of tests
Dhrystone 2 using register variables 151501922.0 lps (10.0 s, 7 samples)
Double-Precision Whetstone 47934.1 MWIPS (9.8 s, 7 samples)
Execl Throughput 4391.2 lps (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 1785300.9 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 417942.6 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 5208018.8 KBps (30.0 s, 2 samples)
Pipe Throughput 3024743.9 lps (10.0 s, 7 samples)
Pipe-based Context Switching 737487.3 lps (10.0 s, 7 samples)
Process Creation 17603.0 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 17545.1 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 2572.0 lpm (60.1 s, 2 samples)
System Call Overhead 3138596.8 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 151501922.0 12982.2
Double-Precision Whetstone 55.0 47934.1 8715.3
Execl Throughput 43.0 4391.2 1021.2
File Copy 1024 bufsize 2000 maxblocks 3960.0 1785300.9 4508.3
File Copy 256 bufsize 500 maxblocks 1655.0 417942.6 2525.3
File Copy 4096 bufsize 8000 maxblocks 5800.0 5208018.8 8979.3
Pipe Throughput 12440.0 3024743.9 2431.5
Pipe-based Context Switching 4000.0 737487.3 1843.7
Process Creation 126.0 17603.0 1397.1
Shell Scripts (1 concurrent) 42.4 17545.1 4138.0
Shell Scripts (8 concurrent) 6.0 2572.0 4286.7
System Call Overhead 15000.0 3138596.8 2092.4
========
System Benchmarks Index Score 3440.0
osx 10.9.5 ですが、体感的にはもっと速い感じ。まぁ、とりあえずの指針としてきます。
たとえば、sakuraVPS の2G Plan の CPU3 RAM 2GB HDD200GB で2000くらいは出ます。
ベンチマーク計測中の htop は以下のような感じ。
1 [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.0%] Tasks: 252 total, 0 running
2 [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.0%] Load average: 7.85 5.22 3.26
3 [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.0%] Uptime: 01:03:57
4 [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.0%]
5 [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.0%]
6 [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.0%]
7 [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.0%]
8 [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.0%]
Mem[|||||||||||| 3711/32768MB]
Swp[ 0/1024MB]
がんばってますね。
ちなみに、osx10.9.5 の公開しているソースは、
http://www.opensource.apple.com/release/os-x-1095/
たとえば、bash とかは、以下にあり、
http://www.opensource.apple.com/source/bash/bash-92/
まだやったことはないんですが、xcode を使ってビルドできるようです。