UnixBench-用于类Unix系统的基准套件

时间:2020-03-21 11:48:33  来源:igfitidea点击:

在本教程中,我们将看到另一个称为UnixBench的基准测试套件。
它是原始的BYTE UNIX基准测试套件,多年来被许多人更新和修订。
该工具的主要目的是提供类Unix操作系统性能的基本指标。
运行单个或者多个任务时,可以使用UnixBench评估系统的性能。
请注意,这是系统基准测试工具,而不仅仅是CPU,内存或者磁盘基准测试工具。
结果不仅取决于硬件,还取决于操作系统,库,甚至编译器。

Unixbench将在系统上进行以下基准测试。

  • Dhrystone-用于衡量和比较计算机的性能。
  • 油石-用于测量浮点运算的速度和效率。
  • execl吞吐量-用于测量每秒可以执行的execl调用的数量。
  • 文件复制-用于测量数据从一个文件传输到另一个文件的速率。
  • 管道吞吐量-进程可以向管道写入512字节并回读它们的次数(每秒)。
  • 基于管道的上下文切换-用于测量两个进程可以通过管道交换递增整数的次数。
  • 进程创建-用于衡量进程可以分叉并收获立即退出的子级的次数。
  • Shell脚本-用于衡量进程每分钟可以启动和获取一组八个Shell脚本并发副本的次数,其中Shell脚本将一系列转换应用于数据文件。
  • 系统调用开销-用于估计进入和离开操作系统内核的成本。
  • 图形测试-用于提供系统2D和3D图形性能的概念。

在Linux上安装和使用Unixbench

UnixBench在AUR中可用,因此我们可以使用AUR帮助程序将其安装在Arch Linux及其派生产品(如Manjaro Linux,Antergos)上。

使用Yay:

$yay -S unixbench

在其他Linux发行版中,我们需要手动编译并安装UnixBench,如下所示。

在CentOS,RHEL,Fedora上:

$sudo yum -y install gcc gcc-c++ make libXext-devel perl perl-Time-HiRes git
$sudo yum -y groupinstall "Development Tools"
$sudo yum -y install libX11-devel mesa-libGL-devel perl-Time-HiRes

在Debian,Ubuntu和Linux Mint上:

$sudo apt-get install libx11-dev libgl1-mesa-dev libxext-dev perl perl-modules make git

安装必要的准备工作后,git使用以下命令克隆UnixBench存储库:

$git clone https://github.com/kdlucas/byte-unixbench.git

转到unixbench目录:

$cd byte-unixbench/UnixBench/

然后,运行以下命令开始对系统进行基准测试。

$./Run

如果已在Arch Linux上从AUR安装了UnixBench,请运行以下命令将其启动。

$ubench

输出示例为:

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
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.3)
System: sk: GNU/Linux
 OS: GNU/Linux -- 4.10.10-1-ARCH -- #1 SMP PREEMPT Wed Apr 12 18:50:28 CEST 2016
 Machine: x86_64 (unknown)
 Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
 CPU 0: Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz (4591.9 bogomips)
 Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
 CPU 1: Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz (4592.1 bogomips)
 Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
 CPU 2: Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz (4593.8 bogomips)
 Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
 CPU 3: Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz (4592.2 bogomips)
 Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
 13:09:04 up 1:56, 1 user, load average: 0.55, 0.37, 0.42; runlevel unknown
-----------------------------------------------------------------------
Benchmark Run: Wed Apr 19 2016 13:09:04 - 13:38:10
4 CPUs in system; running 1 parallel copy of tests
Dhrystone 2 using register variables 19547861.3 lps (10.0 s, 7 samples)
Double-Precision Whetstone 2321.8 MWIPS (13.9 s, 7 samples)
Execl Throughput 2982.7 lps (29.5 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 493713.2 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 150353.3 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 760514.6 KBps (30.1 s, 2 samples)
Pipe Throughput 1128068.6 lps (10.0 s, 7 samples)
Pipe-based Context Switching 97761.1 lps (10.0 s, 7 samples)
Process Creation 4560.7 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 1802.4 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 476.7 lpm (60.1 s, 2 samples)
System Call Overhead 1752928.0 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 19547861.3 1675.1
Double-Precision Whetstone 55.0 2321.8 422.2
Execl Throughput 43.0 2982.7 693.6
File Copy 1024 bufsize 2000 maxblocks 3960.0 493713.2 1246.8
File Copy 256 bufsize 500 maxblocks 1655.0 150353.3 908.5
File Copy 4096 bufsize 8000 maxblocks 5800.0 760514.6 1311.2
Pipe Throughput 12440.0 1128068.6 906.8
Pipe-based Context Switching 4000.0 97761.1 244.4
Process Creation 126.0 4560.7 362.0
Shell Scripts (1 concurrent) 42.4 1802.4 425.1
Shell Scripts (8 concurrent) 6.0 476.7 794.5
System Call Overhead 15000.0 1752928.0 1168.6
 ========
System Benchmarks Index Score 730.4
-----------------------------------------------------------------------
Benchmark Run: Wed Apr 19 2016 13:38:10 - 14:07:31
4 CPUs in system; running 4 parallel copies of tests
Dhrystone 2 using register variables 27193072.8 lps (10.0 s, 7 samples)
Double-Precision Whetstone 4985.4 MWIPS (16.4 s, 7 samples)
Execl Throughput 4453.8 lps (29.8 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 340833.2 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 74310.1 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 886922.2 KBps (30.0 s, 2 samples)
Pipe Throughput 1467621.9 lps (10.0 s, 7 samples)
Pipe-based Context Switching 324277.3 lps (10.0 s, 7 samples)
Process Creation 10722.5 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 2893.2 lpm (60.1 s, 2 samples)
Shell Scripts (8 concurrent) 400.8 lpm (60.2 s, 2 samples)
System Call Overhead 2750243.4 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 27193072.8 2330.2
Double-Precision Whetstone 55.0 4985.4 906.4
Execl Throughput 43.0 4453.8 1035.8
File Copy 1024 bufsize 2000 maxblocks 3960.0 340833.2 860.7
File Copy 256 bufsize 500 maxblocks 1655.0 74310.1 449.0
File Copy 4096 bufsize 8000 maxblocks 5800.0 886922.2 1529.2
Pipe Throughput 12440.0 1467621.9 1179.8
Pipe-based Context Switching 4000.0 324277.3 810.7
Process Creation 126.0 10722.5 851.0
Shell Scripts (1 concurrent) 42.4 2893.2 682.4
Shell Scripts (8 concurrent) 6.0 400.8 668.0
System Call Overhead 15000.0 2750243.4 1833.5
 ========
System Benchmarks Index Score 989.4

基准分数将显示在结果的末尾。