性能测试工具Lmbench使用说明.docx
- 文档编号:9208527
- 上传时间:2023-02-03
- 格式:DOCX
- 页数:14
- 大小:20.68KB
性能测试工具Lmbench使用说明.docx
《性能测试工具Lmbench使用说明.docx》由会员分享,可在线阅读,更多相关《性能测试工具Lmbench使用说明.docx(14页珍藏版)》请在冰豆网上搜索。
性能测试工具Lmbench使用说明
cos性能测试工具Lmbench的安装使用与参数说明
1工具简介
Linux性能测试工具Lmbench是一套简易可移植的,符合ANSI/C标准为UNIX/POSIX而制定的微型测评工具。
一般来说,它衡量两个关键特征:
反应时间和带宽。
Lmbench旨在使系统开发者深入了解关键操作的基础成本。
其官方网站是:
/lmbench/。
2安装过程及一般错误解决办法
安装使用Linux性能测试工具Lmbench的安装相对比较简单,到其官方网站下载压缩包下面以在/opt目录下为列,说明安装方法
解压tar-xzvflmbench3
makeresults
如果在make的时候出错,提示类似
$makeresults
make[1]:
Enteringdirectory`/home/kyuan/lmbench3/src'
gmake[2]:
Enteringdirectory`/home/kyuan/lmbench3/src'
gmake[2]:
***Noruletomaketarget`../SCCS/',neededby'..
gmake[2]:
Leavingdirectory`/home/kyuan/lmbench3/src'
make[1]:
***[lmbench]Error2
make[1]:
Leavingdirectory`/home/kyuan/lmbench3/src'
make:
***[results]Error2
这是需要修改src/Makefile,将这么一行(在231行的样子),$O/lmbench:
../scripts/lmbench中的去掉,就可以了。
如果编译没有错误,就会出现一些选择提示以对测试进行一个配置并生成配置脚本,首先出现的如下(:
IfyouarerunningonanMPmachineandyouwanttotryrunningmultiplecopiesoflmbenchinparallel,youcanspecifyhowmanyhere.Usingthisoptionwillmakethebenchmarkrun100xslower(sorry).NOTE:
WARNING!
Thisfeatureisexperimentalandmanyresultsare
knowntobeincorrectorrandom!
MULTIPLECOPIES[default1]此处是提示你同时运行多少个并行的测试,对应为结果中的scalload项接下来是选择作业调度控制方法,选1允许调度作业即可。
如下:
Optionstocontroljobplacement
1)Allowschedulertoplacejobs
2)Assigneachbenchmarkprocesswithanyattendentchildprocesses
toitsownprocessor
3)Assigneachbenchmarkprocesswithanyattendentchildprocessestoitsownprocessor,exceptthatitwillbeasfaraspossiblefromotherprocesses
4)Assigneachbenchmarkandattendentprocessestotheirownprocessors
5)Assigneachbenchmarkandattendentprocessestotheirownprocessors,exceptthattheywillbeasfaraspossiblefrom
eachotherandotherprocesses
6)Customplacement:
youassigneachbenchmarkprocesswithattendentchildprocessestoprocessors
7)Customplacement:
youassigneachbenchmarkandattendent
8)processestoprocessors
9)Note:
somebenchmarks,suchasbw_pipe,createattendentchild
10)processesforeachbenchmarkprocess.Forexample,bw_pipe
11)needsasecondprocesstosenddatadownthepipetoberead
12)bythebenchmarkprocess.Ifyouhavethreecopiesofthe
13)benchmarkprocessrunning,thenyouactuallyhavesixprocesses;
14)threeattendentchildprocessessendingdatadownthepipesand
15)threebenchmarkprocessesreadingdataanddoingthemeasurements.
16)Jobplacementselection:
1
17)再接下来就是指定内存,本次指定为512M,如下
Severalbenchmarksoperateonarangeofmemory.Thismemoryshouldbesizedsuchthatitisatleast4timesasbigastheexternalcache[s]onyoursystem.Itshouldbenomorethan80%ofyourphysicalmemory.Thebiggertherange,themoreaccuratetheresults,butlargersizestakesomewhatlongertorunthebenchmark.
MB[default2814]
512
下一步为所要运行的子集,默认为全部,本次我们用默认值即可,如下
lmbenchmeasuresawidevarietyofsystemperformance,andthefullsuiteofbenchmarkscantakealongtimeonsomeplatforms.Consequently,weofferthecapabilitytorunonlypredefinedsubsetsofbenchmarks,one
v1.0可编辑可修改foroperatingsystemspecificbenchmarksandoneforhardwarespecificbenchmarks.Wealsooffertheoptionofrunningonlyselectedbenchmarkswhichisusefulduringoperatingsystemdevelopment.
PleaserememberthatifyouintendtopublishtheresultsyoueitherneedtodoafullrunoroneofthepredefinedOSorhardwaresubsets.
SUBSET(ALL|HARWARE|OS|DEVELOPMENT)[defaultall]最后出现如下画面即为测试开始了,下面只需耐心的等就可以了。
Confgurationdone,thanks.ThereisamailinglistfordiscussinglmbenchhostedatBitMover.Sendmailtotojointhelist.
Usingconfigin2013年11月11日星期一10:
06:
07CSTLatencymeasurements2013年11月11日星期一10:
06:
45CST
Calculatingfilesystemlatency2013年11月11日星期一10:
06:
49CST
Localnetworking2013年11月11日星期一10:
08:
29CST
Bandwidthmeasurements
3测试结果查看
测试完毕执行makesee可查看到测试结果报告Lmbench的结果及其说明、
本次测试结果如下
cdresults&&makesummarypercent2>/dev/null|more
make[1]:
正在进入目录`/opt/performance/lmbench3/results'
LMBENCH3.0SUMMARY
(Alphasoftware,donotdistribute)
Basicsystemparameters
HostOSDescriptionMhztlbcachememscal
pageslineparload
bytes
user2-VT3Linuxi686-pc-linux-gnu1598881281Processor,Processes-timesinmicroseconds-smallerisbetter
HostOSMhznullnullopenslctsigsigforkexecsh
callI/OstatclosTCPinsthndlprocprocproc
user2-VT3Linux1598647.18734330
Basicintegeroperations-timesinnanoseconds-smallerisbetter
Host
OSintgrintgrintgrintgrintgrbitaddmuldivmod
ser2-VT3Linux
Basicfloatoperations-timesinnanoseconds-smallerisbetter
Host
OSfloatfloatfloatfloataddmuldivbogo
user2-VT3Linux
Basicdoubleoperations-timesinnanoseconds-smallerisbetter
Host
OSdoubledoubledoubledouble
addmuldivbogo
user2-VT3Linux
Contextswitching-timesinmicroseconds-smallerisbetter
HostOS2p/0K2p/16K2p/64K8p/16K8p/64K16p/16K16p/64K
ctxswctxswctxswctxswctxswctxswctxsw
user2-VT3Linux
*Local*Communicationlatenciesinmicroseconds-smallerisbetter
HostOS2p/0KPipeAFUDPRPC/TCPRPC/TCP
ctxswUNIXUDPTCPconn
user2-VT3Linux106.
File&VMsystemlatenciesinmicroseconds-smallerisbetter
HostOS0KFile10KFileMmapProtPage100fd
CreateDeleteCreateDeleteLatencyFaultFaultselct
user2-VT3Linux
*Local*CommunicationbandwidthsinMB/s-biggerisbetter
HostOSPipeAFTCPFileMmapBcopyBcopyMemMem
UNIXrereadreread(libc)(hand)readwrite
user2-VT3Linux759.1214833.28741517.
Memorylatenciesinnanoseconds-smallerisbetter
(WARNING-maynotbecorrect,checkgraphs)
Host
OSMhzL1$L2$MainmemRandmemGuesses
user2-VT3Linux1598
make[1]:
正在离开目录`/opt/performance/lmbench3/results'
4相关测试结果参数说明如下
ID
测试分
类
技术参
数
中文名称
测试结果
测试项描述
1
Basic
Tlb
转换缓存
88
转换后备缓存的页面
system
pages
页数
数
2
parame
Cache
缓存行字
128
高速缓存行字节数
ters
line
节数
bytes
3
Mem
存储器分
存储器分层并行化
par
层并行化
4
Scal
并行负载
1
并行执行的lmbench
load
数目
5
Proces
Null
简单系统
(单位:
μ
s)
简单系统调用所花时
sor,
call
调用(取
间(单位微秒)
Proces
进程号)
6
ses
Null
简单IO
(单位:
μ
s)
简单IO操作(空读
I/O
操作(空读写的平均)
写的平均时间)
7
stat
取文档状
态的操作
(单位:
μs)
取文档状态的操作所
花时间
8
Openclos
打开然后
立即关闭
文档操作
(单位:
μs)
打开文档,然后再关闭文档操作所花的时间
9
Slcttcp
Select设置
(单位:
μs)
Select设置所花时间
10
Sighndl
捕获处理
信号
(单位:
μs)
捕获处理信号所花的
时间
11
Forkproc
Fork进程后直接退出
647(单位:
μs)
Fork进程后址接退出所花的时间
12
Execproc
Fork后执行execve调用再退出
1873(单位:
μs)
Fork后执行execve调用再退出所花的时间
13
Shproc
Fork后执行shell再退出
4330(单位:
μs)
Fork后执行shell再退出所花的时间
14
Basicfloatoperat
intgrbit/add/mu
整数位操
作/加/
乘/除/
////(单位:
ns)
整数位操作,加,乘,除,等的运算所花时间
ions
l/div/
求模操作
mod
15
Basic
Float/
浮点型操
///(单位:
ns)
浮点数操作,加,
float
add/mu
作/加/
乘,除,等的运算所
operat
l/div/
乘/
花时间
ions
bogo
16
Basic
Double
双精度数
///(单位:
ns)
双精度数操作,加,
double
add/mu
操作/加
乘,除,等的运算所
operat
l/div/
/乘/除
花时间
ions
bogo
17
Contex
2p/0k
2个并行
(单位:
μs)
2个并行处理0K大
t
ctxsw
处理0K
小的数据所花时间
switch
大小的数
ing
据
18
2p/16k
2个并行
(单位:
μs)
2个并行处理16K大
ctxsw
处理16K
小的数据所花的时间
大小的数
据
19
2p/64k
2个并行
(单位:
μs)
2个并行处理64K大
ctxsw
处理64K
小的数据所花时间
大小的数
据
20
8p/16k
8个并行
(单位:
μs)
8个并行处理16K大
ctxsw
处理16K
小的数据所花时间
大小的数
据
21
8p/64k
8个并行
(单位:
μs)
8个并行处理64K大
ctxsw
处理64K大小的数据
小的数据所花时间
22
16p/16
16个并
(单位:
μ
s)
16个并行处理16K
k
行处理
大小的数据所花时间
ctxsw
16K大小
的数据
23
16p/64
16个并
(单位:
μ
s)
16个并行处理64K
k
行处理
大小的数据所花时间
ctxsw
64K大小
的数据
24
Local*
Pipe
本地管道
(单位:
μ
s)
本地管道通信延时时
Commun
通信延时
间
25
icatio
AF
n
UNIX
26
latenc
UDP
本地UDP通信延时时
ies
间
27
TCP
本地TCP通信延时时
间
28
Tcp
TCP建立
106
TCP建立连接并关闭
conn
connect
所花时间
并关闭描
述字
29
File&
0k
0K文件
/(单位:
μs)
0K文件创建/删除
VM
file
创建与删
所花的时间
system
create
除
latenc
/delet
ies
e
30
10kfilecreate/delete
10K文件创建与删除
/(单位:
μs)
10K文件创建/删除
所花的时间
31
Protfault
保护页
(单位:
μs)
保护页延时时间
32
Pagefault
缺页
(单位:
μs)
缺页延时时间
33
100fdselct
对100个文档描述符配置select
(单位:
μs)
对100个文档描述符配置select的时间
34
Local*
Commun
icatio
Pipe
本地通信
带宽方面
管道操作
759MB/s
本地通信带宽方面管
道操作速度
35
nbandwi
Filereread
文档重复
读
s
文档重复读取的速度
36
dths
Mmapreread
内存映射
重复读取
s
内存映射重复读取速
度
37
bcopy(
libc)
内存拷贝
s
内存拷贝使用libc
38
bcopy(hand)
内存拷贝
s
内存拷贝手工拷贝速
度
39
Memread
内存读
2874MB/s
内存读取速度
40
Memwrite
内存写
1517MB/s
内存写入速度
41
Memory
L1
L1缓存
(单位:
ns)
L1缓存操作延时
42
latenc
L2
L2缓存
(单位:
ns)
L2缓存操作延时
43
ies
Mainmem
连续内存
(单位:
ns)
系统内存连续操作延
时
44
Randmem
内存随机
访问延时
(单位:
ns)
系统内存随机访问操
作延时
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 性能 测试 工具 Lmbench 使用说明