系統功能測試工具簡介— lmbench

來源:互聯網
上載者:User

1. 下載

    http://www.bitmover.com/lmbench/lmbench2.tar.gz

2. 編譯

  $tar -xf lmbench2.tar.gz
    $cd lmbench2
    $mkdir ./SCCS
    $touch ./SCCS/s.ChangeSet
    $make

3. 測試

   $ make results see

 

在我的機器上顯示:

pwrp@Joseph:~/Desktop/lmbench2$ make results see<br />cd src && make results<br />make[1]: Entering directory `/home/pwrp/Desktop/lmbench2/src'<br />make[2]: Entering directory `/home/pwrp/Desktop/lmbench2/src'<br />make[2]: Nothing to be done for `all'.<br />make[2]: Leaving directory `/home/pwrp/Desktop/lmbench2/src'<br />=====================================================================<br />L M B E N C H C ON F I G U R A T I O N<br />----------------------------------------<br />You need to configure some parameters to lmbench. Once you have configured<br />these parameters, you may do multiple runs by saying<br />"make rerun"<br />in the src subdirectory.<br />NOTICE: please do not have any other activity on the system if you can<br />help it. Things like the second hand on your xclock or X perfmeters<br />are not so good when benchmarking. In fact, X is not so good when<br />benchmarking.<br />=====================================================================<br />Hang on, we are calculating your timing granularity.<br />OK, it looks like you can time stuff down to 1000000 usec resolution.<br />Hang on, we are calculating your timing overhead.<br />OK, it looks like your gettimeofday() costs 0 usecs.<br />Hang on, we are calculating your loop overhead.<br />OK, it looks like your benchmark loop costs 0.00025656 usecs.<br />=====================================================================<br />Several benchmarks operate on a range of memory. This memory should be<br />sized such that it is at least 4 times as big as the external cache[s]<br />on your system. It should be no more than 80% of your physical memory.<br />The bigger the range, the more accurate the results, but larger sizes<br />take somewhat longer to run the benchmark.<br />MB [default 529]<br />Checking to see if you have 529 MB; please wait for a moment...<br />529MB OK<br />529MB OK<br />529MB OK<br />=====================================================================<br />This benchmark measures, by default, memory latency for a number of<br />different strides. That can take a long time and is most useful if you<br />are trying to figure out your cache line size or if your cache line size<br />is greater than 128 bytes.<br />If you are planning on sending in these results, please don't do a fast<br />run.<br />If you are measuring software only, you probably want to do a fast run,<br />so answer yes below. Answering yes means that we measure memory latency<br />with a 128 byte stride.<br />FASTMEM [default no]<br />=====================================================================<br />This benchmark measures, by default, file system latency. That can<br />take a long time on systems with old style file systems (i.e., UFS,<br />FFS, etc.). Linux' ext2fs and Sun's tmpfs are fast enough that this<br />test is not painful.<br />If you are planning on sending in these results, please don't do a fast<br />run.<br />If you want to skip the file system latency tests, answer "yes" below.<br />SLOWFS [default no]<br />=====================================================================<br />This benchmark can measure disk zone bandwidths and seek times. These can<br />be turned into whizzy graphs that pretty much tell you everything you might<br />need to know about the performance of your disk.<br />This takes a while and requires read access to a disk drive.<br />Write is not measured, see disk.c to see how if you want to do so.<br />If you want to skip the disk tests, hit return below.<br />If you want to include disk tests, then specify the path to the disk<br />device, such as /dev/sda. For each disk that is readable, you'll be<br />prompted for a one line description of the drive, i.e.,<br />Iomega IDE ZIP<br />or<br />HP C3725S 2GB on 10MB/sec NCR SCSI bus<br />DISKS [default none]<br />=====================================================================<br />Calculating mhz, please wait for a moment...<br />mhz: should take approximately 297 seconds<br />I think your CPU mhz is<br />4907 MHz, 0.20 nanosec clock</p><p>but I am frequently wrong. If that is the wrong Mhz, type in your<br />best guess as to your processor speed. It doesn't have to be exact,<br />but if you know it is around 800, say 800.<br />Type in just the Mhz part, like 3060 or 2800 for 3.06GHz or 2.8GHz P4s.<br />Processor mhz [default 4907 MHz, 0.20 nanosec clock] =====================================================================<br />We need a place to store a 264 Mbyte file as well as create and delete a<br />large number of small files. We default to /usr/tmp. If /usr/tmp is a<br />memory resident file system (i.e., tmpfs), pick a different place.<br />Please specify a directory that has enough space and is a local file<br />system.<br />FSDIR [default /tmp]<br />=====================================================================<br />If you are running on an idle network and there are other, identically<br />configured systems, on the same wire (no gateway between you and them),<br />and you have rsh access to them, then you should run the network part<br />of the benchmarks to them. Please specify any such systems as a space<br />separated list such as: ether-host fddi-host hippi-host.<br />REMOTE [default none]<br />=====================================================================<br />lmbench outputs status information as it runs various benchmarks.<br />By default this output is sent to /dev/tty, but you may redirect<br />it to any file you wish (such as /dev/null...).<br />Status output file [default /dev/tty]<br />=====================================================================<br />There is a database of benchmark results that is shipped with new<br />releases of lmbench. Your results can be included in the database<br />if you wish. The more results the better, especially if they include<br />remote networking. If your results are interesting, i.e., for a new<br />fast box, they may be made available on the lmbench web page, which is</p><p>http://www.bitmover.com/lmbench</p><p>Mail results [default yes]<br />=====================================================================<br />Please tell us about your machine. There is a form we would like you<br />to fill out that we will make available with the results. If you would<br />prefer to use a different editor, tell us the editor at the prompt.<br />If you want to skip filling out this form (please don't) then answer<br />"none" at the prompt.<br />Editor [default vi]<br />=====================================================================<br />Configuration done, thanks.<br />There is a mailing list for discussing lmbench hosted at BitMover.<br />Send mail to majordomo@bitmover.com to join the list.<br />Results going to ../results/i686-pc-linux-gnu/Joseph.0<br />Using config in CONFIG.Joseph<br />Mon Apr 11 05:25:21 EDT 2011<br />Latency measurements<br />

 

最後的測試結果概要:

Using config in CONFIG.Joseph<br />Mon Apr 11 05:25:21 EDT 2011<br />Latency measurements</p><p> L M B E N C H 2 . 0 S U M M A R Y<br /> ------------------------------------</p><p>Basic system parameters<br />----------------------------------------------------<br />Host OS Description Mhz</p><p>--------- ------------- ----------------------- ----<br />Joseph Linux 2.6.26- i686-pc-linux-gnu 4907<br />Processor, Processes - times in microseconds - smaller is better<br />----------------------------------------------------------------<br />Host OS Mhz null null open selct sig sig fork exec sh<br /> call I/O stat clos TCP inst hndl proc proc proc<br />--------- ------------- ---- ---- ---- ---- ---- ----- ---- ---- ---- ---- ----<br />Joseph Linux 2.6.26- 4907 0.20 0.46 1.85 2.88 5.757 0.66 2.99 150. 757. 4777<br />Context switching - times in microseconds - smaller is better<br />-------------------------------------------------------------<br />Host OS 2p/0K 2p/16K 2p/64K 8p/16K 8p/64K 16p/16K 16p/64K<br /> ctxsw ctxsw ctxsw ctxsw ctxsw ctxsw ctxsw<br />--------- ------------- ----- ------ ------ ------ ------ ------- -------<br />Joseph Linux 2.6.26- 4.380 7.8900 18.3 9.2600 45.0 14.4 48.7<br />*Local* Communication latencies in microseconds - smaller is better<br />-------------------------------------------------------------------<br />Host OS 2p/0K Pipe AF UDP RPC/ TCP RPC/ TCP<br /> ctxsw UNIX UDP TCP conn<br />--------- ------------- ----- ----- ---- ----- ----- ----- ----- ----<br />Joseph Linux 2.6.26- 4.380 19.8 21.6 27.6 29.6 34.9 42.1<br />File & VM system latencies in microseconds - smaller is better<br />--------------------------------------------------------------<br />Host OS 0K File 10K File Mmap Prot Page<br /> Create Delete Create Delete Latency Fault Fault<br />--------- ------------- ------ ------ ------ ------ ------- ----- -----<br />Joseph Linux 2.6.26- 12.1 7.0750 51.6 17.6 4105.0 0.762 2.00000<br />*Local* Communication bandwidths in MB/s - bigger is better<br />-----------------------------------------------------------<br />Host OS Pipe AF TCP File Mmap Bcopy Bcopy Mem Mem<br /> UNIX reread reread (libc) (hand) read write<br />--------- ------------- ---- ---- ---- ------ ------ ------ ------ ---- -----<br />Joseph Linux 2.6.26- 1080 1348 361. 1178.2 1226.2 463.9 455.8 1205 679.9<br />Memory latencies in nanoseconds - smaller is better<br /> (WARNING - may not be correct, check graphs)<br />---------------------------------------------------<br />Host OS Mhz L1 $ L2 $ Main mem Guesses<br />--------- ------------- ---- ----- ------ -------- -------<br />Joseph Linux 2.6.26- 4907 0.716 7.0860 205.4<br />

 

在results/i686-pc-linux-gnu/Joseph.0下有相應的測試資料。

 

更多的瞭解lmbench 請瀏覽其首頁

 

lmbench首頁:http://www.bitmover.com/lmbench/lmbench.html#TOC

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.