前往小程序,Get更优阅读体验!
立即前往
发布
社区首页 >专栏 >linux主机上,UnixBench性能测试工具使用

linux主机上,UnixBench性能测试工具使用

作者头像
BH8ANK
发布2021-01-28 20:31:49
发布2021-01-28 20:31:49
2.4K00
代码可运行
举报
文章被收录于专栏:云技术分享云技术分享
运行总次数:0
代码可运行

1,下载 wget http://soft.laozuo.org/scripts/UnixBench5.1.3.tgz

代码语言:javascript
代码运行次数:0
复制
[root@VM_0_15_centos test]# 
[root@VM_0_15_centos test]# wget http://soft.laozuo.org/scripts/UnixBench5.1.3.tgz
--2018-06-14 16:19:15--  http://soft.laozuo.org/scripts/UnixBench5.1.3.tgz
Resolving soft.laozuo.org (soft.laozuo.org)... 104.236.158.75
Connecting to soft.laozuo.org (soft.laozuo.org)|104.236.158.75|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://soft.laozuo.org/scripts/UnixBench5.1.3.tgz [following]
--2018-06-14 16:19:16--  https://soft.laozuo.org/scripts/UnixBench5.1.3.tgz
Connecting to soft.laozuo.org (soft.laozuo.org)|104.236.158.75|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 143259 (140K) [application/octet-stream]
Saving to: ‘UnixBench5.1.3.tgz’

100%[===================================================================================================================>] 143,259      178KB/s   in 0.8s   

2018-06-14 16:19:17 (178 KB/s) - ‘UnixBench5.1.3.tgz’ saved [143259/143259]
 

2,修改配置文件,将Makefile中的 GRAPHIC_TESTS = defined 整行注释掉,这样可以不进行图形界面的测试

代码语言:javascript
代码运行次数:0
复制
[root@VM_0_15_centos UnixBench]# vi Makefile 

3,make

代码语言:javascript
代码运行次数:0
复制
[root@VM_0_15_centos UnixBench]# make
Checking distribution of files
./pgms  exists
./src  exists
./tmpdir  exists
./results  exists
gcc -o ./pgms/arithoh -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Darithoh ./src/arith.c
gcc -o ./pgms/register -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum='register int' ./src/arith.c
gcc -o ./pgms/short -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=short ./src/arith.c
gcc -o ./pgms/int -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=int ./src/arith.c
gcc -o ./pgms/long -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=long ./src/arith.c
gcc -o ./pgms/float -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=float ./src/arith.c
gcc -o ./pgms/double -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=double ./src/arith.c
gcc -o ./pgms/hanoi -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/hanoi.c
gcc -o ./pgms/syscall -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/syscall.c
./src/syscall.c: In function ‘main’:
./src/syscall.c:93:21: warning: null argument where non-null required (argument 2) [-Wnonnull]
                     execl("/bin/true", (char *) 0);
                     ^
gcc -o ./pgms/context1 -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/context1.c
gcc -o ./pgms/pipe -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/pipe.c
gcc -o ./pgms/spawn -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/spawn.c
gcc -o ./pgms/execl -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/execl.c
In file included from ./src/execl.c:34:0:
./src/big.c: In function ‘getwork’:
./src/big.c:452:11: warning: variable ‘c’ set but not used [-Wunused-but-set-variable]
     char  c;
           ^
cd ./src; gcc -c -DTIME -Wall -pedantic -ansi -DHZ= -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall dhry_1.c
cd ./src; gcc -c -DTIME -Wall -pedantic -ansi -DHZ= -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall dhry_2.c
gcc -o ./pgms/dhry2 -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/dhry_1.o ./src/dhry_2.o
cd ./src; rm -f dhry_1.o dhry_2.o
cd ./src; gcc -c -DTIME -Wall -pedantic -ansi -DREG=register -DHZ= -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall dhry_1.c -o dhry_1_reg.o
cd ./src; gcc -c -DTIME -Wall -pedantic -ansi -DREG=register -DHZ= -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall dhry_2.c -o dhry_2_reg.o
gcc -o ./pgms/dhry2reg -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/dhry_1_reg.o ./src/dhry_2_reg.o
cd ./src; rm -f dhry_1_reg.o dhry_2_reg.o
gcc -o ./pgms/looper -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/looper.c
gcc -o ./pgms/fstime -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/fstime.c
gcc -o ./pgms/whetstone-double -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -DDP -DUNIX -DUNIXBENCH ./src/whets.c -lm
[root@VM_0_15_centos UnixBench]#

4,执行测试

代码语言:javascript
代码运行次数:0
复制
[root@VM_0_15_centos UnixBench]# ./Run 
make all
make[1]: Entering directory `/tmp/UnixBench'
Checking distribution of files
./pgms  exists
./src  exists
./tmpdir  exists
./tmp  exists
./results  exists
make[1]: Leaving directory `/tmp/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: VM_0_15_centos: GNU/Linux
   OS: GNU/Linux -- 3.10.0-693.el7.x86_64 -- #1 SMP Tue Aug 22 21:09:27 UTC 2017
   Machine: x86_64 (x86_64)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Xeon(R) CPU E5-26xx v3 (4788.9 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   16:23:27 up 9 days,  1:05,  2 users,  load average: 0.21, 0.14, 0.11; runlevel 3

------------------------------------------------------------------------
Benchmark Run: Thu Jun 14 2018 16:23:27 - 16:51:39
1 CPU in system; running 1 parallel copy of tmps

Dhrystone 2 using register variables       27236987.7 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     3608.1 MWIPS (9.9 s, 7 samples)
Execl Throughput                               4255.2 lps   (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        730865.2 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          236248.9 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       1524676.7 KBps  (30.0 s, 2 samples)
Pipe Throughput                             1490548.0 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 319147.8 lps   (10.0 s, 7 samples)
Process Creation                              13927.6 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   5121.3 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    672.4 lpm   (60.1 s, 2 samples)
System Call Overhead                        2287267.9 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   27236987.7   2333.9
Double-Precision Whetstone                       55.0       3608.1    656.0
Execl Throughput                                 43.0       4255.2    989.6
File Copy 1024 bufsize 2000 maxblocks          3960.0     730865.2   1845.6
File Copy 256 bufsize 500 maxblocks            1655.0     236248.9   1427.5
File Copy 4096 bufsize 8000 maxblocks          5800.0    1524676.7   2628.8
Pipe Throughput                               12440.0    1490548.0   1198.2
Pipe-based Context Switching                   4000.0     319147.8    797.9
Process Creation                                126.0      13927.6   1105.4
Shell Scripts (1 concurrent)                     42.4       5121.3   1207.8
Shell Scripts (8 concurrent)                      6.0        672.4   1120.6
System Call Overhead                          15000.0    2287267.9   1524.8
                                                                   ========
System Benchmarks Index Score                                        1298.1

[root@VM_0_15_centos UnixBench]# 

结果分析:

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2018-06-14 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档