您好,欢迎来到华佗小知识。
搜索
您的当前位置:首页filebench

filebench

来源:华佗小知识

一、安装(版本包见附件)参考网址:https:///microsoft2014/article/details/60145433
sudo tar -zxf filebench-1.5-alpha3.tar.gz -C /usr/local
yum install gcc
yum install flex bison
解压后需要安装gcc、lex和yacc(linux下是用flex和bison来分别代替lex和yacc的),因为后续安装需要,不然会出问题。
cd /usr/local/filebench-1.5-alpha3
./configure
make
sudo make install

安装完测试:
$cd /usr/local/share/filebench/workloads
$filebench -f webserver.f //for example:webserver.f
二、执行(参考网址:https:///u012317833/article/details/36676955)(https:///for_tech/article/details/75271066)
交互式:Interactively
user@host$ sudo su
[sudo] password for user:
root@host# echo 0 > /proc/sys/kernel/randomize_va_space
root@host# go_filebench
Filebench Version 1.4.9
12102: 0.000: Allocated 170MB of shared memory
filebench>

root@user# go_filebench
Filebench Version 1.4.9
12324: 0.000: Allocated 170MB of shared memory
filebench> load fileserver
12462: 2.869: FileServer Version 2.2 personality successfully loaded
12462: 2.869: Usage: set $dir=<dir>
12462: 2.869: set $meanfilesize=<size> defaults to 131072
12462: 2.869: set $nfiles=<value> defaults to 10000
12462: 2.869: set $nthreads=<value> defaults to 50
12462: 2.869: set $meanappendsize=<value> defaults to 16384
12462: 2.869: set $iosize=<size> defaults to 1048576
12462: 2.869: set $meandirwidth=<size> defaults to 20
12462: 2.869: (sets mean dir width and dir depth is calculated as log (width, nfiles)
12462: 2.869: run runtime (e.g. run 60)
filebench> set $dir=/mnt
filebench> run 60
12462: 4.909: Creating/pre-allocating files and filesets
12462: 4.918: Fileset bigfileset: 10000 files, avg dir width = 20, avg dir depth = 3.1, 1240.757MB
12462: 5.280: Removed any existing fileset bigfileset in 1 seconds
12462: 5.280: making tree for filset /tmp/bigfileset
12462: 5.290: Creating fileset bigfileset...
12462: 6.080: Preallocated 7979 of 10000 of fileset bigfileset in 1 seconds
12462: 6.080: waiting for fileset pre-allocation to finish
12466: 6.080: Starting 1 filereader instances
12467: 6.081: Starting 50 filereaderthread threads
12462: 7.137: Running...
12462: 67.142: Run took 60 seconds...
12462: 67.145: Per-Operation Breakdown

statfile1 128311ops 2138ops/s 0.0mb/s 0.0ms/op 2320us/op-cpu [0ms - 0ms]
deletefile1 128316ops 2138ops/s 0.0mb/s 0.2ms/op 2535us/op-cpu [0ms - 458ms]
closefile3 128323ops 2139ops/s 0.0mb/s 0.0ms/op 2328us/op-cpu [0ms - 0ms]
readfile1 128327ops 2139ops/s 283.8mb/s 0.1ms/op 2460us/op-cpu [0ms - 267ms]
openfile2 128329ops 2139ops/s 0.0mb/s 0.0ms/op 2332us/op-cpu [0ms - 2ms]
closefile2 128332ops 2139ops/s 0.0mb/s 0.0ms/op 2332us/op-cpu [0ms - 0ms]
appendfilerand1 128337ops 2139ops/s 16.6mb/s 0.1ms/op 2377us/op-cpu [0ms - 559ms]
openfile1 128343ops 2139ops/s 0.0mb/s 0.0ms/op 2353us/op-cpu [0ms - 2ms]
closefile1 128349ops 2139ops/s 0.0mb/s 0.0ms/op 2317us/op-cpu [0ms - 1ms]
wrtfile1 128352ops 2139ops/s 265.2mb/s 0.1ms/op 2601us/op-cpu [0ms - 268ms]
createfile1 128358ops 2139ops/s 0.0mb/s 0.1ms/op 2396us/op-cpu [0ms - 267ms]
12462: 67.145: IO Summary: 1411677 ops, 23526 ops/s, (2139/4278 r/w), 565mb/s, 393us cpu/op, 0.2ms latency
12462: 67.145: Shutting down processes

As you can see, we first loaded fileserver personality using load command. Filebench located corresponding.f in the directory with pre-defined workloads. After that tunables of the workload personality can be set. We change
the benchmark directory to /mnt where the file system we want to benchmark is presumably mounted. To start workload for 60 seconds we execute run 60 command. In response, Filebench first created a file system tree with the properties
defined in the personality file and then spanned all required processes and threads. After 60 seconds of the run the statistics is printed and Filebench exits.

After that you will see traditional Filebench output.

执行一条命令即可完成测试,无需要像前面一步一步的设置各个参数。注意在配置文件的末尾添加 'run <time>'
三、输出解释
输出解释:
flowop name - 支持的flowop有很多
所有threads的ops
所有threads的ops / run time
所有threads的READ/WRITE带宽
所有threads的每个op的平均latency
测试中op的最小和最大latency

 

转载于:https://www.cnblogs.com/AgainstTheWind/p/9869790.html

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- huatuo0.cn 版权所有 湘ICP备2023017654号-2

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务