《性能测试工具Lmbench使用说明.doc》由会员分享,可在线阅读,更多相关《性能测试工具Lmbench使用说明.doc(7页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、cos性能测试工具Lmbench的安装使用与参数说明1 工具简介 Linux性能测试工具Lmbench是一套简易可移植的,符合ANSI/C标准为UNIX/POSIX而制定的微型测评工具。一般来说,它衡量两个关键 特征:反应时间和带宽。Lmbench旨在使系统开发者深入了解关键操作的基础成本。其官方网站是: /lmbench/。2 安装过程及一般错误解决办法 安装使用Linux性能测试工具Lmbench 的安装相对比较简单,到其官方网站下载压缩包Lmbench3.tar.gz下面以lmbench3.tar.gz在 /opt目录下为列,说明安装方法解压 tar -xzvf lmbench3.tar
2、.gzcd lmbench3make results 如果在make 的时候出错,提示类似$make resultsmake1: Entering directory /home/kyuan/lmbench3/srcgmake2: Entering directory /home/kyuan/lmbench3/srcgmake2: * No rule to make target ./SCCS/s.ChangeSet, needed by bk.ver.gmake2: Leaving directory /home/kyuan/lmbench3/srcmake1: * lmbench Erro
3、r 2make1: Leaving directory /home/kyuan/lmbench3/srcmake: * results Error 2这是需要修改src/Makefile,将这么一行(在231 行的样子),将$O/lmbench : ./scripts/lmbench bk.ver中的bk.ver 去掉,就可以了。如果编译没有错误,就会出现一些选择提示以对测试进行一个配置并生成配置脚本,首先出现的如下(:If you are running on an MP machine and you want to try runningmultiple copies of lmbenc
4、h in parallel, you can specify how many here.Using this option will make the benchmark run 100x slower (sorry).NOTE: WARNING! This feature is experimental and many results are known to be incorrect or random!MULTIPLE COPIES default 1 此处是提示你同时运行多少个并行的测试,对应为结果中的scal load项接下来是选择作业调度控制方法,选1允许调度作业即可。如下:O
5、ptions to control job placement1) Allow scheduler to place jobs2) Assign each benchmark process with any attendent child processes to its own processor3) Assign each benchmark process with any attendent child processes to its own processor, except that it will be as far as possible from other proces
6、ses4) Assign each benchmark and attendent processes to their own processors5) Assign each benchmark and attendent processes to their own processors, except that they will be as far as possible from each other and other processes6) Custom placement: you assign each benchmark process with attendent ch
7、ild processes to processors7) Custom placement: you assign each benchmark and attendent processes to processorsNote: some benchmarks, such as bw_pipe, create attendent childprocesses for each benchmark process. For example, bw_pipeneeds a second process to send data down the pipe to be readby the be
8、nchmark process. If you have three copies of thebenchmark process running, then you actually have six processes;three attendent child processes sending data down the pipes and three benchmark processes reading data and doing the measurements.Job placement selection: 1再接下来就是指定内存,本次指定为512M,如下=Several
9、benchmarks operate on a range of memory. This memory should besized such that it is at least 4 times as big as the external cacheson your system. It should be no more than 80% of your physical memory.The bigger the range, the more accurate the results, but larger sizestake somewhat longer to run the
10、 benchmark.MB default 2814 512下一步为所要运行的子集,默认为全部,本次我们用默认值即可,如下lmbench measures a wide variety of system performance, and the full suiteof benchmarks can take a long time on some platforms. Consequently, weoffer the capability to run only predefined subsets of benchmarks, onefor operating system speci
11、fic benchmarks and one for hardware specificbenchmarks. We also offer the option of running only selected benchmarkswhich is useful during operating system development.Please remember that if you intend to publish the results you either needto do a full run or one of the predefined OS or hardware su
12、bsets.SUBSET (ALL|HARWARE|OS|DEVELOPMENT) default all 最后出现如下画面即为测试开始了,下面只需耐心的等就可以了。Confguration done, thanks.There is a mailing list for discussing lmbench hosted at BitMover. Send mail to to join the list.Using config in CONFIG.user3-VT3456-8614CMB2013年 11月 11日 星期一 10:06:07 CSTLatency measurements2
13、013年 11月 11日 星期一 10:06:45 CSTCalculating latency2013年 11月 11日 星期一 10:06:49 CSTLocal networking2013年 11月 11日 星期一 10:08:29 CSTBandwidth measurements3 测试结果查看 测试完毕执行make see 可查看到测试结果报告Lmbench 的结果及其说明、本次测试结果如下cd results & make summary percent 2/dev/null | moremake1: 正在进入目录 /opt/performance/lmbench3/resul
14、ts 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 - - - - - - - -user2-VT3 Linux 3.8.0-c i686-pc-linux-gnu 1598 88 128 3.0400 1Processor, Processes - times in microseconds - smaller i
15、s better-Host OS Mhz null null open slct sig sig fork exec sh call I/O stat clos TCP inst hndl proc proc proc- - - - - - - - - - - - -user2-VT3 Linux 3.8.0-c 1598 0.20 0.39 1.57 3.53 8.23 0.57 2.52 647. 1873 4330Basic integer operations - times in nanoseconds - smaller is better-Host OS intgr intgr
16、intgr intgr intgr bit add mul div mod - - - - - - - ser2-VT3 Linux 3.8.0-c 0.6300 0.0900 1.3100 14.1 13.5Basic float operations - times in nanoseconds - smaller is better-Host OS float float float float add mul div bogo- - - - - - user2-VT3 Linux 3.8.0-c 1.2500 2.2000 14.5 14.4Basic double operation
17、s - times in nanoseconds - smaller is better-Host OS double double double double add mul div bogo- - - - - - user2-VT3 Linux 3.8.0-c 1.2500 2.5100 14.5 14.5Context 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
18、ctxsw ctxsw ctxsw- - - - - - - - -user2-VT3 Linux 3.8.0-c 3.6600 2.8800 73.0 5.8600 35.7 20.8 42.6*Local* Communication latencies in microseconds - smaller is better-Host OS 2p/0K Pipe AF UDP RPC/ TCP RPC/ TCP ctxsw UNIX UDP TCP conn- - - - - - - - - -user2-VT3 Linux 3.8.0-c 3.660 17.4 13.7 17.0 22.
19、9 106.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- - - - - - - - - -user2-VT3 Linux 3.8.0-c 16.6 13.0 54.7 20.5 18.1K 0.577 4.03690 3.841*Local* Communication bandwidths in MB/s - b
20、igger is better-Host OS Pipe AF TCP File Mmap Bcopy Bcopy Mem Mem UNIX reread reread (libc) (hand) read write- - - - - - - - - - -user2-VT3 Linux 3.8.0-c 759. 1214 833. 1166.3 2846.5 1125.7 1119.8 2874 1517.Memory latencies in nanoseconds - smaller is better (WARNING - may not be correct, check grap
21、hs)-Host OS Mhz L1 $ L2 $ Main mem Rand mem Guesses- - - - - - - -user2-VT3 Linux 3.8.0-c 1598 2.5060 12.5 56.5 143.7make1:正在离开目录 /opt/performance/lmbench3/results4 相关测试结果参数说明如下ID测试分类技术参数中文名称测试结果测试项描述1Basic system parametersTlb pages转换缓存页数88转换后备缓存的页面数2Cache line bytes缓存行字节数128高速缓存行字节数3Mem par存储器分层并行
22、化 3.0400存储器分层并行化 4Scal load并行负载1并行执行的lmbench数目5Processor, ProcessesNull call简单系统调用(取进程号)0.20(单位:s)简单系统调用所花时间(单位微秒)6 Null I/O简单IO操作(空读写的平均)0.39(单位:s)简单IO操作(空读写的平均时间)7stat取文档状态的操作1.57(单位:s)取文档状态的操作所花时间8Open clos打开然后立即关闭文档操作3.53(单位:s)打开文档,然后再关闭文档操作所花的时间9Slct tcpSelect设置8.23(单位:s)Select设置所花时间10Sig hndl捕
23、获处理信号2.52(单位:s)捕获处理信号所花的时间11Fork procFork进程后直接退出647(单位:s)Fork 进程后址接退出所花的时间12Exec procFork后执行execve调用再退出1873(单位:s)Fork后执行execve调用再退出所花的时间13Sh procFork后执行shell再退出4330(单位:s)Fork后执行shell再退出所花的时间14Basic float operationsintgr bitadd/mul/div/mod整数位操作加乘除求模操作0.63000.09001.310014.113.5(单位:ns)整数位操作,加,乘,除,等的运算所
24、花时间15Basic float operationsFloat/add/mul/div/bogo浮点型操作加乘1.25002.200014.514.4(单位:ns)浮点数操作,加,乘,除,等的运算所花时间16Basic double operationsDouble add/mul/div/bogo双精度数操作加乘除1.25002.510014.514.5(单位:ns)双精度数操作,加,乘,除,等的运算所花时间17Context switching2p/0k ctxsw2个并行处理0K大小的数据3.660(单位:s)2个并行处理0K大小的数据所花时间182p/16k ctxsw2个并行处理1
25、6K大小的数据2.8800(单位:s)2个并行处理16K大小的数据所花的时间192p/64k ctxsw2个并行处理64K大小的数据73.00(单位:s)2个并行处理64K大小的数据所花时间208p/16k ctxsw8个并行处理16K大小的数据5.8600(单位:s)8个并行处理16K大小的数据所花时间218p/64k ctxsw8个并行处理64K大小的数据35.7(单位:s)8个并行处理64K大小的数据所花时间2216p/16k ctxsw16个并行处理16K大小的数据20.8(单位:s)16个并行处理16K大小的数据所花时间2316p/64k ctxsw16个并行处理64K大小的数据42
26、.6(单位:s)16个并行处理64K大小的数据所花时间24Local* Communication latenciesPipe本地管道通信延时17.4(单位:s)本地管道通信延时时间25AF UNIX13.726UDP17.0本地UDP通信延时时间27TCP22.9本地TCP通信延时时间28Tcp connTCP建立connect并关闭描述字106TCP建立连接并关闭所花时间29File & VM system latencies0k 0K文件创建与删除16.613.0(单位:s)0K文件创建删除所花的时间3010k delete10K文件创建与删除54.720.5(单位:s)10K文件创建删
27、除所花的时间31Prot fault保护页0.577(单位:s)保护页延时时间32Page fault缺页4.03690(单位:s)缺页延时时间33100fd selct对100个文档描述符配置select3.841(单位:s)对100个文档描述符配置select的时间34Local* Communication bandwidthsPipe 本地通信带宽方面管道操作759MBs本地通信带宽方面管道操作速度35文档重复读1166.3MB/s文档重复读取的速度36Mmap reread内存映射重复读取2846.5MB/s内存映射重复读取速度37bcopy(libc)内存拷贝1125.7MB/s内存拷贝使用libc38bcopy(hand)内存拷贝1119.8MB/s内存拷贝手工拷贝速度39Mem read内存读2874MB/s内存读取速度40Mem write内存写1517MB/s内存写入速度41Memory latenciesL1 L1缓存2.5060(单位:ns)L1缓存操作延时42L2L2缓存12.5(单位:ns)L2缓存操作延时43Main mem连续内存56.5(单位:ns)系统内存连续操作延时44Rand mem内存随机访问延时143.7(单位:ns)系统内存随机访问操作延时7 / 7