posix 文件系统测试

各种posix 文件系统测试参考链接:
http://www.bubuko.com/infodetail-3151363.html

名词解释

IOPS: 系统每秒读写的次数

目前已使用FIO 以及mdtest 2 种工具。

FIO

https://blog.csdn.net/don_chiang709/article/details/92628623

安装

# 1. 下载fstest工具
wget http://download.tuxera.com/sw/qa/pjd-fstest-20080816.tgz
 
# 2. 编译工具
tar xf pjd-fstest-20080816.tgz
cd pjd-fstest-20080816
 
# 3. 测试文件系统
cd {要测试的目录}
# 整体测试
prove -r {fstest目录}
 
# 跑单个案例
prove -r {fstest目录}/tests/chown/00.t

关注指标

OPS & BW

参数

fio [options] [job options] <job file(s)>
  --debug=options	Enable debug logging. May be one/more of:
			process,file,io,mem,blktrace,verify,random,parse,
			diskutil,job,mutex,profile,time,net,rate,compress,
			steadystate,helperthread
  --parse-only		Parse options only, don't start any IO
  --output		Write output to file
  --bandwidth-log	Generate aggregate bandwidth logs
  --minimal		Minimal (terse) output
  --output-format=type	Output format (terse,json,json+,normal)
  --terse-version=type	Set terse version output format (default 3, or 2 or 4)
  --version		Print version info and exit
  --help		Print this page
  --cpuclock-test	Perform test/validation of CPU clock
  --crctest=[type]	Test speed of checksum functions
  --cmdhelp=cmd		Print command help, "all" for all of them
  --enghelp=engine	Print ioengine help, or list available ioengines
  --enghelp=engine,cmd	Print help for an ioengine cmd
  --showcmd		Turn a job file into command line options
  --eta=when		When ETA estimate should be printed
            		May be "always", "never" or "auto"
  --eta-newline=time	Force a new line for every 'time' period passed
  --status-interval=t	Force full status dump every 't' period passed
  --readonly		Turn on safety read-only checks, preventing writes
  --section=name	Only run specified section in job file, multiple sections can be specified
  --alloc-size=kb	Set smalloc pool to this size in kb (def 16384)
  --warnings-fatal	Fio parser warnings are fatal
  --max-jobs=nr		Maximum number of threads/processes to support
  --server=args		Start a backend fio server
  --daemonize=pidfile	Background fio server, write pid to file
  --client=hostname	Talk to remote backend(s) fio server at hostname
  --remote-config=file	Tell fio server to load this local job file
  --idle-prof=option	Report cpu idleness on a system or percpu basis
			(option=system,percpu) or run unit work
			calibration only (option=calibrate)
  --inflate-log=log	Inflate and output compressed log
  --trigger-file=file	Execute trigger cmd when file exists
  --trigger-timeout=t	Execute trigger at this time
  --trigger=cmd		Set this command as local trigger
  --trigger-remote=cmd	Set this command as remote trigger
  --aux-path=path	Use this path for fio state generated files

使用注意事项

mdtest

安装

# 依赖
yum install openmpi openmpi-devel -y

# 在$HOME/.bashrc中添加openmpi的执行路径,为了方便后面也可以添加mdtest的路径

export PATH="$PATH:/usr/local/openmpi/bin"

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/openmpi/lib/"

export PATH=$PATH:<path_to_mdtest>/mdtest
# 下载mdtest的压缩包,这是一个比较老的版本,但是可以用mpirun调用。

mkdir -p <path_to_mdtest>/mdtest

cd mdtest

wget https://nchc.dl.sourceforge.net/project/mdtest/mdtest%20latest/mdtest-1.9.3/mdtest-1.9.3.tgz

tar -xvf mdtest-1.9.3.tgz
#修改MakeFile

mdtest: mdtest.c

    mpicc -Wall -D $(OS) $(LARGE_FILE) $(MDTEST_FLAGS) -g -o mdtest mdtest.c -lm

#编译

make

单独执行mdtest的一些命令。

只创建文件
mdtest -n 100 -w 102400 -b 1 -d ./out -F -C
只读文件
mdtest -n 100 -w 102400 -b 1 -d ./out -F -E
只删除上轮执行遗留的文件
mdtest -n 100 -w 102400 -b 1 -d ./out -F -r

使用注意事项

meta cache 测试前需要将对应的目录清空, 保证传的是一个目录 注意最后一个杠 “/”

mdtest -d /test-dirs/hdfs/ -b 6 -I 8 -z 2 

当出现如下问题时
MPI_ABORT was invoked on rank 0 in communicator MPI COMMUNICATOR 3 DUP FROM 0 with errorcode
在这里插入图片描述
标明因为某种错误导致test-dir 不为空,在使用命令前,做删除操作就可以

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值