- 环境如下:
- 硬件:华为鲲鹏云 ECS(4vCPUs | 16GB)
- OS:CentOS 7.6 / Kernel 4.18
- 安装支持库
yum groupinstall "Development Tools" -y
yum install libX11-devel mesa-libGL-devel perl-Time-HiRes -y
- 下载UnixBench(正常情况不用不可描述的工具是下载不了的)
cd /opt/source
wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/byte-unixbench/UnixBench5.1.3.tgz
tar xvfz UnixBench5.1.3.tgz
mv UnixBench /opt/tools/installed/
- 修改make文件关闭图形测试
cd /opt/tools/installed/UnixBench
vim Makefile
注释掉 GRAPHICS_TESTS = defined
# GRAPHICS TESTS: Uncomment the definition of "GRAPHIC_TESTS" to enable
# the building of the graphics benchmarks. This will require the
# X11 libraries on your system.
#
# Comment the line out to disable these tests.
# GRAPHIC_TESTS = defined
- 执行测试
./Run
- 测试结果(大于1000分应该就还好)。从结果看来,感觉没有认出cpu数,一直按照单核测试方法测试,所有结果应该不是特别准确。
========================================================================
BYTE UNIX Benchmarks (Version 5.1.3)
System: test-1: GNU/Linux
OS: GNU/Linux -- 4.18.0-80.7.2.el7.aarch64 -- #1 SMP Thu Sep 12 16:13:20 UTC 2019
Machine: aarch64 (aarch64)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
14:38:19 up 1 day, 3:33, 2 users, load average: 0.00, 0.00, 0.00; runlevel 3
------------------------------------------------------------------------
Benchmark Run: Thu Jul 16 2020 14:38:19 - 15:06:28
0 CPUs in system; running 1 parallel copy of tests
Dhrystone 2 using register variables 27969004.9 lps (10.0 s, 7 samples)
Double-Precision Whetstone 3497.4 MWIPS (10.0 s, 7 samples)
Execl Throughput 4935.3 lps (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 516728.7 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 139055.7 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 1657275.1 KBps (30.0 s, 2 samples)
Pipe Throughput 1167334.6 lps (10.0 s, 7 samples)
Pipe-based Context Switching 116831.8 lps (10.0 s, 7 samples)
Process Creation 9625.6 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 7959.4 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 2368.1 lpm (60.0 s, 2 samples)
System Call Overhead 1026532.0 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 27969004.9 2396.7
Double-Precision Whetstone 55.0 3497.4 635.9
Execl Throughput 43.0 4935.3 1147.7
File Copy 1024 bufsize 2000 maxblocks 3960.0 516728.7 1304.9
File Copy 256 bufsize 500 maxblocks 1655.0 139055.7 840.2
File Copy 4096 bufsize 8000 maxblocks 5800.0 1657275.1 2857.4
Pipe Throughput 12440.0 1167334.6 938.4
Pipe-based Context Switching 4000.0 116831.8 292.1
Process Creation 126.0 9625.6 763.9
Shell Scripts (1 concurrent) 42.4 7959.4 1877.2
Shell Scripts (8 concurrent) 6.0 2368.1 3946.8
System Call Overhead 15000.0 1026532.0 684.4
========
System Benchmarks Index Score 1158.0
说明:
| 测试项 | 说明 | 基准线(BASELINE) |
|---|---|---|
| Dhrystone 2 using register variables | 字符串处理 | 116700.0 lps |
| Double-Precision Whetstone | 浮点操作能力 | 55.0 MWIPS |
| Execl Throughput | excel系统调用吞吐量 | 43.0 lps |
| File Copy 1024 bufsize 2000 maxblocks | 文本传输(拷贝)速率 | 3960.0 KBps |
| File Copy 256 bufsize 500 maxblocks | 同上(buf和最大块不同) | 1655.0 KBps |
| File Copy 4096 bufsize 8000 maxblocks | 同上(buf和最大块不同) | 5800.0 KBps |
| Pipe Throughput | 512 byte 读写的管道吞吐量 | 12440.0 lps |
| Pipe-based Context Switching | 两个进程的管道数据交换 | 4000.0 lps |
| Process Creation | 创建回收子进程性能 | 126.0 lps |
| Shell Scripts (1 concurrent) | 一秒内一个进程并发处理shell脚本1次 | 42.4 lpm |
| Shell Scripts (8 concurrent) | 一秒内一个进程并发处理shell脚本8次 | 6.0 lpm |
| System Call Overhead | 系统一次调用的代价 | 15000.0 lps |