unixbrench 测试linux服务器性能

###1. 安装unixbrench前端

下载unixbrench,连接https://codeload.github.com/kdlucas/byte-unixbench/tar.gz/v5.1.3git

安装gcc,perl,cpan等软件后编译github

解压后进入UnixBrench目录后执行make命令编译,编译后的可执行文件为该目录下的Runshell

须要正常运行的话须要cpan安装其余一些perl模块编程

###2.运行unixbrench数组

# ./Run缓存

make all
make[1]: Entering directory `/data/packages/byte-unixbench-5.1.3/UnixBench'
Checking distribution of files
./pgms  exists
./src  exists
./testdir  exists
./tmp  exists
./results  exists
make[1]: Leaving directory `/data/packages/byte-unixbench-5.1.3/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


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

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

   System: localhost.localdomain: GNU/Linux
   OS: GNU/Linux -- 2.6.32-431.el6.x86_64 -- #1 SMP Fri Nov 22 03:15:09 UTC 2013
   Machine: x86_64 (x86_64)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz (5200.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   18:44:50 up 5 days,  2:50,  3 users,  load average: 0.79, 0.65, 0.36; runlevel 3

------------------------------------------------------------------------
Benchmark Run: Sun Jun 05 2016 18:44:50 - 19:12:10
1 CPU in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       33092148.4 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     3660.8 MWIPS (6.6 s, 7 samples)
Execl Throughput                               1532.8 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        247093.7 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           63618.3 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        770743.9 KBps  (30.0 s, 2 samples)
Pipe Throughput                              357787.4 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  67189.2 lps   (10.0 s, 7 samples)
Process Creation                               3151.6 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   2685.3 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    366.1 lpm   (60.1 s, 2 samples)
System Call Overhead                         367540.4 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   33092148.4   2835.7
Double-Precision Whetstone                       55.0       3660.8    665.6
Execl Throughput                                 43.0       1532.8    356.5
File Copy 1024 bufsize 2000 maxblocks          3960.0     247093.7    624.0
File Copy 256 bufsize 500 maxblocks            1655.0      63618.3    384.4
File Copy 4096 bufsize 8000 maxblocks          5800.0     770743.9   1328.9
Pipe Throughput                               12440.0     357787.4    287.6
Pipe-based Context Switching                   4000.0      67189.2    168.0
Process Creation                                126.0       3151.6    250.1
Shell Scripts (1 concurrent)                     42.4       2685.3    633.3
Shell Scripts (8 concurrent)                      6.0        366.1    610.2
System Call Overhead                          15000.0     367540.4    245.0
                                                                   ========
System Benchmarks Index Score                                         500.2

测试由如下几个项目组成dom

Dhrystone测试函数

测试聚焦在字符串处理,没有浮点运算操做。这个测试用于测试连接器编译、代码优化、内存缓存、等待状态、整数数据类型等,硬件和软件设计都会很是大的影响测试结果。性能

Whetstone 测试

这项测试项目用于测试浮点运算效率和速度。这项测试项目包含若干个科学计算的典型性能模块,包含大量的C语言函数,sin cos sqrt exp和日志以及使用整数和浮点的数学操做。包含数组访问、条件分支和过程调用。

Execl Throughput(execl 吞吐,这里的execl是类unix系统很是重要的函数,非办公软件的execl)测试

这项测试测试每秒execl函数调用次数。execl是 exec函数家族的一部分,使用新的图形处理代替当前的图形处理。有许多命令和前端的execve()函数命令很是类似。

File Copy测试

这项测试衡量文件数据从一个文件被传输到另一个,使用大量的缓存。包括文件的读、写、复制测试,测试指标是必定时间内被重写、读、复制的字符数量。

Pipe Throughput(管道吞吐)测试

pipe是简单的进程之间的通信。管道吞吐测试是测试在一秒钟一个进程写512比特到一个管道中而且读回来的次

数。管道吞吐测试和实际编程有差距。

Pipe-based Context Switching (基于管道的上下文交互)测试

这项测试衡量两个进程经过管道交换和整数倍的增长吞吐的次数。基于管道的上下文切换和真实程序很相似。测试程序产生一个双向管道通信的子线程。

Process Creation(进程建立)测试

这项测试衡量一个进程能产生子线程而且当即退出的次数。新进程真的建立进程阻塞和内存占用,因此测试程序直接使用内存带宽。这项测试用于典型的比较大量的操做系统进程建立操做。

Shell Scripts测试

shell脚本测试用于衡量在一分钟内,一个进程能够启动并中止shell脚本的次数,一般会测试1,2, 3, 4, 8 个shell脚本的共同拷贝,shell脚本是一套转化数据文件的脚本。

System Call Overhead (系统调用消耗)测试

这项测试衡量进入和离开系统内核的消耗,例如,系统调用的消耗。程序简单重复的执行getpid调用(返回调用的进程id)。消耗的指标是调用进入和离开内核的执行时间。

相关文章
相关标签/搜索