当前位置: 首页 > 工具软件 > Bench4Q > 使用案例 >

CPU性能测试工具-Unixbench

诸超
2023-12-01

简介:

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

 

测试过程:

 

  1. make
  2. ./Run -c 1 -c 4 2
Run [‐q | ‐v] [‐i <n>] [‐c <n> [‐c <n> …]] [test …]
说明:
    ‐q 运行quiet 模式

    ‐v 运行vobose 模式

    ‐i <count> 每个测试运行count 次循环‐‐‐较慢测试使用<count>/3,但是至少为1。默认为10(对较慢测试为3)

    ‐c <n> 平行运行每个测试<n>个拷贝,此选项可以指定多次,例如./Run ‐c 1 ‐c 4 命令,

    将会执行一个单流测试,和一个4流的测试

 

结果解析:

参数说明:

测试项目测试内容
Dhrystone该测试侧重字符串处理,没有浮点运算。结果受硬件设计和软件优化影响大
Whetstone测试浮点运算速度和效率,其中包含几个典型的科学计算性能模块
Execl Throughput测量 execl 每秒可执行的系统调用次数
File Copy测试数据从一个文件传输到另一个文件的传输速率
Pipe Throughput测试每秒一个进程将512字节写入管道并读取的次数
Pipe-based Context Switching测试每秒两个进程通过一个管道交换一个不断增长的整数次数
Process Creation测试每秒一个进程可以创建及收回子进程的次数
Shell Scripts测试每秒进程可以并发获取一个 shell 脚本的 n 个副本的次数,n取值为1 2 4 8
System Call Overhead测试进入和离开操作系统内核的开销,即执行系统调用的消耗
Graphical Tests测试显卡2D和3D图形的大概性能,结果很视乎系统是否安装适当的驱动程序

测试结果:

# 单进程跑
Benchmark Run: Fri Jun 21 2019 15:28:48 - 15:56:50
40 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables        9952791.5 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     1170.9 MWIPS (9.9 s, 7 samples)
Execl Throughput                               1182.5 lps   (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        294218.0 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           76636.3 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        874046.7 KBps  (30.0 s, 2 samples)
Pipe Throughput                              491780.5 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  58927.9 lps   (10.0 s, 7 samples)
Process Creation                               4484.8 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   2641.5 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   1460.6 lpm   (60.0 s, 2 samples)
System Call Overhead                        1082091.6 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0    9952791.5    852.9
Double-Precision Whetstone                       55.0       1170.9    212.9
Execl Throughput                                 43.0       1182.5    275.0
File Copy 1024 bufsize 2000 maxblocks          3960.0     294218.0    743.0
File Copy 256 bufsize 500 maxblocks            1655.0      76636.3    463.1
File Copy 4096 bufsize 8000 maxblocks          5800.0     874046.7   1507.0
Pipe Throughput                               12440.0     491780.5    395.3
Pipe-based Context Switching                   4000.0      58927.9    147.3
Process Creation                                126.0       4484.8    355.9
Shell Scripts (1 concurrent)                     42.4       2641.5    623.0
Shell Scripts (8 concurrent)                      6.0       1460.6   2434.3
System Call Overhead                          15000.0    1082091.6    721.4
                                                                   ========
System Benchmarks Index Score                                         537.9

# 多进程跑
------------------------------------------------------------------------
Benchmark Run: Fri Jun 21 2019 15:56:50 - 16:24:54
40 CPUs in system; running 4 parallel copies of tests

Dhrystone 2 using register variables       39789663.2 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     4681.7 MWIPS (9.9 s, 7 samples)
Execl Throughput                               5123.4 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        309510.7 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           79154.9 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        944770.3 KBps  (30.0 s, 2 samples)
Pipe Throughput                             1977063.5 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 238917.0 lps   (10.0 s, 7 samples)
Process Creation                              15325.3 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                  10213.3 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   4780.2 lpm   (60.0 s, 2 samples)
System Call Overhead                        1562431.7 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   39789663.2   3409.6
Double-Precision Whetstone                       55.0       4681.7    851.2
Execl Throughput                                 43.0       5123.4   1191.5
File Copy 1024 bufsize 2000 maxblocks          3960.0     309510.7    781.6
File Copy 256 bufsize 500 maxblocks            1655.0      79154.9    478.3
File Copy 4096 bufsize 8000 maxblocks          5800.0     944770.3   1628.9
Pipe Throughput                               12440.0    1977063.5   1589.3
Pipe-based Context Switching                   4000.0     238917.0    597.3
Process Creation                                126.0      15325.3   1216.3
Shell Scripts (1 concurrent)                     42.4      10213.3   2408.8
Shell Scripts (8 concurrent)                      6.0       4780.2   7967.0
System Call Overhead                          15000.0    1562431.7   1041.6
                                                                   ========
System Benchmarks Index Score                                        1382.1
 类似资料: