性能测试工具Lmbench使用说明

上传人:夏** 文档编号:568023387 上传时间:2024-07-23 格式:PDF 页数:8 大小:346.93KB
返回 下载 相关 举报
性能测试工具Lmbench使用说明_第1页
第1页 / 共8页
性能测试工具Lmbench使用说明_第2页
第2页 / 共8页
性能测试工具Lmbench使用说明_第3页
第3页 / 共8页
性能测试工具Lmbench使用说明_第4页
第4页 / 共8页
性能测试工具Lmbench使用说明_第5页
第5页 / 共8页
点击查看更多>>
资源描述

《性能测试工具Lmbench使用说明》由会员分享,可在线阅读,更多相关《性能测试工具Lmbench使用说明(8页珍藏版)》请在金锄头文库上搜索。

1、-cos 性能测试工具 Lmbench 的安装使用与参数说明1工具简介Linux 性能测试工具 Lmbench 是一套简易可移植的,符合 ANSI/C 标准为UNIX/POSIX 而制定的微型测评工具。一般来说,它衡量两个关键特征:反应时间和带宽。Lmbench 旨在使系统开发者深入了解关键操作的基础成本。其官方是:.bitmover./lmbench/。2 安装过程及一般错误解决办法安装使用 Linux 性能测试工具 Lmbench 的安装相对比较简单,到其官方下载压缩包Lmbench3.tar.gz下面以 lmbench3.tar.gz 在 /opt 目录下为列,说明安装方法解压 tar

2、-xzvf lmbench3.tar.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/srcmak

3、e1: * lmbench Error 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 t

4、o try runningmultiple copies of lmbench in parallel, you can specify how many here.Using this option will make the benchmark run 100x slower (sorry).-z-NOTE:WARNING! This feature is experimental and many results areknown to be incorrect or random!MULTIPLE COPIES default 1此处是提示你同时运行多少个并行的测试,对应为结果中的 s

5、cal load 项接下来是选择作业调度控制方法,选 1 允许调度作业即可。如下:Options to control job placement1) Allow scheduler to place jobs2) Assign each benchmark process with any attendent child processesto its own processor3) Assign each benchmark process with any attendent child processesto its own processor, except that it will

6、 be as far as possiblefrom other processes4) Assign each benchmark and attendent processes to their ownprocessors5) Assign each benchmark and attendent processes to their ownprocessors, except that they will be as far as possible fromeach other and other processes6) Custom placement: you assign each

7、 benchmark process with attendentchild processes to processors7) Custom placement: you assign each benchmark and attendent8)processes to processors9) Note: some benchmarks, such as bw_pipe, create attendent child10) processes for each benchmark process.For example, bw_pipe11) needs a second process

8、to send data down the pipe to be read12) by the benchmark process.If you have three copies of the13) benchmark process running, then you actually have six processes;14) three attendent child processes sending data down the pipes and15) three benchmark processes reading data and doing the measurement

9、s.16) Job placement selection: 117)再接下来就是指定存,本次指定为 512M,如下=Several 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 accu

10、rate the results, but larger sizestake somewhat longer to run the benchmark.MB default 2814512下一步为所要运行的子集,默认为全部,本次我们用默认值即可,如下lmbench measures a wide variety of system performance, and the full suite-z-of benchmarks can take a long time on some platforms.Consequently, weoffer the capability to run on

11、ly predefined subsets of benchmarks, onefor operating system specific 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 eithe

12、r needto do a full run or one of the predefined OS or hardware subsets.SUBSET (ALL|HARWARE|OS|DEVELOPMENT) default all最后出现如下画面即为测试开始了,下面只需耐心的等就可以了。Confguration done, thanks.There is a mailing list for discussing lmbench hosted at BitMover.Send mail to majordomobitmover. to join the list.Using config

13、 in CONFIG.user3-VT3456-8614CMB2013 年 11 月 11 日 星期一 10:06:07 CSTLatency measurements2013 年 11 月 11 日 星期一 10:06:45 CSTCalculating file system latency2013 年 11 月 11 日 星期一 10:06:49 CSTLocal networking2013 年 11 月 11 日 星期一 10:08:29 CSTBandwidth measurements3 测试结果查看测试完毕执行 make see 可查看到测试结果报告 Lmbench 的结果及其

14、说明、本次测试结果如下cd results & make summary percent 2/dev/null | moremake1: 正在进入目录 /opt/performance/lmbench3/resultsL M B E N C H3 . 0S U M M A R Y-(Alpha software, do not distribute)Basic system parameters-z-HostOS DescriptionMhztlbcachememscalpages lineparloadbytes- - - - - - - -user2-VT3 Linux 3.8.0-ci6

15、86-pc-linux-gnu 159888128 3.04001Processor, Processes - times in microseconds - smaller is better-HostOSMhz null nullopen slct sigsigfork exec shcallI/O stat clos TCPinst 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 i

16、nteger operations - times in nanoseconds - smaller is better-HostOSintgr intgrintgrintgrintgrbitaddmuldivmod- - - - - - -ser2-VT3 Linux 3.8.0-c 0.6300 0.0900 1.310014.113.5Basic float operations - times in nanoseconds - smaller is better-HostOSfloatfloatfloatfloataddmuldivbogo- - - - - -user2-VT3 Li

17、nux 3.8.0-c 1.2500 2.200014.514.4Basic double operations - times in nanoseconds - smaller is better-HostOSdouble double double doubleaddmuldivbogo- - - - -user2-VT3 Linux 3.8.0-c 1.2500 2.510014.514.5Context switching - times in microseconds - smaller is better-z-HostOS2p/0K 2p/16K 2p/64K 8p/16K 8p/

18、64K 16p/16K 16p/64Kctxswctxswctxsw ctxswctxswctxswctxsw- - - - - - - - -user2-VT3 Linux 3.8.0-c 3.6600 2.880073.0 5.860035.720.842.6*Local* Communication latencies in microseconds - smaller is better-HostOS 2p/0KPipe AFUDPRPC/TCPRPC/ TCPctxswUNIXUDPTCP conn- - - - - - - - - -user2-VT3 Linux 3.8.0-c

19、3.66017.4 13.717.022.9106.File & VM system latencies in microseconds - smaller is better-HostOS0K File10K FileMmapProtPage100fdCreate Delete Create Delete Latency FaultFaultselct- - - - - - - - - -user2-VT3 Linux 3.8.0-c16.613.054.720.518.1K 0.577 4.03690 3.841*Local* Communication bandwidths in MB/

20、s - bigger is better-HostOSPipe AFTCPFileMmapBcopyBcopyMemMemUNIXreread 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 graphs)-Hos

21、tOSMhzL1 $L2 $Main memRand memGuesses- -user2-VT3 Linux 3.8.0-c1598 2.506012.556.5143.7make1:正在离开目录 /opt/performance/lmbench3/results4 相关测试结果参数说明如下ID测 试 分技术参中文名称测试结果类数1BasicTlb转换缓存88测试项描述转换后备缓存的页面-z-2systemparameters345Processor,ProcessespagesCachelinebytesMemparScalloadNullcall67891011121314Basicfl

22、oatoperations15Basicfloatoperations页数缓存行字128节数存储器分3.0400层并行化并行负载1简单系统0.20(单位:s)调用(取进程号)Null简 单 IO0.39(单位:s)I/O操作(空读写的平均)stat取文档状1.57(单位:s)态的操作Open打开然后clos立即关闭3.53(单位:s)文档操作Slct tcpSelect 设8.23(单位:s)置Sig捕获处理2.52(单位:s)hndl信号ForkFork进647(单位:s)proc程后直接退出ExecFork后1873(单位:s)proc执行execve调用再退出Sh procFork后43

23、30(单位:s)执行shell再退出intgr整数位操0.63000.0900bit作加1.310014.113.5add/m乘除(单位:ns)ul/div/求模操作modFloat/a浮点型操1.25002.2000dd/mul作加14.514.4(单位:/div/b乘ns)ogo数高速缓存行字节数存储器分层并行化并行执行的 lmbench数目简单系统调用所花时间(单位微秒)简单 IO 操作(空读写的平均时间)取文档状态的操作所花时间打开文档,然后再关闭文档操作所花的时间Select 设置所花时间捕获处理信号所花的时间Fork 进程后址接退出所花的时间Fork 后执行 execve调用再退出

24、所花的时间Fork 后执行 shell 再退出所花的时间整数位操作,加,乘,除,等的运算所花时间浮点数操作,加,乘,除,等的运算所花时间-z-16Basicdoubleoperations17Contextswitching18Doubleadd/mul/div/bogo2p/0kctxsw双精度数1.25002.5100操作加14.514.5(单位:乘除ns)2 个并行处理 0K大小的数据2 个并行处理 16K大小的数据2 个并行处理 64K大小的数据8 个并行处理 16K大小的数据8 个并行处理 64K大小的数据16 个 并行 处 理16K 大小的数据16 个 并行 处 理64K 大小的数

25、据本地管道通信延时3.660(单位:s)双精度数操作,加,乘,除,等的运算所花时间2 个并行处理 0K 大小的数据所花时间2p/16kctxsw2.8800(单位:s)2 个并行处理 16K 大小的数据所花的时间192p/64kctxsw73.00(单位:s)2 个并行处理 64K 大小的数据所花时间208p/16kctxsw5.8600(单位:s)8 个并行处理 16K 大小的数据所花时间218p/64kctxsw35.7(单位:s)8 个并行处理 64K 大小的数据所花时间2216p/16k ctxsw20.8(单位:s)16 个并行处理16K大小的数据所花时间2316p/64k ctxs

26、w42.6(单位:s)16 个并行处理64K大小的数据所花时间2425262728Local*CommunicationlatenciesPipeAFUNIXUDPTCPTcpconn17.4(单位:s)13.717.022.9本地管道通信延时时间本地 UDP 通信延时时间本地 TCP 通信延时时间TCP 建立连接并关闭所花时间TCP建106立connect并关闭描述字-z-2930313233File&VMsystemlatencies0kfilecreate/delete10k filecreate/deleteProtfaultPagefault100fdselct0K 文件创建与删除1

27、0K 文件创建与删除保护页缺页16.613.0(单位:s)0K 文件创建删除所花的时间54.720.5(单位:10K 文件创建删除所花的时间s)0.577(单位:s)保护页延时时间缺页延时时间对 100 个文档描述符配置 select 的时间3435363738394041424344Local*CommunicationbandwidthsPipeMemorylatenciesFilerereadMmaprereadbcopy(libc)bcopy(hand)MemreadMemwriteL1L2MainmemRandmem4.03690(单位:s)对1003.841(单位:s)个文档描述符配置select本地通信759MBs带宽方面管道操作文档重复1166.3MB/s读存映射重2846.5MB/s复读取存拷贝1125.7MB/s存拷贝存读存写L1 缓存L2 缓存连续存1119.8MB/s2874MB/s1517MB/s本地通信带宽方面管道操作速度文档重复读取的速度存映射重复读取速度存拷贝使用 libc存拷贝手工拷贝速度存读取速度存写入速度2.5060(单位:ns)L1 缓存操作延时12.5(单位:ns)L2 缓存操作延时56.5(单位:ns)系统存连续操作延时系统存随机访问操作延时存随机访143.7(单位:ns)问延时-z-

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 建筑/环境 > 施工组织

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号