-
cos
性能测试工具
Lmbench
的安装使用与参数说明
1
工具简介
Linux
性能测试工具
Lmbench
是一套简易可移植的,符合
ANSI/C
标准为
UNIX/POSIX
而制定的微型测评工具。一般来说,它衡量两个关键<
/p>
特征:反应时间和带宽。
Lmbenc
h
旨
在使系统开发者深入了解关键操作的基础成本。其官方网站
是:
/lmbench/
。
2
安装过程及一般错误解决办法
安装使用
Linux
p>
性能测试工具
Lmbench
的安装相对
比较简单,到其官方网站下载压
缩包下面以在
/opt
目录下为列,说明安装方法
解压
tar -xzvf
lmbench3
make
results
如果在
make
的时候出错,提示类似
$$make results
make[1]: Entering directory
`/home/kyuan/lmbench3/src'
gmake[2]: Entering directory
`/home/kyuan/lmbench3/src'
gmake[2]: *** No rule to make target
`../SCCS/', needed by '..
gmake[2]: Leaving directory
`/home/kyuan/lmbench3/src'
make[1]: *** [lmbench] Error 2
make[1]: Leaving directory
`/home/kyuan/lmbench3/src'
make: *** [results] Error 2
这
是
需
要
p>
修
改
src/Makefile
,
将
这
么
一
行
(
在
231
行
的
样
< br>子
)
,
将
$$O/lmbench : ../scripts/lmbench
中的
去掉,就可以了。
如果编译没有错误,就会出现一些选择提示以对测试进行一个配置并生成配置脚本,首先出
现的如下(:
If you are
running on an MP machine and you want to try
running
multiple copies of lmbench 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]
此处是提示你同时运行多少个并行的测试,对应为结果中的<
/p>
scal load
项
接下来是选择作业调度控制方法,选
1
允许调度作业即
可。如下:
Options to control job
placement
1)
Allow scheduler to place jobs
2) Assign
each benchmark process with any attendent child
processes
to its own processor
3) Assign each benchmark process with
any attendent child processes
to its
own processor, except that it will be as far as
possible
from other processes
4) Assign each benchmark and attendent
processes to their own
processors
5) Assign each benchmark and attendent
processes to their own
processors,
except that they will be as far as possible
from
each other and other
processes
6) Custom placement: you
assign each benchmark process with attendent
child processes to
processors
7)
Custom placement: you assign each
benchmark and attendent
8)
processes to processors
9)
Note: some
benchmarks, such as bw_pipe, create attendent
child
10)
processes for each benchmark process.
For example, bw_pipe
11)
needs a second process to send data
down the pipe to be read
12)
by the benchmark process. If you have
three copies of the
13)
benchmark process running, then you
actually have six processes;
14)
three
attendent child processes sending data down the
pipes and
15)
three benchmark processes reading data
and doing the measurements.
16)
Job placement
selection: 1
17)
再接下来就是指定内存,本次指定为
512M
< br>,如下
=====================
================================================
Several benchmarks operate on a range
of memory. This memory should be
sized
such that it is at least 4 times as big as the
external cache[s]
on your system. It
should be no more than 80% of your physical
memory.
The bigger the range, the more
accurate the results, but larger sizes
take somewhat longer to run the
benchmark.
MB [default 2814]
512
下
一步为所要运行的子集,默认为全部,本次我们用默认值即可,如下
lmbench measures a wide
variety of system performance, and the full suite
of benchmarks can take a long time on
some platforms. Consequently, we
offer
the capability to run only predefined subsets of
benchmarks, one
for operating system
specific benchmarks and one for hardware specific
benchmarks. We also offer the option
of running only selected benchmarks
which is useful during operating system
development.
Please
remember that if you intend to publish the results
you either need
to 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 to join the list.
Using config in
2013
年
11
月
11
日
星期一
10:06:07 CST
Latency measurements
2013
年
11
月
11
日
星期一
10:06:45 CST
Calculating file system latency
2013
年
11
月
11
日
星期一
10:06:49 CST
Local networking
2013
年
11
月
11
日
星期一
10:08:29 CST
Bandwidth measurements
3
测试结果查看
测试完毕执行
make see
可查看到测试结果报告
Lmbench
的结果及其说明、
本次测试结果如下
cd
results && make summary percent 2>/dev/null | more
make[1]:
正在进入目录
`/opt/performance/lmbench3/results'
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 i686-pc-linux-gnu 1598 88 128
1
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
--------- ------------- ---- ---- ----
---- ---- ---- ---- ---- ---- ---- ----
user2-VT3 Linux 1598
647. 1873 4330
Basic
integer operations - times in nanoseconds -
smaller is better
---------------------
----------------------------------------------
Host OS
intgr intgr intgr intgr intgr
bit add mul div mod
--------- ------------- ------ ------
------ ------ ------
ser2-VT3 Linux
Basic float operations - times in
nanoseconds - smaller is better
---------------------------------------------
--------------------
Host
OS float float float float
add mul
div bogo
--------- -------------
------ ------ ------ ------
user2-VT3
Linux
Basic double operations
- times in nanoseconds - smaller is better
----------------------------------------------
--------------------
Host
OS double double double double
add mul
div bogo
--------- -------------
------ ------ ------ ------
user2-VT3 Linux
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
--------- ------------- ------ ------
------ ------ ------ ------- -------
user2-VT3 Linux
*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
106.
File & VM system
latencies in microseconds - smaller is better
-
-
-
-
-
-
-
-
-
上一篇:硬件笔试题
下一篇:电气符号含义大全..