一、UnixBench 简介
- UnixBench 原本叫做 BYTE UNIX benchmark suite。软件为 Unix 类的系统提供了一些基本的性能指标。通过不同的测试来测试系统不同方面的性能(2D,3D,CPU,内存等等)。这些测试的结果将和一些标准的系统来做比较,从而得出一些性能指数,比原始 的测试数据容容易理解。
- UnixBench一个基于系统的基准测试工具,不单纯是CPU 内存 或者磁盘测试工具。测试结果不仅仅取决于硬件,也取决于系统、开发库、甚至是编译器。
- UnixBench测试执行完大约需要10-30分钟。
备注:UnixBench性能测试工具新版本改动研究文章来源:https://www.toymoban.com/news/detail-794609.html
1.1 UnixBench 测试项目
- Dhrystone 2 using register variables
- Double-Precision Whetstone
- Execl Throughput
- File Copy 1024 bufsize 2000 maxblocks
- File Copy 256 bufsize 500 maxblocks
- File Copy 4096 bufsize 8000 maxblocks
- Pipe Throughput
- Pipe-based Context Switching
- Process Creation
- System Call Overhead
- Shell Scripts
二、UnixBench 测试
2.1 获取UnixBench
git clone https://github.com/kdlucas/byte-unixbench
2.2 编译
cd byte-unixbench/UnixBench
make
2.3 运行
./Run
三、测试结果
硬件龙芯平台文章来源地址https://www.toymoban.com/news/detail-794609.html
- 硬件ls3a6000+7a2000
- 系统loonnix20.5
3.1 运行截图
UnixBench# ./Run
make all
make[1]: Entering directory '/home/test/work/tools/byte-unixbench/UnixBench'
make distr
make[2]: Entering directory '/home/test/work/tools/byte-unixbench/UnixBench'
Checking distribution of files
./pgms exists
./src exists
./testdir exists
./tmp exists
./results exists
make[2]: Leaving directory '/home/test/work/tools/byte-unixbench/UnixBench'
make programs
make[2]: Entering directory '/home/test/work/tools/byte-unixbench/UnixBench'
make[2]: Nothing to be done for 'programs'.
make[2]: Leaving directory '/home/test/work/tools/byte-unixbench/UnixBench'
make[1]: Leaving directory '/home/test/work/tools/byte-unixbench/UnixBench'
sh: 1: 3dinfo: 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
------------------------------------------------------------------------------
Use directories for:
* File I/O tests (named fs***) = /home/test/work/tools/byte-unixbench/UnixBench/tmp
* Results = /home/test/work/tools/byte-unixbench/UnixBench/results
------------------------------------------------------------------------------
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
Wide character in printf at ./Run line 1574.
8 x Dhrystone 2 using register variables 1 2 3 4 5 6 7 8 9 10
8 x Double-Precision Whetstone 1 2 3 4 5 6 7 8 9 10
8 x Execl Throughput 1 2 3
8 x File Copy 1024 bufsize 2000 maxblocks 1 2 3
8 x File Copy 256 bufsize 500 maxblocks 1 2 3
8 x File Copy 4096 bufsize 8000 maxblocks 1 2 3
8 x Pipe Throughput 1 2 3 4 5 6 7 8 9 10
8 x Pipe-based Context Switching 1 2 3 4 5 6 7 8 9 10
8 x Process Creation 1 2 3
8 x System Call Overhead 1 2 3 4 5 6 7 8 9 10
8 x Shell Scripts (1 concurrent) 1 2^[3 3
8 x Shell Scripts (8 concurrent) 1 2 3
Wide character in printf at ./Run line 1574.
========================================================================
BYTE UNIX Benchmarks (Version 5.1.3)
System: test-pc: GNU/Linux
OS: GNU/Linux -- 4.19.0-19-loongson-3 -- #1 SMP 4.19.190.8.14 Thu Aug 24 08:54:20 UTC 2023
Machine: loongarch64 (loongarch64)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: Loongson-3A6000 (5000.0 bogomips)
CPU 1: Loongson-3A6000 (5000.0 bogomips)
CPU 2: Loongson-3A6000 (5000.0 bogomips)
CPU 3: Loongson-3A6000 (5000.0 bogomips)
CPU 4: Loongson-3A6000 (5000.0 bogomips)
CPU 5: Loongson-3A6000 (5000.0 bogomips)
CPU 6: Loongson-3A6000 (5000.0 bogomips)
CPU 7: Loongson-3A6000 (5000.0 bogomips)
15:53:56 up 3 days, 20:28, 1 user, load average: 0.36, 0.41, 0.37; runlevel 2023-11-02
------------------------------------------------------------------------
3.2 单任务性能
Benchmark Run: 一 11月 06 2023 15:53:56 - 16:21:55
8 CPUs in system; running 1 parallel copy of tests
Dhrystone 2 using register variables 41104135.1 lps (10.0 s, 7 samples)
Double-Precision Whetstone 4882.6 MWIPS (9.3 s, 7 samples)
Execl Throughput 7143.9 lps (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 1133161.1 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 314827.5 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 2770273.0 KBps (30.0 s, 2 samples)
Pipe Throughput 2130688.7 lps (10.0 s, 7 samples)
Pipe-based Context Switching 353227.4 lps (10.0 s, 7 samples)
Process Creation 15592.5 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 14861.6 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 6354.0 lpm (60.0 s, 2 samples)
System Call Overhead 2581924.8 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 41104135.1 3522.2
Double-Precision Whetstone 55.0 4882.6 887.7
Execl Throughput 43.0 7143.9 1661.4
File Copy 1024 bufsize 2000 maxblocks 3960.0 1133161.1 2861.5
File Copy 256 bufsize 500 maxblocks 1655.0 314827.5 1902.3
File Copy 4096 bufsize 8000 maxblocks 5800.0 2770273.0 4776.3
Pipe Throughput 12440.0 2130688.7 1712.8
Pipe-based Context Switching 4000.0 353227.4 883.1
Process Creation 126.0 15592.5 1237.5
Shell Scripts (1 concurrent) 42.4 14861.6 3505.1
Shell Scripts (8 concurrent) 6.0 6354.0 10590.1
System Call Overhead 15000.0 2581924.8 1721.3
========
System Benchmarks Index Score 2242.3
------------------------------------------------------------------------
3.3 多任务性能
Benchmark Run: 一 11月 06 2023 16:21:55 - 16:49:58
8 CPUs in system; running 8 parallel copies of tests
Dhrystone 2 using register variables 220723621.0 lps (10.0 s, 7 samples)
Double-Precision Whetstone 36175.1 MWIPS (9.4 s, 7 samples)
Execl Throughput 38363.4 lps (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 5597370.6 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 1731731.2 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 10649295.0 KBps (30.0 s, 2 samples)
Pipe Throughput 11214848.7 lps (10.0 s, 7 samples)
Pipe-based Context Switching 1985885.8 lps (10.0 s, 7 samples)
Process Creation 75309.7 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 50164.3 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 7509.6 lpm (60.0 s, 2 samples)
System Call Overhead 18562375.6 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 220723621.0 18913.8
Double-Precision Whetstone 55.0 36175.1 6577.3
Execl Throughput 43.0 38363.4 8921.7
File Copy 1024 bufsize 2000 maxblocks 3960.0 5597370.6 14134.8
File Copy 256 bufsize 500 maxblocks 1655.0 1731731.2 10463.6
File Copy 4096 bufsize 8000 maxblocks 5800.0 10649295.0 18360.9
Pipe Throughput 12440.0 11214848.7 9015.2
Pipe-based Context Switching 4000.0 1985885.8 4964.7
Process Creation 126.0 75309.7 5977.0
Shell Scripts (1 concurrent) 42.4 50164.3 11831.2
Shell Scripts (8 concurrent) 6.0 7509.6 12516.0
System Call Overhead 15000.0 18562375.6 12374.9
========
System Benchmarks Index Score 10330.6
到了这里,关于【测试工具】UnixBench 测试的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!