简介
第一次碰到unixbench是在看LinusTechTips视频的时候碰到的,那时候没有对这个软件产生兴趣,直到今天在看博客的时候又碰到了这个软件,所以想研究下。百度了下,unixbench
是一个用于测试unix系统性能的工具,源于1995 年,基线系统是“George”,一个工作站:SPARCstation 20‐61,128MB RAM,Solaris2.3,此系统的指数值被设定为10,这个其实和1米的定义一样,米原器的长度有多长1米就有多长
虽然linux服务器大部分都是没有图形环境的,但是UnixBench也包含一些非常简单的2D和3D图形测试。
同时UnixBench是一个基于系统的基准测试工具,不单纯是CPU 内存 或者磁盘测试工具。测试结果不仅仅取决于硬件,也取决于系统、开发库、甚至是编译器。
官网地址
https://github.com/cloudharmony/unixbench
安装
说了那么多,那就先安装一下吧
首先下载下来
wget https://s3.amazonaws.com/cloudbench/software/UnixBench5.1.3.tgz
网速可能比较慢,毕竟是在中国嘛,如果下载不了想要FQ可以联系我,解压
tar -xvf UnixBench5.1.3.tgz
cd UnixBench/
编译一下
make all
如果你不需要测试图形性能的话,可以在编译之前把Makefile中的GRAPHIC_TESTS = defined
注释掉
使用
[bboysoul@bboysoul UnixBench]$ ./Run
make all
make[1]: Entering directory '/home/bboysoul/下载/UnixBench'
Checking distribution of files
./pgms exists
./src exists
./testdir exists
./tmp exists
./results exists
make[1]: Leaving directory '/home/bboysoul/下载/UnixBench'
sh: 3dinfo: command not found
# # # # # # # ##### ###### # # #### # #
# # ## # # # # # # # ## # # # # #
# # # # # # ## ##### ##### # # # # ######
# # # # # # ## # # # # # # # # #
# # # ## # # # # # # # ## # # # #
#### # # # # # ##### ###### # # #### # #
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
Wide character in print at ./Run line 1511.
Wide character in printf at ./Run line 1542.
1 x Dhrystone 2 using register variables 1
说明一下如果就执行Run
就是做一个系统测试,如果执行Run graphics
就是执行图形测试,执行Run gindex
就是两个测试都执行,测试时间是相当漫长的。
➜ UnixBench ./Run
make all
make[1]: Entering directory '/home/bboysoul/下载/UnixBench'
Checking distribution of files
./pgms exists
./src exists
./testdir exists
./tmp exists
./results exists
make[1]: Leaving directory '/home/bboysoul/下载/UnixBench'
sh: 3dinfo: command not found
# # # # # # # ##### ###### # # #### # #
# # ## # # # # # # # ## # # # # #
# # # # # # ## ##### ##### # # # # ######
# # # # # # ## # # # # # # # # #
# # # ## # # # # # # # ## # # # #
#### # # # # # ##### ###### # # #### # #
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
Wide character in print at ./Run line 1511.
Wide character in printf at ./Run line 1542.
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
Wide character in printf at ./Run line 1484.
2 x Dhrystone 2 using register variables 1 2 3 4 5 6 7 8 9 10
2 x Double-Precision Whetstone 1 2 3 4 5 6 7 8 9 10
2 x Execl Throughput 1 2 3
2 x File Copy 1024 bufsize 2000 maxblocks 1 2 3
2 x File Copy 256 bufsize 500 maxblocks 1 2 3
2 x File Copy 4096 bufsize 8000 maxblocks 1 2 3
2 x Pipe Throughput 1 2 3 4 5 6 7 8 9 10
2 x Pipe-based Context Switching 1 2 3 4 5 6 7 8 9 10
2 x Process Creation 1 2 3
2 x System Call Overhead 1 2 3 4 5 6 7 8 9 10
2 x Shell Scripts (1 concurrent) 1 2 3
2 x Shell Scripts (8 concurrent) 1 2 3
Wide character in printf at ./Run line 1484.
========================================================================
BYTE UNIX Benchmarks (Version 5.1.3)
System: bboysoul: GNU/Linux
OS: GNU/Linux -- 4.12.8-300.fc26.x86_64 -- #1 SMP Thu Aug 17 15:30:20 UTC 2017
Machine: x86_64 (x86_64)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: Intel(R) Pentium(R) CPU G4400 @ 3.30GHz (6624.0 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 1: Intel(R) Pentium(R) CPU G4400 @ 3.30GHz (6627.9 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
09:13:46 up 47 min, 1 user, load average: 0.21, 0.09, 0.13; runlevel 5
------------------------------------------------------------------------
Benchmark Run: 三 8月 30 2017 09:13:46 - 09:43:58
2 CPUs in system; running 1 parallel copy of tests
Dhrystone 2 using register variables 41945638.2 lps (10.0 s, 7 samples)
Double-Precision Whetstone 4354.7 MWIPS (11.2 s, 7 samples)
Execl Throughput 6251.3 lps (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 979539.2 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 279011.5 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 2398064.4 KBps (30.0 s, 2 samples)
Pipe Throughput 2201090.2 lps (10.1 s, 7 samples)
Pipe-based Context Switching 266281.9 lps (10.0 s, 7 samples)
Process Creation 11583.2 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 5999.6 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 1203.2 lpm (60.0 s, 2 samples)
System Call Overhead 3421506.1 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 41945638.2 3594.3
Double-Precision Whetstone 55.0 4354.7 791.8
Execl Throughput 43.0 6251.3 1453.8
File Copy 1024 bufsize 2000 maxblocks 3960.0 979539.2 2473.6
File Copy 256 bufsize 500 maxblocks 1655.0 279011.5 1685.9
File Copy 4096 bufsize 8000 maxblocks 5800.0 2398064.4 4134.6
Pipe Throughput 12440.0 2201090.2 1769.4
Pipe-based Context Switching 4000.0 266281.9 665.7
Process Creation 126.0 11583.2 919.3
Shell Scripts (1 concurrent) 42.4 5999.6 1415.0
Shell Scripts (8 concurrent) 6.0 1203.2 2005.3
System Call Overhead 15000.0 3421506.1 2281.0
========
System Benchmarks Index Score 1678.5
------------------------------------------------------------------------
Benchmark Run: 三 8月 30 2017 09:43:58 - 10:13:14
2 CPUs in system; running 2 parallel copies of tests
Dhrystone 2 using register variables 76917222.0 lps (10.0 s, 7 samples)
Double-Precision Whetstone 8686.9 MWIPS (11.3 s, 7 samples)
Execl Throughput 9869.9 lps (29.3 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 1248520.7 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 411350.0 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 3442009.0 KBps (30.0 s, 2 samples)
Pipe Throughput 4419527.8 lps (10.0 s, 7 samples)
Pipe-based Context Switching 705824.9 lps (10.0 s, 7 samples)
Process Creation 25434.8 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 8799.9 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 1485.6 lpm (60.0 s, 2 samples)
System Call Overhead 5259380.8 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 76917222.0 6591.0
Double-Precision Whetstone 55.0 8686.9 1579.4
Execl Throughput 43.0 9869.9 2295.3
File Copy 1024 bufsize 2000 maxblocks 3960.0 1248520.7 3152.8
File Copy 256 bufsize 500 maxblocks 1655.0 411350.0 2485.5
File Copy 4096 bufsize 8000 maxblocks 5800.0 3442009.0 5934.5
Pipe Throughput 12440.0 4419527.8 3552.7
Pipe-based Context Switching 4000.0 705824.9 1764.6
Process Creation 126.0 25434.8 2018.6
Shell Scripts (1 concurrent) 42.4 8799.9 2075.5
Shell Scripts (8 concurrent) 6.0 1485.6 2476.0
System Call Overhead 15000.0 5259380.8 3506.3
========
System Benchmarks Index Score 2820.4
Have Fun