CPU/内存/综合性能评估工具汇总-1:lmbench

一、概括

嵌入式开发中对要设计的产品、立项的项目进行设计时,往往需要对关键芯片进行性能评估,本文主要总结基于linux系统的产品在性能评估时的工具使用总结,在aarch64(arm64平台下测试),板卡根文件系统为debian系统。
工具列表如下:

名称作用git源码链接
lmbench带宽测评,反应时间测评https://github.com/redrose2100/lmbench.git
stream内存带宽(每秒通过的字节数)测试https://github.com/jeffhammond/STREAM.git
unixbench测试 unix 系统基本性能,测试的结果不仅仅只是CPU,内存,或者磁盘为基准,还取决于硬件,操作系统版本,编译器.https://github.com/kdlucas/byte-unixbench.git
cyclictest 和 stress-ng实时性测试压力工具 git clone https://github.com/ColinIanKing/stress-ng.git ,测试工具git://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git

二、lmbench

1、编译
export CC=aarch64-linux-gnu-gcc
make clean
make
提示报错:

/opt/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/7.5.0/../../../../aarch64-linux-gnu/bin/ld: 找不到 -ltirpc
collect2: error: ld returned 1 exit status
Makefile:295: recipe for target '../bin/x86_64-pc-linux-gnu/bw_file_rd' failed
make[2]: *** [../bin/x86_64-pc-linux-gnu/bw_file_rd] Error 1

将script/build中的 LDLIBS=“-lm -ltirpc” 改成 LDLIBS=“-lm”
make 编译通过

2、将文件夹压缩后,拷贝到嵌入式板卡中解压
3、cp -r lmbench/bin/aarch64-linux-gnu lmbench/bin/aarch64-unknown-linux ,此句在板卡中操作
4、测试,以下命令在板卡中执行

cd scripts
./config-run
根据提示 第一个提示输入1  回车 ,第二个提示输入1 回车,  第三个提示输入 128 回车
随后一直回车
直到看到 是否发邮件 输入 no 回车, 等待产生文件配置文件
./results
等待测试结果
cd  ../results
make summary percent 2>/dev/null | more > lmbench-result.txt
将lmbench-result.txt从板卡中导出

5、结果含义分析,示例结果如下

                 L M B E N C H  3 . 0   S U M M A R Y
                 ------------------------------------
                 (Alpha software, do not distribute)


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
--------- ------------- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
driver    Linux 5.10.16 1797 0.31 0.37 0.97 2.51 5.25 0.50 2.42 174. 566. 1395

Basic integer operations - times in nanoseconds - smaller is better
-------------------------------------------------------------------
Host                 OS  intgr intgr  intgr  intgr  intgr
                          bit   add    mul    div    mod
--------- ------------- ------ ------ ------ ------ ------
driver    Linux 5.10.16 0.3700 0.1400 0.0400 4.4600 5.4300

Basic float operations - times in nanoseconds - smaller is better
-----------------------------------------------------------------
Host                 OS  float  float  float  float
                         add    mul    div    bogo
--------- ------------- ------ ------ ------ ------
driver    Linux 5.10.16 2.2300 2.2300 6.1300 2.5100

Basic double operations - times in nanoseconds - smaller is better
------------------------------------------------------------------
Host                 OS  double double double double
                         add    mul    div    bogo
--------- ------------- ------  ------ ------ ------
driver    Linux 5.10.16 2.2300 2.2300   10.0 8.9100

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
--------- ------------- ------ ------ ------ ------ ------ ------- -------
driver    Linux 5.10.16 1.9100 2.0300 1.9300 3.0500 3.5400 3.32000    10.1

*Local* Communication latencies in microseconds - smaller is better
---------------------------------------------------------------------
Host                 OS 2p/0K  Pipe AF     UDP  RPC/   TCP  RPC/ TCP
                        ctxsw       UNIX         UDP         TCP conn
--------- ------------- ----- ----- ---- ----- ----- ----- ----- ----
driver    Linux 5.10.16 1.910 7.999 11.9  17.0        24.4        67.

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
--------- ------------- ------ ------ ------ ------ ------- ----- ------- -----
driver    Linux 5.10.16   15.6   13.0   34.8   19.4  1638.0 0.363 0.36280 2.550

*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
--------- ------------- ---- ---- ---- ------ ------ ------ ------ ---- -----
driver    Linux 5.10.16 2214 2956 1695 3266.6 9768.4 5202.6 5127.5 6420 7181.

Memory latencies in nanoseconds - smaller is better
    (WARNING - may not be correct, check graphs)
------------------------------------------------------------------------------
Host                 OS   Mhz   L1 $   L2 $    Main mem    Rand mem    Guesses
--------- -------------   ---   ----   ----    --------    --------    -------
driver    Linux 5.10.16  1797 2.2270 4.9450   12.1       134.1

结果解释:
Processor, Processes - times in microseconds - smaller is better
CPU处理性能各项时间数值越小越好,单位毫秒,包括:

结果名称含义解释
OSOS版本
Mhzcpu动态运行的频率
null call系统调用
null I/O模拟操作IO设备的时间
statstat 文件信息的时间
open clos打开关闭文件的时间
slct TCP网络连接的建立,管道,TCP,UDP 和RPC hot potato
sig inst信号安装时间
sig hndl信号处理时间
fork procfork一个进程的时间
exec proc执行一个模拟进程的时间
sh procshell脚本执行时间

Basic integer operations - times in nanoseconds - smaller is better
基本整形运算操作时间数值越小越好,单位:纳秒,包括

结果名称解释说明
OSOS版本
intgr bit位操作
intgr add加法操作
intgr mul乘法操作
intgr div除法操作
intgr mod取模操作

Basic float operations - times in nanoseconds - smaller is better
基本单精度浮点运算操作时间数值越小越好,单位:纳秒,包括:

Basic double operations - times in nanoseconds - smaller is better
基本双精度浮点运算操作时间数值越小越好,单位:纳秒,包括:

Context switching - times in microseconds - smaller is better
上下文切换操作时间数值越小越好,单位:毫秒,包括:

Local Communication latencies in microseconds - smaller is better

File & VM system latencies in microseconds - smaller is better

Local Communication bandwidths in MB/s - bigger is better

Memory latencies in nanoseconds - smaller is better

  • 25
    点赞
  • 25
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值