1综合性能测试(unixbench)


./Run
------------------------------------------------------------------------
Benchmark Run: 六 5月 25 2024 09:26:51 - 09:54:51
8 CPUs in system; running 1 parallel copy of tests
Dhrystone 2 using register variables 31539593.3 lps (10.0 s, 7 samples)
Double-Precision Whetstone 6482.1 MWIPS (9.9 s, 7 samples)
Execl Throughput 5137.7 lps (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 734469.9 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 265982.6 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 2000659.6 KBps (30.0 s, 2 samples)
Pipe Throughput 1664325.7 lps (10.0 s, 7 samples)
Pipe-based Context Switching 211808.0 lps (10.0 s, 7 samples)
Process Creation 4083.5 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 3877.1 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 3437.1 lpm (60.0 s, 2 samples)
System Call Overhead 1331518.3 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 31539593.3 2702.6
Double-Precision Whetstone 55.0 6482.1 1178.6
Execl Throughput 43.0 5137.7 1194.8
File Copy 1024 bufsize 2000 maxblocks 3960.0 734469.9 1854.7
File Copy 256 bufsize 500 maxblocks 1655.0 265982.6 1607.1
File Copy 4096 bufsize 8000 maxblocks 5800.0 2000659.6 3449.4
Pipe Throughput 12440.0 1664325.7 1337.9
Pipe-based Context Switching 4000.0 211808.0 529.5
Process Creation 126.0 4083.5 324.1
Shell Scripts (1 concurrent) 42.4 3877.1 914.4
Shell Scripts (8 concurrent) 6.0 3437.1 5728.5
System Call Overhead 15000.0 1331518.3 887.7
========
System Benchmarks Index Score 1364.8
------------------------------------------------------------------------
Benchmark Run: 六 5月 25 2024 09:54:51 - 10:23:04
8 CPUs in system; running 8 parallel copies of tests
Dhrystone 2 using register variables 157812940.0 lps (10.0 s, 7 samples)
Double-Precision Whetstone 37250.0 MWIPS (9.6 s, 7 samples)
Execl Throughput 17709.4 lps (29.8 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 2846650.5 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 902894.4 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 5776203.7 KBps (30.0 s, 2 samples)
Pipe Throughput 8112803.3 lps (10.0 s, 7 samples)
Pipe-based Context Switching 1139800.0 lps (10.0 s, 7 samples)
Process Creation 32554.8 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 29022.0 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 4265.4 lpm (60.1 s, 2 samples)
System Call Overhead 8171571.9 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 157812940.0 13523.0
Double-Precision Whetstone 55.0 37250.0 6772.7
Execl Throughput 43.0 17709.4 4118.5
File Copy 1024 bufsize 2000 maxblocks 3960.0 2846650.5 7188.5
File Copy 256 bufsize 500 maxblocks 1655.0 902894.4 5455.6
File Copy 4096 bufsize 8000 maxblocks 5800.0 5776203.7 9959.0
Pipe Throughput 12440.0 8112803.3 6521.5
Pipe-based Context Switching 4000.0 1139800.0 2849.5
Process Creation 126.0 32554.8 2583.7
Shell Scripts (1 concurrent) 42.4 29022.0 6844.8
Shell Scripts (8 concurrent) 6.0 4265.4 7109.1
System Call Overhead 15000.0 8171571.9 5447.7
========
System Benchmarks Index Score 5925.9
root@topeet:/test/01_unixbench/byte-unixbench-master/UnixBench$
2.CPU性能(speccpu2006)


安装编译工具
apt install build-essential gfortran

问题解决:
vim src/make-3.80/glob/glob.c
注释209 232行

然后运行根目录下的安装脚本
./install.sh

安装完成之后加载环境变量:
. ./shrc
然后输入以下命令确定是否安装成功:
runspec -V

测试命令和说明:
-
runspec --reportable -c arm64.cfg -n 1 -r 1 --tune=base all--reportable: 表示可以展示为 SPEC 官方可报告的测试结果-c rk3588.cfg: 指定使用rk3588.cfg这个配置文件-n 1: 测试次数为 1 次-r 1: 运行 1 线程(默认 1 线程,speed 模式)--tune=base: 使用 base 基准测试模式all: 表示测试所有的整数和浮点测试项
Estimated Estimated Base Base Base Peak Peak Peak Benchmarks Copies Run Time Rate Copies Run Time Rate -------------- ------ --------- --------- ------ --------- --------- 400.perlbench 1 420 23.3 * 401.bzip2 1 588 16.4 * 403.gcc 1 404 19.9 * 429.mcf 1 475 19.2 * 445.gobmk 1 474 22.1 * 456.hmmer 1 253 36.9 * 458.sjeng 1 628 19.3 * 462.libquantum 1 207 100 * 464.h264ref 1 533 41.5 * 471.omnetpp 1 561 11.1 * 473.astar 1 479 14.6 * 483.xalancbmk 1 417 16.5 * Est. SPECint_rate_base2006 23.3 Est. SPECint_rate2006 Not Run set: fp format: raw -> /test/02_spec2006/speccpu2006-v1.0.1/result/CFP2006.002.rsf format: flags -> /test/02_spec2006/speccpu2006-v1.0.1/result/CFP2006.002.flags.html format: ASCII -> /test/02_spec2006/speccpu2006-v1.0.1/result/CFP2006.002.txt format: PDF -> /test/02_spec2006/speccpu2006-v1.0.1/result/CFP2006.002.pdf format: Submission Check -> PASSED syntax check format: Screen -> Estimated Estimated Base Base Base Peak Peak Peak Benchmarks Copies Run Time Rate Copies Run Time Rate -------------- ------ --------- --------- ------ --------- --------- 410.bwaves 1 320 42.4 * 416.gamess 1 674 29.1 * 433.milc 1 327 28.1 * 434.zeusmp 1 459 19.8 * 435.gromacs 1 308 23.2 * 436.cactusADM 1 812 14.7 * 437.leslie3d 1 306 30.8 * 444.namd 1 387 20.7 * 447.dealII 1 270 42.4 * 450.soplex 1 308 27.1 * 453.povray 1 131 40.6 * 454.calculix 1 317 26.0 * 459.GemsFDTD 1 388 27.3 * 465.tonto 1 304 32.4 * 470.lbm 1 350 39.2 * 481.wrf 1 287 38.9 * 482.sphinx3 1 825 23.6 * Est. SPECfp_rate_base2006 28.6 Est. SPECfp_rate2006 Not Run -
runspec --reportable -c arm64.cfg -n 1 -r N --tune=base all--reportable: 表示可以展示为 SPEC 官方可报告的测试结果-n 1: 测试次数为 1 次-r N: 运行 N 线程(rate 模式,测试吞吐量)--tune=base: 使用 base 基准测试模式all: 表示测试所有的整数和浮点测试项
Estimated Estimated
Base Base Base Peak Peak Peak
Benchmarks Copies Run Time Rate Copies Run Time Rate
-------------- ------ --------- --------- ------ --------- ---------
400.perlbench 1 417 23.4 *
401.bzip2 1 591 16.3 *
403.gcc 1 409 19.7 *
429.mcf 1 442 20.6 *
445.gobmk 1 474 22.1 *
456.hmmer 1 254 36.8 *
458.sjeng 1 629 19.2 *
462.libquantum 1 207 99.9 *
464.h264ref 1 534 41.4 *
471.omnetpp 1 569 11.0 *
473.astar 1 471 14.9 *
483.xalancbmk 1 408 16.9 *
Est. SPECint_rate_base2006 23.5
Est. SPECint_rate2006 Not Run
set: fp
format: raw -> /test/02_spec2006/speccpu2006-v1.0.1/result/CFP2006.003.rsf
format: flags -> /test/02_spec2006/speccpu2006-v1.0.1/result/CFP2006.003.flags.html
format: ASCII -> /test/02_spec2006/speccpu2006-v1.0.1/result/CFP2006.003.txt
format: PDF -> /test/02_spec2006/speccpu2006-v1.0.1/result/CFP2006.003.pdf
format: Submission Check -> PASSED syntax check
format: Screen ->
Estimated Estimated
Base Base Base Peak Peak Peak
Benchmarks Copies Run Time Rate Copies Run Time Rate
-------------- ------ --------- --------- ------ --------- ---------
410.bwaves 1 326 41.7 *
416.gamess 1 674 29.0 *
433.milc 1 331 27.7 *
434.zeusmp 1 450 20.2 *
435.gromacs 1 308 23.1 *
436.cactusADM 1 814 14.7 *
437.leslie3d 1 306 30.7 *
444.namd 1 387 20.7 *
447.dealII 1 268 42.7 *
450.soplex 1 322 25.9 *
453.povray 1 131 40.5 *
454.calculix 1 317 26.0 *
459.GemsFDTD 1 390 27.2 *
465.tonto 1 304 32.3 *
470.lbm 1 351 39.2 *
481.wrf 1 287 39.0 *
482.sphinx3 1 813 24.0 *
Est. SPECfp_rate_base2006 28.5
Est. SPECfp_rate2006 Not Run
| Benchmarks | Estimated Base | Estimated Base | Estimated Base | Estimated Peak | Estimated Peak | Estimated Peak |
| Copies | Run Time | Rate | Copies | Run Time | Rate | |
| 400.perlbench | 1 | 420 | 23.3 * | |||
| 401.bzip2 | 1 | 588 | 16.4 * | |||
| 403.gcc | 1 | 404 | 19.9 * | |||
| 429.mcf | 1 | 475 | 19.2 * | |||
| 445.gobmk | 1 | 474 | 22.1 * | |||
| 456.hmmer | 1 | 253 | 36.9 * | |||
| 458.sjeng | 1 | 628 | 19.3 * | |||
| 462.libquantum | 1 | 207 | 100 * | |||
| 464.h264ref | 1 | 533 | 41.5 * | |||
| 471.omnetpp | 1 | 561 | 11.1 * | |||
| 473.astar | 1 | 479 | 14.6 * | |||
| 483.xalancbmk | 1 | 417 | 16.5 * | |||
| Est. SPECint_rate_base2006 | 23.3 | |||||
| Est. SPECint_rate2006 | Not Run | |||||
| 410.bwaves | 1 | 320 | 42.4 * | |||
| 416.gamess | 1 | 674 | 29.1 * | |||
| 433.milc | 1 | 327 | 28.1 * | |||
| 434.zeusmp | 1 | 459 | 19.8 * | |||
| 435.gromacs | 1 | 308 | 23.2 * | |||
| 436.cactusADM | 1 | 812 | 14.7 * | |||
| 437.leslie3d | 1 | 306 | 30.8 * | |||
| 444.namd | 1 | 387 | 20.7 * | |||
| 447.dealII | 1 | 270 | 42.4 * | |||
| 450.soplex | 1 | 308 | 27.1 * | |||
| 453.povray | 1 | 131 | 40.6 * | |||
| 454.calculix | 1 | 317 | 26.0 * | |||
| 459.GemsFDTD | 1 | 388 | 27.3 * | |||
| 465.tonto | 1 | 304 | 32.4 * | |||
| 470.lbm | 1 | 350 | 39.2 * | |||
| 481.wrf | 1 | 287 | 38.9 * | |||
| 482.sphinx3 | 1 | 825 | 23.6 * | |||
| Est. SPECfp_rate_base2006 | 28.6 | |||||
| Est. SPECfp_rate2006 | Not Run |
3.系统综合性能(Lmbench)
一、引言
Lmbench 是一套简易可移植的,符合ANSI/C 标准为UNIX/POSIX 而制定的微型测评工具。一般来说,它衡量两个关键特征:反应时间和带宽。Lmbench 旨在使系统开发者深入了解关键操作的基础成本。(百度Lmbench了解详情)
二、软件说明和下载
软件说明:
lmbench是个用于评价系统综合性能的多平台开源benchmark,能够测试包括文档读写、内存操作、进程创建销毁开销、网络等性能,测试 方法简单。 Lmbench是个多平台软件,因此能够对同级别的系统进行比较测试,反映不同系统的优劣势,通过选择不同的库函数我们就能够比较库函数的性能;更为重要的是,作为一个开源软件, lmbench提供一个测试框架,假如测试者对测试项目有更高的测试需要,能够通过少量的修改源代码达到目的(比如现在只能评测进程创建、终止的性能和进程转换的开销,通过修改部分代码即可实现线程级别的性能测试)
下载:
方式一:百度网盘为本人的一个工具,带有编写好的脚本,可直接运行脚本进行测试。
链接:https://pan.baidu.com/s/1GJ7iOSTYQa4THAjjiD4TXQ 提取码:jayn
方式二:www.bitmover.com/ lmbench (进入该网站下载)
三、测试步骤
3.1上传安装包到/home路径,解压文件并赋予权限


然后赋予权限
chmod -R 777 *

3.2、测试执行
bash lmbench-test.sh

要改一下存储容量大小,我改为了6000
4 查看结果
执行 make see 查看运行结果,若只出现两行命令,显示运行结果输出到了 summary.out 文件中,则直接查看该文件即可。
cat ./results/summary.out
将会看到如下输出:
make[1]: Entering directory '/test/03_lmbench/lmbench-3.0-a9/results'
L M B E N C H 3 . 0 S U M M A R Y
------------------------------------
(Alpha software, do not distribute)
Basic system parameters
------------------------------------------------------------------------------
Host OS Description Mhz tlb cache mem scal
pages line par load
bytes
--------- ------------- ----------------------- ---- ----- ----- ------ ----
topeet Linux 5.10.19 aarch64-linux-gnu 2279 48 128 22.3 1
topeet Linux 5.10.19 aarch64-linux-gnu 2279 48 128 22.4 1
Processor, Processes - times in microseconds - smaller is better
------------------------------------------------------------------------------
Host OS Mhz null null open slct sig sig fork exec sh
call I/O stat clos TCP inst hndl proc proc proc
--------- ------------- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
topeet Linux 5.10.19 2279 0.13 0.16 0.56 4.07 2.84 0.17 0.88 356. 870. 2189
topeet Linux 5.10.19 2279 0.13 0.16 0.57 1.63 2.81 0.17 0.89 347. 879. 2123
Basic integer operations - times in nanoseconds - smaller is better
-------------------------------------------------------------------
Host OS intgr intgr intgr intgr intgr
bit add mul div mod
--------- ------------- ------ ------ ------ ------ ------
topeet Linux 5.10.19 0.3300 0.2200 0.8900 3.5100 3.6200
topeet Linux 5.10.19 0.3300 0.2200 0.8900 3.5100 3.6200
Basic uint64 operations - times in nanoseconds - smaller is better
------------------------------------------------------------------
Host OS int64 int64 int64 int64 int64
bit add mul div mod
--------- ------------- ------ ------ ------ ------ ------
topeet Linux 5.10.19 0.330 1.7900 2.8500 4.5000
topeet Linux 5.10.19 0.330 1.7900 2.8500 4.5000
Basic float operations - times in nanoseconds - smaller is better
-----------------------------------------------------------------
Host OS float float float float
add mul div bogo
--------- ------------- ------ ------ ------ ------
topeet Linux 5.10.19 0.8800 1.3200 3.5100 1.2100
topeet Linux 5.10.19 0.8800 1.3200 3.5100 1.2100
Basic double operations - times in nanoseconds - smaller is better
------------------------------------------------------------------
Host OS double double double double
add mul div bogo
--------- ------------- ------ ------ ------ ------
topeet Linux 5.10.19 0.8800 1.3200 5.2600 2.4200
topeet Linux 5.10.19 0.8800 1.3200 5.2700 2.4200
Context switching - times in microseconds - smaller is better
-------------------------------------------------------------------------
Host OS 2p/0K 2p/16K 2p/64K 8p/16K 8p/64K 16p/16K 16p/64K
ctxsw ctxsw ctxsw ctxsw ctxsw ctxsw ctxsw
--------- ------------- ------ ------ ------ ------ ------ ------- -------
topeet Linux 5.10.19 1.2600 1.2700 1.4100 8.9200 9.0500 7.48000 13.8
topeet Linux 5.10.19 1.2400 1.3000 5.2900 0.5600 6.36000 2.83000
*Local* Communication latencies in microseconds - smaller is better
---------------------------------------------------------------------
Host OS 2p/0K Pipe AF UDP RPC/ TCP RPC/ TCP
ctxsw UNIX UDP TCP conn
--------- ------------- ----- ----- ---- ----- ----- ----- ----- ----
topeet Linux 5.10.19 1.260 4.775 25.0 8.477 10.7 99.
topeet Linux 5.10.19 1.240 4.753 5.26 8.399 10.6 79.
*Remote* Communication latencies in microseconds - smaller is better
---------------------------------------------------------------------
Host OS UDP RPC/ TCP RPC/ TCP
UDP TCP conn
--------- ------------- ----- ----- ----- ----- ----
topeet Linux 5.10.19
topeet Linux 5.10.19
File & VM system latencies in microseconds - smaller is better
-------------------------------------------------------------------------------
Host OS 0K File 10K File Mmap Prot Page 100fd
Create Delete Create Delete Latency Fault Fault selct
--------- ------------- ------ ------ ------ ------ ------- ----- ------- -----
topeet Linux 5.10.19 9.0826 5.9360 21.8 11.7 8992.0 0.162 0.10570 1.325
topeet Linux 5.10.19 9.3983 6.2696 21.8 11.2 8695.0 0.162 0.11910 1.300
*Local* Communication bandwidths in MB/s - bigger is better
-----------------------------------------------------------------------------
Host OS Pipe AF TCP File Mmap Bcopy Bcopy Mem Mem
UNIX reread reread (libc) (hand) read write
--------- ------------- ---- ---- ---- ------ ------ ------ ------ ---- -----
topeet Linux 5.10.19 2384 6458 2027 5744.7 17.4K 11.8K 8924.8 10.K 17.9K
topeet Linux 5.10.19 2448 6468 3177 5695.6 17.5K 12.0K 8938.3 10.K 17.8K
Memory latencies in nanoseconds - smaller is better
(WARNING - may not be correct, check graphs)
------------------------------------------------------------------------------
Host OS Mhz L1 $ L2 $ Main mem Rand mem Guesses
--------- ------------- --- ---- ---- -------- -------- -------
topeet Linux 5.10.19 2279 1.7630 2.6940 6.965000 441.6
topeet Linux 5.10.19 2279 1.7640 2.6870 6.889000 408.4
make[1]: Leaving directory '/test/03_lmbench/lmbench-3.0-a9/results'
4.1. 系统基本信息
输出结果中开始显示系统的基本参数信息。
其中:
tlb: 表示转换后备缓存的页面数;
cache line bytes: 高速缓存行字节数
mem par: 存储器分层并行化;
scal load: 并行执行的 Lmbench 数目。
4.2. 处理器 Processor 性能
如下输出结果单位均为 us,数值越小表示性能越好。
null call: 执行 getppid 需要的时间;
null I/O: 从 /dev/zero 读取一个字节的时长 t1,写一个字节到 /dev/null 的时长 t2,t1、t2 取平均值即为该项结果;
stat: stat 一个文件(即得到一个文件的信息)所需时长;
open clos: open 一个文件接着再 close 掉该文件一共所用时间(不包含读目录和节点的时间);
slct TCP: 通过 TCP 网络连接选择 100 个文件描述符所消耗的时间;
sig inst: install signal 所耗时长;
sig hndl: handler signal 所耗时长;
fork proc: fork 一个完全相同的 process,并把原来的 process 关掉一共所消耗的时间;
exec proc: 模拟一个 shell 进程的工作过程:fork 一个新进程执行新命令消耗的时间。
sh proc: fork 一个进程,同时询问系统 shell 来找到并运行一个新程序所用时间。
4.3. 数学运算
如下输出结果单位均为 ns,数值越小表示性能越好。
(1) 整型计算
(2) 无符号整型计算
(3) 浮点型计算
(4) 双精度浮点型计算
4.4. 上下文切换
如下输出结果单位均为 us,数值越小表示性能越好。
多个进程用 unix pipe 环连接起来,每个进程从自己的管道中读取 token,执行任务,然后将 token 写给下一个进程。
context swithing 时间包括:切换进程的时间,加上恢复进程所有状态所用的时间(包含恢复 cache 状态)。
2p/0k: 每个进程的 size 为 0(不执行任何任务),进程数为 2 时上下文切换所消耗的时间;
2p/16k: 每个进程 size 为 16K(执行任务),进程数为 2 时上下文切换所消耗的时间;
之后的测试项以此类推。
4.5. 本地通讯时延
如下输出结果单位均为 us,数值越小表示性能越好。
2p/0k: 每个进程的 size 为 0(不执行任何任务),进程数为 2 时上下文切换所消耗的时间;
Pipe: 即所谓的 hot potato 测试,两个没有具体任务的进程之间使用 pipe 通信,一个 token 在两个进程间来回传递,传递一个来回所消耗时长的平均值;
AF UNIX: 同 Pipe 测试项,但进程间通信使用的是 socket 通信;
UDP: 同 Pipe 测试项,但进程间通信使用的是 UDP/IP 通信;
RPC/UDP: 同 Pipe 测试项,但进程间通信使用的是 sun RPC 通信,默认情况下,RPC 采用 UDP 协议传输;
TCP: 同 Pipe 测试项,但进程间通信使用的是 TCP/IP 通信;
RPC/TCP: 同 Pipe 测试项,但进程间通信使用的是 sun RPC 通信,指定 RPC 采用 TCP 协议传输;
TCP conn: 创建 socket 描述符和建立连接所用时间。
4.6. 文件、内存延时
如下输出结果单位均为 us,数值越小表示性能越好。
0K File Create: 0K 文件创建所用时间;
0K File Delete: 0K 文件删除所用时间;
10K File Create: 10K 文件创建所用时间;
10K File Delete: 10K 文件删除所用时间;
Mmap Latency: 将指定文件的开头 n 个字节 mmap 到内存,然后 unmap,并记录每次 mmap 和 unmap 共消耗的时间,去每次消耗时间的最大值;
Port Fault: 保护页延时时间;
Page Faule: 缺页延时时间;
100fd selct: 对 100 个文件描述符配置 select 的时间。
4.7. 本地通信带宽
如下输出结果单位均为 MB/s,数值越大表示性能越好。
Pipe: 在两个进程建立 pipe,pipe 的每个 chunk 为 64K,通过该管道移动 50MB 数据所消耗的时间;
AF UNIX: 两个进程之间建立 unix stream socket 连接,每个 chunk 为 64K,通过该 socket 传输 10MB 数据所用的时间;
TCP: 同 Pipe 测试项,但进程间使用 TCP/IP socket 通信,传输数据量为 3MB;
File reread: 读文件并将其汇总一起所用的时间;
Mmap reread: 将文件 mmap 到内存中,从内存中读文件并将其汇总一起所用时间;
Bcopy(libc)
i bcopy,从指定内存区域拷贝指定数量的字节内容到另一个指定内存区域的速度;Bcopy(hand): do bw_mem %i fcp,把数据从磁盘的一个位置拷贝到另一个位置所用的时间;
Mem read: bw_mem i frd,累加数组中的整数值,测试把数据读入 processor 的带宽;
Mem write: do bw_mem fwr,把整数数组的每个成员设置为 1,测试写数据到内存的带宽。
4.8. 内存操作延时
如下输出结果单位均为 ns,数值越小表示性能越好。
本地测试执行 lat_mem_rd,将整数数组中每第 4 个元素的值累加起来;测试的是读数据到 processor 的带宽。
L1: 缓存1
L2: 缓存2
Main Mem: 连续内存
Rand Mem: 内存随机访问延时
Guesses:
假如 L1 和 L2 近似,会显示 “No L1 cache?”
假如 L2 和 Main Mem 近似,会显示 “No L2 cache?”
4.内存带宽性能(stream)
1.安装gfortran:
apt-get install gfortran
2.解压stream工具包
tar xvf stream-5.9-1.tar.bz2
3.进入到解压目录执行编译:
cd stream-5.9-1
make 4.同时运行单线程和多线程测试
./Run.sh -n 1 -n 4 -n 8
注:这里的-n参数的值根据实际CPU核数设定,如只有4核,只跑./Run -n 1 -n 4,以此类推;
5.执行完后到results目录查看结果

5.硬盘读写性能(iozone)
解压之后进入源码目录/iozone3_430/src/current下,如下图所示:

编译make CFLAGS=-fcommon linux-arm
编译完成如下所示:

测试:
./iozone -s 4g -i 0 -i 1 -i 2 -a -y 4k -q 16384k -f /iozonefile -Rb /home/iozonefile_rk3588.xls
./iozone -s 8g -i 0 -i 1 -i 2 -a -y 4k -q 16384k -f /iozonefile -Rb /home/iozonefile_rk3588_8.xls
./iozone -s 16g -i 0 -i 1 -i 2 -a -y 4k -q 16384k -f /iozonefile -Rb /home/iozonefile_rk3588_16.xls
random random bkwd record stride
kB reclen write rewrite read reread read write read rewrite read fwrite frewrite fread freread
4194304 4 436116 358158 5174402 4094807 2270951 252551
4194304 8 483751 256332 6320444 4891630 3472364 269135
4194304 16 552179 684541 6972783 5524091 5331936 191062
4194304 32 559849 265827 7379428 5821622 6585738 586108
4194304 64 568082 280172 7673710 6031385 7545110 585944
4194304 128 573306 500080 9033916 6142411 8316207 190163
4194304 256 573799 354331 7653196 6182861 8500953 381861
4194304 512 576573 457535 7674945 6020641 8491712 281622
4194304 1024 610564 252042 7706394 5969902 8495998 205003
4194304 2048 562769 698420 6728767 5158486 6865677 337050
4194304 4096 539499 365094 4529862 3965179 4768454 339728
4194304 8192 532515 545150 3921947 3663390 4292595 368336
4194304 16384 567006 310780 3897468 3539879 4119894 285764
iozone test complete.
Excel output is below:
"Writer report"
"4" "8" "16" "32" "64" "128" "256" "512" "1024" "2048" "4096" "8192" "16384"
"4194304" 436116 483751 552179 559849 568082 573306 573799 576573 610564 562769 539499 532515 567006
"Re-writer report"
"4" "8" "16" "32" "64" "128" "256" "512" "1024" "2048" "4096" "8192" "16384"
"4194304" 358158 256332 684541 265827 280172 500080 354331 457535 252042 698420 365094 545150 310780
"Reader report"
"4" "8" "16" "32" "64" "128" "256" "512" "1024" "2048" "4096" "8192" "16384"
"4194304" 5174402 6320444 6972783 7379428 7673710 9033916 7653196 7674945 7706394 6728767 4529862 3921947 3897468
"Re-Reader report"
"4" "8" "16" "32" "64" "128" "256" "512" "1024" "2048" "4096" "8192" "16384"
"4194304" 4094807 4891630 5524091 5821622 6031385 6142411 6182861 6020641 5969902 5158486 3965179 3663390 3539879
"Random read report"
"4" "8" "16" "32" "64" "128" "256" "512" "1024" "2048" "4096" "8192" "16384"
"4194304" 2270951 3472364 5331936 6585738 7545110 8316207 8500953 8491712 8495998 6865677 4768454 4292595 4119894
"Random write report"
"4" "8" "16" "32" "64" "128" "256" "512" "1024" "2048" "4096" "8192" "16384"
"4194304" 252551 269135 191062 586108 585944 190163 381861 281622 205003 337050 339728 368336 285764
./iozone -i 0 -i 1 -i 2 -f /iozonefile -s 16G -Rb iozonefile_rk3588_16.xls
./iozone -i 0 -i 1 -i 2 -f /iozonefile -s 8G -Rb iozonefile_rk3588_8.xls
./iozone -i 0 -i 1 -i 2 -f /iozonefile -s 4G -Rb iozonefile_rk3588_4.xls
6.网络传输性能(netperf)

./configure -build=alpha
make CFLAGS=-fcommon
make install

在另一台机器上安装:
sudo apt install netperf
然后执行netserver命令启动监听服务
netperf -H 192.168.1.221 -t TCP_STREAM -l 60 > netperf.txt
netperf -H 192.168.1.221 -t UDP_STREAM -l 60 >> netperf.txt
netperf -H 192.168.1.221 -t TCP_RR -l 60 >> netperf.txt
netperf -H 192.168.1.221 -t UDP_RR -l 60 >> netperf.txt
netperf -H 192.168.1.221 -t TCP_CRR -l 60 >> netperf.txt
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.1.221 () port 0 AF_INET
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
131072 16384 16384 60.00 44262.95
MIGRATED UDP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.1.221 () port 0 AF_INET
Socket Message Elapsed Messages
Size Size Time Okay Errors Throughput
bytes bytes secs # # 10^6bits/sec
212992 65507 60.00 7031396 0 61413.95
212992 60.00 7016613 61284.84
MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.1.221 () port 0 AF_INET : first burst 0
Local /Remote
Socket Size Request Resp. Elapsed Trans.
Send Recv Size Size Time Rate
bytes Bytes bytes bytes secs. per sec
16384 131072 1 1 60.00 93255.47
16384 131072
MIGRATED UDP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.1.221 () port 0 AF_INET : first burst 0
Local /Remote
Socket Size Request Resp. Elapsed Trans.
Send Recv Size Size Time Rate
bytes Bytes bytes bytes secs. per sec
212992 212992 1 1 60.00 95949.79
212992 212992
MIGRATED TCP Connect/Request/Response TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.1.221 () port 0 AF_INET
Local /Remote
Socket Size Request Resp. Elapsed Trans.
Send Recv Size Size Time Rate
bytes Bytes bytes bytes secs. per sec
16384 131072 1 1 60.00 23631.47
16384 131072
-
TCP STREAM 1) 远端系统(即server)使用大小为87380字节的socket接收缓冲 2) 本地系统(即client)使用大小为16384字节的socket发送缓冲 3) 向远端系统发送的测试分组大小为16384字节 4) 测试经历的时间为60.03秒 5) 吞吐量的测试结果为941.47Mbits/秒
-
UDP_STREAM UDP_STREAM方式的结果中有两行测试数据,第一行显示的是本地系统的发送统计,这里的吞吐量表示netperf向本地socket发送分组的能力。第二行显示的就是远端系统接收的情况。
-
TCP_RR TCP_RR方式的测试对象是多次TCP request和response的交易过程,但是它们发生在同一个TCP连接中,这种模式常常出现在数据库应用中。数据库的client程序与server程序建立一个TCP连接以后,就在这个连接中传送数据库的多次交易过程。 Netperf输出的结果也是由两行组成。第一行显示本地系统的情况,第二行显示的是远端系统的信息。平均的交易率(transaction rate)为3094.64次/秒。注意到这里每次交易中的request和response分组的大小都为1个字节,不具有很大的实际意义。用户可以通过测试相关的参数来改变request和response分组的大小,TCP_RR方式下的参数如下表所示: 参数说明: -r req,resp 设置request和reponse分组的大小 -s size 设置本地系统的socket发送与接收缓冲大小 -S size 设置远端系统的socket发送与接收缓冲大小 -D 对本地与远端系统的socket设置TCP_NODELAY选项
-
UDP_RR UDP_RR方式使用UDP分组进行request/response的交易过程。没有TCP连接所带来的负担。 可能会受到网络中路由器或其它的网络设备对UDP采用了与TCP不同的缓冲区空间和处理技术影响,正常情况下会高于TCP_RR的值。本次测试结果为3136.53次/秒。
-
TCP_CRR 与TCP_RR不同,TCP_CRR为每次交易建立一个新的TCP连接。最典型的应用就是HTTP,每次HTTP交易是在一条单独的TCP连接中进行的。因此,由于需要不停地建立新的TCP连接,并且在交易结束后拆除TCP连接,交易率一定会受到很大的影响。
这里交易率明显的降低了,只有1422.23次/秒。
7.数据盘读写性能(fio)

测试方法 安装libaio:(注意:顺序不能反,一定要先安装libaio,再编译) 桌面版本:
apt-get -y install libaio1 libaio-dev libraw-dev
cd fio-2.1.10
./configure --cpu=aarch64
make && make install

fio -filename=/test.4k -direct=1 -iodepth 16 -thread -rw=read -ioengine=libaio -bs=4k -size=2G -numjobs=8 -group_reporting -name=/test/07_fio/4k_read.result > /test/07_fio/result
fio -filename=/test.4k -direct=1 -iodepth 16 -thread -rw=write -ioengine=libaio -bs=4k -size=2G -numjobs=8 -group_reporting -name=/test/07_fio/4k_write.result >> /test/07_fio/result
fio -filename=/test.1M -direct=1 -iodepth 16 -thread -rw=read -ioengine=libaio -bs=1M -size=2G -numjobs=8 -group_reporting -name=/test/07_fio/1M_read.result >> /test/07_fio/result
fio -filename=/test.1M -direct=1 -iodepth 16 -thread -rw=write -ioengine=libaio -bs=1M -size=2G -numjobs=8 -group_reporting -name=/test/07_fio/1M_write.result >> /test/07_fio/result
fio -filename=/test.4k -direct=1 -iodepth 16 -thread -rw=randread -ioengine=libaio -bs=4k -size=2G -numjobs=8 -group_reporting -name=/test/07_fio/4k_randread.result >> /test/07_fio/result
fio -filename=/test.4k -direct=1 -iodepth 16 -thread -rw=randwrite -ioengine=libaio -bs=4k -size=2G -numjobs=8 -group_reporting -name=/test/07_fio/4k_randwrite.result >> /test/07_fio/result
测试完成后可查看result文件看结果:
/test/07_fio/4k_read.result: (g=0): rw=read, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=16
...
fio-3.20
Starting 8 threads
/test/07_fio/4k_read.result: (groupid=0, jobs=8): err= 0: pid=207001: Mon May 27 14:54:47 2024
read: IOPS=47.3k, BW=185MiB/s (194MB/s)(16.0GiB/88745msec)
slat (nsec): min=875, max=2133.2k, avg=7007.83, stdev=5016.92
clat (usec): min=199, max=3487.5k, avg=2610.55, stdev=15493.93
lat (usec): min=233, max=3487.5k, avg=2617.91, stdev=15493.93
clat percentiles (usec):
| 1.00th=[ 1045], 5.00th=[ 1614], 10.00th=[ 1778], 20.00th=[ 1958],
| 30.00th=[ 2073], 40.00th=[ 2180], 50.00th=[ 2311], 60.00th=[ 2376],
| 70.00th=[ 2507], 80.00th=[ 2638], 90.00th=[ 2933], 95.00th=[ 3818],
| 99.00th=[ 6390], 99.50th=[ 9110], 99.90th=[ 28181], 99.95th=[ 38536],
| 99.99th=[425722]
bw ( KiB/s): min=23890, max=376878, per=100.00%, avg=199714.24, stdev=5507.16, samples=1309
iops : min= 5969, max=94219, avg=49926.62, stdev=1376.75, samples=1309
lat (usec) : 250=0.01%, 500=0.07%, 750=0.28%, 1000=0.51%
lat (msec) : 2=22.73%, 4=72.24%, 10=3.75%, 20=0.25%, 50=0.14%
lat (msec) : 100=0.02%, 250=0.01%, 500=0.01%, 750=0.01%, 1000=0.01%
lat (msec) : 2000=0.01%, >=2000=0.01%
cpu : usr=2.13%, sys=4.20%, ctx=558488, majf=0, minf=137
IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=100.0%, 32=0.0%, >=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.1%, 32=0.0%, 64=0.0%, >=64=0.0%
issued rwts: total=4194304,0,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=16
Run status group 0 (all jobs):
READ: bw=185MiB/s (194MB/s), 185MiB/s-185MiB/s (194MB/s-194MB/s), io=16.0GiB (17.2GB), run=88745-88745msec
Disk stats (read/write):
mmcblk0: ios=246678/1475, merge=3945401/195, ticks=623046/25558, in_queue=648640, util=100.00%
/test/07_fio/4k_write.result: (g=0): rw=write, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=16
...
fio-3.20
Starting 8 threads
/test/07_fio/4k_write.result: (groupid=0, jobs=8): err= 0: pid=207097: Mon May 27 15:04:35 2024
write: IOPS=7147, BW=27.9MiB/s (29.3MB/s)(16.0GiB/586796msec); 0 zone resets
slat (nsec): min=1166, max=523153k, avg=24597.05, stdev=1700976.31
clat (usec): min=43, max=2624.1k, avg=17410.51, stdev=63041.08
lat (usec): min=72, max=2624.1k, avg=17435.47, stdev=63131.39
clat percentiles (usec):
| 1.00th=[ 1483], 5.00th=[ 2835], 10.00th=[ 3195],
| 20.00th=[ 3589], 30.00th=[ 3720], 40.00th=[ 3916],
| 50.00th=[ 4178], 60.00th=[ 4293], 70.00th=[ 4490],
| 80.00th=[ 5276], 90.00th=[ 9241], 95.00th=[ 125305],
| 99.00th=[ 227541], 99.50th=[ 329253], 99.90th=[ 926942],
| 99.95th=[1199571], 99.99th=[1501561]
bw ( KiB/s): min= 64, max=222744, per=100.00%, avg=30970.62, stdev=4675.11, samples=8583
iops : min= 16, max=55686, avg=7741.70, stdev=1168.75, samples=8583
lat (usec) : 50=0.01%, 100=0.01%, 250=0.03%, 500=0.10%, 750=0.65%
lat (usec) : 1000=0.07%
lat (msec) : 2=0.34%, 4=41.87%, 10=47.66%, 20=1.25%, 50=0.63%
lat (msec) : 100=0.69%, 250=5.88%, 500=0.58%, 750=0.10%, 1000=0.05%
lat (msec) : 2000=0.08%, >=2000=0.01%
cpu : usr=0.38%, sys=0.75%, ctx=576754, majf=0, minf=10
IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=100.0%, 32=0.0%, >=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.1%, 32=0.0%, 64=0.0%, >=64=0.0%
issued rwts: total=0,4194304,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=16
Run status group 0 (all jobs):
WRITE: bw=27.9MiB/s (29.3MB/s), 27.9MiB/s-27.9MiB/s (29.3MB/s-29.3MB/s), io=16.0GiB (17.2GB), run=586796-586796msec
Disk stats (read/write):
mmcblk0: ios=0/286936, merge=0/3916379, ticks=0/8454187, in_queue=8462460, util=99.50%
/test/07_fio/1M_read.result: (g=0): rw=read, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=libaio, iodepth=16
...
fio-3.20
Starting 8 threads
/test/07_fio/1M_read.result: (groupid=0, jobs=8): err= 0: pid=207618: Mon May 27 15:05:35 2024
read: IOPS=275, BW=275MiB/s (288MB/s)(16.0GiB/59550msec)
slat (usec): min=38, max=512225, avg=25893.10, stdev=42143.54
clat (msec): min=11, max=2415, avg=430.93, stdev=146.16
lat (msec): min=11, max=2415, avg=456.82, stdev=152.57
clat percentiles (msec):
| 1.00th=[ 105], 5.00th=[ 213], 10.00th=[ 264], 20.00th=[ 317],
| 30.00th=[ 355], 40.00th=[ 388], 50.00th=[ 418], 60.00th=[ 451],
| 70.00th=[ 493], 80.00th=[ 542], 90.00th=[ 609], 95.00th=[ 684],
| 99.00th=[ 844], 99.50th=[ 902], 99.90th=[ 1083], 99.95th=[ 1183],
| 99.99th=[ 1552]
bw ( KiB/s): min=104448, max=669573, per=100.00%, avg=285587.80, stdev=11325.53, samples=924
iops : min= 102, max= 653, avg=278.80, stdev=11.05, samples=924
lat (msec) : 20=0.11%, 50=0.24%, 100=0.48%, 250=7.28%, 500=63.64%
lat (msec) : 750=25.52%, 1000=2.52%, 2000=0.21%, >=2000=0.01%
cpu : usr=0.03%, sys=0.38%, ctx=18042, majf=0, minf=32777
IO depths : 1=0.1%, 2=0.1%, 4=0.2%, 8=0.4%, 16=99.3%, 32=0.0%, >=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.1%, 32=0.0%, 64=0.0%, >=64=0.0%
issued rwts: total=16384,0,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=16
Run status group 0 (all jobs):
READ: bw=275MiB/s (288MB/s), 275MiB/s-275MiB/s (288MB/s-288MB/s), io=16.0GiB (17.2GB), run=59550-59550msec
Disk stats (read/write):
mmcblk0: ios=32674/725, merge=0/110, ticks=6973292/412111, in_queue=7385454, util=100.00%
/test/07_fio/1M_write.result: (g=0): rw=write, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=libaio, iodepth=16
...
fio-3.20
Starting 8 threads
/test/07_fio/1M_write.result: (groupid=0, jobs=8): err= 0: pid=207681: Mon May 27 15:15:17 2024
write: IOPS=28, BW=28.2MiB/s (29.6MB/s)(16.0GiB/581311msec); 0 zone resets
slat (usec): min=93, max=4919.9k, avg=252152.23, stdev=625406.54
clat (msec): min=8, max=17001, avg=4129.88, stdev=2203.68
lat (msec): min=12, max=17001, avg=4382.04, stdev=2254.09
clat percentiles (msec):
| 1.00th=[ 84], 5.00th=[ 451], 10.00th=[ 1653], 20.00th=[ 2366],
| 30.00th=[ 2702], 40.00th=[ 3205], 50.00th=[ 4279], 60.00th=[ 4597],
| 70.00th=[ 4933], 80.00th=[ 6141], 90.00th=[ 6879], 95.00th=[ 8154],
| 99.00th=[10402], 99.50th=[10939], 99.90th=[12818], 99.95th=[13087],
| 99.99th=[14832]
bw ( KiB/s): min=13635, max=463331, per=100.00%, avg=79465.91, stdev=9160.13, samples=3318
iops : min= 8, max= 449, avg=75.27, stdev= 8.92, samples=3318
lat (msec) : 10=0.04%, 20=0.12%, 50=0.46%, 100=0.48%, 250=2.11%
lat (msec) : 500=2.25%, 750=2.20%, 1000=0.84%, 2000=2.95%, >=2000=88.54%
cpu : usr=0.08%, sys=0.04%, ctx=17511, majf=0, minf=9
IO depths : 1=0.1%, 2=0.1%, 4=0.2%, 8=0.4%, 16=99.3%, 32=0.0%, >=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.1%, 32=0.0%, 64=0.0%, >=64=0.0%
issued rwts: total=0,16384,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=16
Run status group 0 (all jobs):
WRITE: bw=28.2MiB/s (29.6MB/s), 28.2MiB/s-28.2MiB/s (29.6MB/s-29.6MB/s), io=16.0GiB (17.2GB), run=581311-581311msec
Disk stats (read/write):
mmcblk0: ios=0/38767, merge=0/1043, ticks=0/64664224, in_queue=64667302, util=99.27%
/test/07_fio/4k_randread.result: (g=0): rw=randread, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=16
...
fio-3.20
Starting 8 threads
/test/07_fio/4k_randread.result: (groupid=0, jobs=8): err= 0: pid=208207: Mon May 27 15:23:33 2024
read: IOPS=8483, BW=33.1MiB/s (34.7MB/s)(16.0GiB/494420msec)
slat (usec): min=2, max=201706, avg=36.93, stdev=428.22
clat (usec): min=88, max=533254, avg=15039.17, stdev=10664.59
lat (usec): min=292, max=533276, avg=15076.65, stdev=10688.75
clat percentiles (usec):
| 1.00th=[ 807], 5.00th=[ 1958], 10.00th=[ 3359], 20.00th=[ 6128],
| 30.00th=[ 8848], 40.00th=[ 11600], 50.00th=[ 14353], 60.00th=[ 17171],
| 70.00th=[ 20055], 80.00th=[ 22676], 90.00th=[ 25822], 95.00th=[ 27657],
| 99.00th=[ 45876], 99.50th=[ 66847], 99.90th=[111674], 99.95th=[130548],
| 99.99th=[177210]
bw ( KiB/s): min= 8035, max=48720, per=99.97%, avg=33923.78, stdev=237.61, samples=7886
iops : min= 2006, max=12180, avg=8477.79, stdev=59.39, samples=7886
lat (usec) : 100=0.01%, 250=0.01%, 500=0.06%, 750=0.75%, 1000=0.85%
lat (msec) : 2=3.51%, 4=7.18%, 10=21.64%, 20=36.19%, 50=28.96%
lat (msec) : 100=0.70%, 250=0.15%, 500=0.01%, 750=0.01%
cpu : usr=0.75%, sys=2.16%, ctx=8332454, majf=0, minf=137
IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=100.0%, 32=0.0%, >=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.1%, 32=0.0%, 64=0.0%, >=64=0.0%
issued rwts: total=4194304,0,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=16
Run status group 0 (all jobs):
READ: bw=33.1MiB/s (34.7MB/s), 33.1MiB/s-33.1MiB/s (34.7MB/s-34.7MB/s), io=16.0GiB (17.2GB), run=494420-494420msec
Disk stats (read/write):
mmcblk0: ios=4181430/7450, merge=12740/996, ticks=62631284/343162, in_queue=62974566, util=100.00%
/test/07_fio/4k_randwrite.result: (g=0): rw=randwrite, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=16
...
fio-3.20
Starting 8 threads
/test/07_fio/4k_randwrite.result: (groupid=0, jobs=8): err= 0: pid=208657: Mon May 27 15:41:42 2024
write: IOPS=3855, BW=15.1MiB/s (15.8MB/s)(16.0GiB/1087918msec); 0 zone resets
slat (usec): min=2, max=2778.7k, avg=352.85, stdev=13919.64
clat (nsec): min=1458, max=5634.7M, avg=32836509.68, stdev=162686262.13
lat (usec): min=91, max=5634.8k, avg=33190.01, stdev=163925.97
clat percentiles (usec):
| 1.00th=[ 249], 5.00th=[ 627], 10.00th=[ 1123],
| 20.00th=[ 2073], 30.00th=[ 2966], 40.00th=[ 3949],
| 50.00th=[ 4883], 60.00th=[ 5866], 70.00th=[ 6849],
| 80.00th=[ 7898], 90.00th=[ 28181], 95.00th=[ 48497],
| 99.00th=[ 801113], 99.50th=[1182794], 99.90th=[2105541],
| 99.95th=[2365588], 99.99th=[3103785]
bw ( KiB/s): min= 56, max=85966, per=100.00%, avg=15926.41, stdev=3214.43, samples=16811
iops : min= 8, max=21488, avg=3980.73, stdev=803.57, samples=16811
lat (usec) : 2=0.01%, 4=0.01%, 50=0.01%, 100=0.01%, 250=1.00%
lat (usec) : 500=2.63%, 750=2.62%, 1000=2.55%
lat (msec) : 2=10.38%, 4=21.28%, 10=46.67%, 20=1.69%, 50=6.22%
lat (msec) : 100=0.51%, 250=1.12%, 500=1.43%, 750=0.81%, 1000=0.40%
lat (msec) : 2000=0.56%, >=2000=0.14%
cpu : usr=0.35%, sys=1.10%, ctx=7577659, majf=0, minf=11
IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=100.0%, 32=0.0%, >=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.1%, 32=0.0%, 64=0.0%, >=64=0.0%
issued rwts: total=0,4194304,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=16
Run status group 0 (all jobs):
WRITE: bw=15.1MiB/s (15.8MB/s), 15.1MiB/s-15.1MiB/s (15.8MB/s-15.8MB/s), io=16.0GiB (17.2GB), run=1087918-1087918msec
Disk stats (read/write):
mmcblk0: ios=0/4191578, merge=0/13549, ticks=0/133093101, in_queue=133097231, util=99.99%
参数说明
filename=/data/test 测试文件名称,通常选择需要测试的盘的data目录;
direct=1 是否使用directIO,测试过程绕过OS自带的buffer。Linux读写的时候,内核维护了缓存,数据先写到缓存,后面再后台写到SSD。读的时候也优先读缓存里的数据。这样速度可以加快,但是一旦掉电缓存里的数据就没了。所以有一种模式叫做directIO,跳过缓存,直接读写SSD,使测试结果更真实;
rw=read 测试顺序读的I/O;
rw=write 测试顺序写的I/O;
rw=randread 测试随机读的I/O;
rw=write rw=randwrite 测试随机写的I/O;
rw=write rw=randrw 测试随机混合读和写的I/O;
bs=4k 单次io的块文件大小为4k;
size=5G 本次的测试文件大小为5g,以每次4k的io进行测试;
numjobs=8 测试线程为8;(需要根据测试的cpu线程数做对应修改)
name=job1 一个任务的名字,重复了也没关系;
thread 使用pthread_create创建线程,另一种是fork创建进程。进程的开销比线程要大,一般都采用thread测试;
group_reporting 关于显示结果的,汇总每个进程的信息;
runtime=120 测试时间为120秒,如果不写则一直将5g文件分4k每次写完为止;
time_based 如果设置的话,即使file已被完全读写或写完,也要执行完runtime规定的时间,它是通过循环执行相同的负载来实现的;
ioengine=libaio 指定io引擎使用libaio方式。 libaio:Linux本地异步I/O。请注意,Linux可能只支持具有非缓冲I/O的排队行为(设置为“direct=1”或“buffered=0”);
iodepth=32 队列的深度为32。 同步的IO:一次只能发出一个IO请求,等待内核完成才返回,这样对于单个线程iodepth总是小于1。(电梯算法:假如一部电梯一次只能搭乘一人,那么每个人一但乘上电梯,就能快速达到目的地(响应时间),但需要耗费较长的等待时间(队列长度)。虽然响应时间较短,但系统的吞吐量很小。) 异步情况下:一次提交一批,然后等待一批的完成,减少交互的次数,会更有效率。加大磁盘队列深度就是让磁盘不断工作,减少磁盘的空闲时间。(电梯算法:32个人等电梯,一次上满32人,只需等一次电梯即可)。
各项参数说明 io 执行了多少M的IO bw 平均IO带宽 iops IOPS 即I/O per second,即每秒进行读写(I/O)操作的次数,是衡量磁盘性能的主要指标之一。 runt 线程运行时间(单位毫秒) slat 提交延迟 clat 完成延迟 lat 响应时间 cpu 利用率 IO depths io队列 IO submit 单个IO提交要提交的IO数 IO complete 与上面的提交编号一样,但改为填写 IO issued 发出的读/写请求数,以及短请求数。 IO latencies IO延迟的分布 下面的io 总共执行了多少size的IO aggrb group总带宽 minb 最小平均带宽. maxb 最大平均带宽. mint group中线程的最短运行时间. maxt group中线程的最长运行时间. ios 所有group总共执行的IO数. merge 总共发生的IO合并数. ticks Number of ticks we kept the disk busy. in_queue 花费在队列上的总共时间. util 磁盘利用率
8.2D 图形性能(graphics)
修改unixbench的第52行,从-lGL -lXext -lX11修改为GL_LIBS = -lGL -lXext -lX11 -lm ,解开第49行的注释,如下图所示:

apt-get install glade mesa-common-dev libxext-dev libx11-dev pkg-config libxmuu-dev libxrender-dev
sudo apt-get install libxft-dev libfreetype6-dev
# 配置x11perf
./configure --build=arm-linux
make
make install
# 编译unixbench
make
# 进行测试
./Run graphics
结果
Benchmark Run: 一 5月 27 2024 16:12:44 - 16:30:55
8 CPUs in system; running 1 parallel copy of tests
2D graphics: aa polygons 5973.2 score (50.8 s, 2 samples)
2D graphics: ellipses 3633.5 score (50.8 s, 2 samples)
2D graphics: images and blits 174032.7 score (53.8 s, 2 samples)
2D graphics: rectangles 4501.6 score (58.9 s, 2 samples)
2D graphics: text 120825.3 score (50.2 s, 2 samples)
2D graphics: windows 1361.1 score (50.8 s, 2 samples)
3D graphics: gears 888.6 fps (20.0 s, 2 samples)
3D Graphics Benchmarks Index Values BASELINE RESULT INDEX
3D graphics: gears 33.4 888.6 266.0
========
3D Graphics Benchmarks Index Score 266.0
2D Graphics Benchmarks Index Values BASELINE RESULT INDEX
2D graphics: aa polygons 15.0 5973.2 3982.1
2D graphics: ellipses 15.0 3633.5 2422.3
2D graphics: images and blits 15.0 174032.7 116021.8
2D graphics: rectangles 15.0 4501.6 3001.1
2D graphics: text 15.0 120825.3 80550.2
2D graphics: windows 15.0 1361.1 907.4
========
2D Graphics Benchmarks Index Score 7913.0
9.3D 图形性能(glmark2-es)
apt install glmark2-es
# 测试
glmark2-es --fullscreen
https://www.bilibili.com/video/BV1ZN411D7V8/
10.10G 文件性能
没空间了,改为了5G
root@topeet:/$ dd if=/dev/zero of=/test10 bs=1M count=5120 conv=fdatasync
5120+0 records in
5120+0 records out
5368709120 bytes (5.4 GB, 5.0 GiB) copied, 64.2663 s, 83.5 MB/s
root@topeet:/$
root@topeet:/$ dd if=/test10 of=/home/kylin/testduxie1 bs=1M count=10240 conv=fdatasync
5120+0 records in
5120+0 records out
5368709120 bytes (5.4 GB, 5.0 GiB) copied, 69.4213 s, 77.3 MB/s
11.USB 存储设备性能
2.0
root@topeet:/$ dd if=/test10 of=/media/kylin/新加卷/testduxie2 bs=1M count=1024 conv=fdatasync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 32.3505 s, 33.2 MB/s
3.0
dd if=/test10 of=/media/kylin/新加卷/testduxie2 bs=1M count=1024 conv=fdatasync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 11.8471 s, 90.6 MB/s