ubuntu 下使用unixbench 这种benchmark 工具测试系统性能

windows 有鲁大师,linux 找到一个unixbench

1.安装

系统是 ubuntu 16.04
在这里插入图片描述

手下下载unixbench 5.1.2,命令

wget http://soft.vpser.net/test/unixbench/unixbench-5.1.2.tar.gz

解压

 tar -xzvf unixbench-5.1.2.tar.gz

切换路径

cd unixbench-5.1.2

设置不用图形化

sed -i "s/GRAPHIC_TESTS = defined/#GRAPHIC_TESTS = defined/g" ./Makefile

编译

make

执行

./Run

结果:

make all
make[1]: Entering directory '/home/utry/unixbench-5.1.2'
Checking distribution of files
./pgms  exists
./src  exists
./testdir  exists
./tmp  exists
./results  exists
make[1]: Leaving directory '/home/utry/unixbench-5.1.2'
sh: 3dinfo: command not found

   #    #  #    #  #  #    #          #####   ######  #    #   ####   #    #
   #    #  ##   #  #   #  #           #    #  #       ##   #  #    #  #    #
   #    #  # #  #  #    ##            #####   #####   # #  #  #       ######
   #    #  #  # #  #    ##            #    #  #       #  # #  #       #    #
   #    #  #   ##  #   #  #           #    #  #       #   ##  #    #  #    #
    ####   #    #  #  #    #          #####   ######  #    #   ####   #    #

   Version 5.1.2                      Based on the Byte Magazine Unix Benchmark

   Multi-CPU version                  Version 5 revisions by Ian Smith,
                                      Sunnyvale, CA, USA
   December 22, 2007                  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

4 x Dhrystone 2 using register variables  1 2 3 4 5 6 7 8 9 10

4 x Double-Precision Whetstone  1 2 3 4 5 6 7 8 9 10

4 x Execl Throughput  1 2 3

4 x File Copy 1024 bufsize 2000 maxblocks  1 2 3

4 x File Copy 256 bufsize 500 maxblocks  1 2 3

4 x File Copy 4096 bufsize 8000 maxblocks  1 2 3

4 x Pipe Throughput  1 2 3 4 5 6 7 8 9 10

4 x Pipe-based Context Switching  1 2 3 4 5 6 7 8 9 10

4 x Process Creation  1 2 3

4 x System Call Overhead  1 2 3 4 5 6 7 8 9 10

4 x Shell Scripts (1 concurrent)  1 2 3

4 x Shell Scripts (8 concurrent)  1 2 3

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.2)

   System: ubuntu: GNU/Linux
   OS: GNU/Linux -- 4.15.0-58-generic -- #64~16.04.1-Ubuntu SMP Wed Aug 7 14:10:35 UTC 2019
   Machine: x86_64 (x86_64)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz (3984.0 bogomips)
          x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   CPU 1: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz (3984.0 bogomips)
          x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   CPU 2: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz (3984.0 bogomips)
          x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   CPU 3: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz (3984.0 bogomips)
          x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   10:21:59 up 2 days, 23:31,  1 user,  load average: 1.02, 1.01, 0.89; runlevel 5

------------------------------------------------------------------------
Benchmark Run: Mon Sep 02 2019 10:21:59 - 10:50:09
4 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       26208093.5 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     3613.6 MWIPS (9.9 s, 7 samples)
Execl Throughput                               2262.0 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        524555.7 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          153483.9 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       1396177.9 KBps  (30.0 s, 2 samples)
Pipe Throughput                              897259.8 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  76812.0 lps   (10.0 s, 7 samples)
Process Creation                               6658.6 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   5284.4 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   1550.5 lpm   (60.0 s, 2 samples)
System Call Overhead                         841515.7 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   26208093.5   2245.8
Double-Precision Whetstone                       55.0       3613.6    657.0
Execl Throughput                                 43.0       2262.0    526.0
File Copy 1024 bufsize 2000 maxblocks          3960.0     524555.7   1324.6
File Copy 256 bufsize 500 maxblocks            1655.0     153483.9    927.4
File Copy 4096 bufsize 8000 maxblocks          5800.0    1396177.9   2407.2
Pipe Throughput                               12440.0     897259.8    721.3
Pipe-based Context Switching                   4000.0      76812.0    192.0
Process Creation                                126.0       6658.6    528.5
Shell Scripts (1 concurrent)                     42.4       5284.4   1246.3
Shell Scripts (8 concurrent)                      6.0       1550.5   2584.2
System Call Overhead                          15000.0     841515.7    561.0
                                                                   ========
System Benchmarks Index Score                                         905.4

------------------------------------------------------------------------
Benchmark Run: Mon Sep 02 2019 10:50:09 - 11:18:44
4 CPUs in system; running 4 parallel copies of tests

Dhrystone 2 using register variables       85510590.5 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                    14574.0 MWIPS (11.2 s, 7 samples)
Execl Throughput                               7195.1 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        795781.4 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          239085.0 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       2527023.3 KBps  (30.0 s, 2 samples)
Pipe Throughput                             2891575.3 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 406038.2 lps   (10.0 s, 7 samples)
Process Creation                              14031.2 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                  12104.2 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   1664.1 lpm   (60.0 s, 2 samples)
System Call Overhead                        2819570.0 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   85510590.5   7327.4
Double-Precision Whetstone                       55.0      14574.0   2649.8
Execl Throughput                                 43.0       7195.1   1673.3
File Copy 1024 bufsize 2000 maxblocks          3960.0     795781.4   2009.5
File Copy 256 bufsize 500 maxblocks            1655.0     239085.0   1444.6
File Copy 4096 bufsize 8000 maxblocks          5800.0    2527023.3   4356.9
Pipe Throughput                               12440.0    2891575.3   2324.4
Pipe-based Context Switching                   4000.0     406038.2   1015.1
Process Creation                                126.0      14031.2   1113.6
Shell Scripts (1 concurrent)                     42.4      12104.2   2854.8
Shell Scripts (8 concurrent)                      6.0       1664.1   2773.4
System Call Overhead                          15000.0    2819570.0   1879.7
                                                                   ========
System Benchmarks Index Score                                        2241.3

2.结果含义

测试项目 项目说明 基准线
Dhrystone 2 using register variables 测试 string handling 116700.0lps
Double-Precision Whetstone 测试浮点数操作的速度和效率 55.0MWIPS
Execl Throughput 此测试考察每秒钟可以执行的 execl 系统调用的次数 43.0lps
File Copy 1024 bufsize 2000 maxblocks 测试从一个文件向另外一个文件传输数据的速率 3960.0KBps
File Copy 256 bufsize 500 maxblocks 测试从一个文件向另外一个文件传输数据的速率。 1655.0KBps
File Read 4096 bufsize 8000 maxblocks 测试从一个文件向另外一个文件传输数据的速率。 5800.0KBps
Pipe-based Context Switching 测试两个进程(每秒钟)通过一个管道交换一个不断增长的整数的次数 12440.0lps
Pipe Throughput 一秒钟内一个进程可以向一个管道写 512 字节数据然后再读回的次数 4000.0lps
Process Creation 测试每秒钟一个进程可以创建子进程然后收回子进程的次数(子进程一定立即退出)。 126.0lps
Shell Scripts (8 concurrent) 测试一秒钟内一个进程可以并发地开始一个shell 脚本的 n 个拷贝的次数,n 一般取值1,2,4, 8. 42.4lpm
System Call Overhead 测试进入和离开操作系统内核的代价,即一次系统调用的代价。 6.0lpm
发布了65 篇原创文章 · 获赞 7 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/weixin_36628778/article/details/100263115