UnixBench-Linux主机性能测试

UnixBench是一个类unix系统(Unix,BSD,Linux)下的性能测试工具,一个开源工具,被广泛用于测试linux系统主机的性能。
Unixbench的主要测试项目有:系统调用、读写、进程、图形化测试、2D、3D、管道、运算、C库等系统基准性能提供测试数据。
Unixbench一个基于系统的基准测试工具,不单纯是CPU内存或者磁盘测试工具。测试结果不仅仅取决于硬件,也取决于系统、开发库、甚至是编译器。

UnixBench会执行一系列的测试,包括2D和3D图形系统的性能衡量,测试的结果不仅仅只是CPU,内存,或者磁盘为基准,还取决于硬件,操作系统版本,编译器.

测试系统各个方面一系列的性能,然后将每个测试结果和一个基准值进行比较,得到一个索引值,所有测试项目的索引值结合在一起形成一个测试分数值.

UnixBench一键执行脚本,脚本会自动下载unixbench最新版本,并自动运行.根据机器性能,测试执行完大约需要10-30分钟.

1.下载Unixbench:
链接:https://pan.baidu.com/s/1KnHn_xBoUjXInvsOBEYE_A
提取码:2jmw

2.安装Unixbench:

[root@localhost unixbench]# ls
UnixBench5.1.3.tgz
[root@localhost unixbench]# tar zxf UnixBench5.1.3.tgz 
[root@localhost unixbench]# ls
UnixBench  UnixBench5.1.3.tgz
[root@localhost unixbench]# cd UnixBench/
[root@localhost UnixBench]# ls
Makefile  pgms  README  results  Run  src  testdir  USAGE  WRITING_TESTS
[root@localhost UnixBench]# make
Checking distribution of files
./pgms  exists
./src  exists
./testdir  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@localhost UnixBench]# 

3.运行Unixbench进行测试

[root@localhost UnixBench]# ls
Makefile  pgms  README  results  Run  src  testdir  tmp  USAGE  WRITING_TESTS
[root@localhost UnixBench]# ./Run 
make all
make[1]: Entering directory `/root/unixbench/UnixBench'
Checking distribution of files
./pgms  exists
./src  exists
./testdir  exists
./tmp  exists
./results  exists
make[1]: Leaving directory `/root/unixbench/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

4.测试结果(虚拟机,单核8G内存,20G硬盘)

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

   System: localhost.localdomain: GNU/Linux
   OS: GNU/Linux -- 3.10.0-862.el7.x86_64 -- #1 SMP Fri Apr 20 16:44:24 UTC 2018
   Machine: x86_64 (x86_64)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz (4608.0 bogomips)
          x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   02:30:27 up  8:32,  2 users,  load average: 0.27, 0.19, 0.15; runlevel 5

------------------------------------------------------------------------
Benchmark Run: Fri Apr 23 2021 02:30:27 - 02:58:38
1 CPU in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       21333828.2 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     3414.4 MWIPS (9.3 s, 7 samples)
Execl Throughput                               1615.7 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        284211.2 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           87106.7 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       1045341.9 KBps  (30.0 s, 2 samples)
Pipe Throughput                              435257.4 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  79971.7 lps   (10.0 s, 7 samples)
Process Creation                               6296.5 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   2450.7 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    353.3 lpm   (60.2 s, 2 samples)
System Call Overhead                         377287.5 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   21333828.2   1828.1
Double-Precision Whetstone                       55.0       3414.4    620.8
Execl Throughput                                 43.0       1615.7    375.7
File Copy 1024 bufsize 2000 maxblocks          3960.0     284211.2    717.7
File Copy 256 bufsize 500 maxblocks            1655.0      87106.7    526.3
File Copy 4096 bufsize 8000 maxblocks          5800.0    1045341.9   1802.3
Pipe Throughput                               12440.0     435257.4    349.9
Pipe-based Context Switching                   4000.0      79971.7    199.9
Process Creation                                126.0       6296.5    499.7
Shell Scripts (1 concurrent)                     42.4       2450.7    578.0
Shell Scripts (8 concurrent)                      6.0        353.3    588.9
System Call Overhead                          15000.0     377287.5    251.5
                                                                   ========
System Benchmarks Index Score                                         555.8

[root@localhost UnixBench]# 

5.虚拟机 4核10G内存 40G硬盘的单核和四核结果

------------------------------------------------------------------------
Benchmark Run: Fri Apr 23 2021 06:26:11 - 06:54:06
4 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       19551304.7 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     2209.9 MWIPS (9.4 s, 7 samples)
Execl Throughput                               1148.2 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        222062.8 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           58524.8 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        678408.0 KBps  (30.0 s, 2 samples)
Pipe Throughput                              302826.9 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  10784.7 lps   (10.0 s, 7 samples)
Process Creation                               3836.7 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   2319.0 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    703.9 lpm   (60.1 s, 2 samples)
System Call Overhead                         203648.6 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   19551304.7   1675.3
Double-Precision Whetstone                       55.0       2209.9    401.8
Execl Throughput                                 43.0       1148.2    267.0
File Copy 1024 bufsize 2000 maxblocks          3960.0     222062.8    560.8
File Copy 256 bufsize 500 maxblocks            1655.0      58524.8    353.6
File Copy 4096 bufsize 8000 maxblocks          5800.0     678408.0   1169.7
Pipe Throughput                               12440.0     302826.9    243.4
Pipe-based Context Switching                   4000.0      10784.7     27.0
Process Creation                                126.0       3836.7    304.5
Shell Scripts (1 concurrent)                     42.4       2319.0    546.9
Shell Scripts (8 concurrent)                      6.0        703.9   1173.1
System Call Overhead                          15000.0     203648.6    135.8
                                                                   ========
System Benchmarks Index Score                                         373.0

------------------------------------------------------------------------
Benchmark Run: Fri Apr 23 2021 06:54:06 - 07:22:04
4 CPUs in system; running 4 parallel copies of tests

Dhrystone 2 using register variables       42283828.5 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     7144.5 MWIPS (9.9 s, 7 samples)
Execl Throughput                               3332.6 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        421861.8 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          115132.0 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       1249613.7 KBps  (30.0 s, 2 samples)
Pipe Throughput                              937903.5 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 162516.5 lps   (10.0 s, 7 samples)
Process Creation                              10598.7 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   5748.6 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    786.3 lpm   (60.2 s, 2 samples)
System Call Overhead                         713006.1 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   42283828.5   3623.3
Double-Precision Whetstone                       55.0       7144.5   1299.0
Execl Throughput                                 43.0       3332.6    775.0
File Copy 1024 bufsize 2000 maxblocks          3960.0     421861.8   1065.3
File Copy 256 bufsize 500 maxblocks            1655.0     115132.0    695.7
File Copy 4096 bufsize 8000 maxblocks          5800.0    1249613.7   2154.5
Pipe Throughput                               12440.0     937903.5    753.9
Pipe-based Context Switching                   4000.0     162516.5    406.3
Process Creation                                126.0      10598.7    841.2
Shell Scripts (1 concurrent)                     42.4       5748.6   1355.8
Shell Scripts (8 concurrent)                      6.0        786.3   1310.5
System Call Overhead                          15000.0     713006.1    475.3
                                                                   ========
System Benchmarks Index Score                                        1020.0

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值