???????????
????mdstest??????????????????????????????????????????????open??stat??close???????????????
??????????????????
yum install openmpi openmpi-devel -y
??/root/.bashrc??????????????mdtest??·????
export PATH=$PATH:/usr/lib64/openmpi/bin/
source /root/.bashrc
????
[root@lab8105 ~]# wget http://sourceforge.net/projects/mdtest/files/latest/download
???
[root@lab8105 ~]# 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
???????£?
Usage:  mdtest [-b #] [-B] [-c] [-C] [-d testdir] [-D] [-e] [-E] [-f first] [-F]
[-h] [-i iterations] [-I #] [-l last] [-L] [-n #] [-N #] [-p seconds]
[-r] [-R[#]] [-s #] [-S] [-t] [-T] [-u] [-v] [-V #] [-w #] [-y]
[-z #]
-b: branching factor of hierarchical directory structure
????????????
-B: no barriers between phases (create/stat/remove)
?????????и??? (create/stat/remove)??
-c: collective creates: task 0 does all creates and deletes
???????: task 0 ??????е???????????????
-C: only create files/dirs
???????????????????????
-d: the directory in which the tests will run
??????????е??????????????????????????
-D: perform test on directories only (no files)
????????????в?????????????????
-e: number of bytes to read from each file
???????????????????С
-E: only read files
???????
-f: first number of tasks on which the test will run
???????е???????
-F: perform test on files only (no directories)
?????????????????
-h: prints help message
??????????
-i: number of iterations the test will run
????????????????
-I: number of items per tree node
????????????????
-l: last number of tasks on which the test will run
?????е??????
-L: files/dirs created only at leaf level
?????????“???”???????/????
-n: every task will create/stat/remove # files/dirs per tree
???????????????????create/stat/remove?????/??????
-N: stride # between neighbor tasks for file/dir stat (local=0)
?????????????????????
-p: pre-iteration delay (in seconds)
??ε??????????????????
-r: only remove files/dirs
??????/??
-R: randomly stat files/dirs (optional seed can be provided)
??????????/?? ??
-s: stride between the number of tasks for each test
??β??????????????
-S: shared file access (file only?? no directories)
???????????????????????????
-t: time unique working directory overhead
????????????儷??
-T: only stat files/dirs
-u: unique working directory for each task
???????????????????
-v: verbosity (each instance of option increments by one)
-V: verbosity value
-w: number of bytes to write to each file
д???????????????
-y: sync file after write completion
??д??????????????????????д??
-z: depth of hierarchical directory structure
??????????
NOTES:
* -N allows a "read-your-neighbor" approach by setting stride to
tasks-per-node. Do not use it with -B?? as it creates race conditions.
????"read-your-neighbor" ????
* -d allows multiple paths for the form '-d fullpath1@fullpath2@fullpath3'
??????????????·????'-d fullpath1@fullpath2@fullpath3'
* -B allows each task to time itself. The aggregate results reflect this
change.
??????????????????м????
* -n and -I cannot be used together.  -I specifies the number of files/dirs
created per tree node?? whereas the -n specifies the total number of
files/dirs created over an entire tree.  When using -n?? integer division is
used to determine the number of files/dirs per tree node.  (E.g. if -n is
10 and there are 4 tree nodes (z=1 and b=3)?? there will be 2 files/dirs per
tree node.)
* -R and -T can be used separately.  -R merely indicates that if files/dirs
are going to be stat'ed?? then they will be stat'ed randomly.
??????????????????????????????/??????????-I??????????????????/????????
Illustration of terminology:
Hierarchical directory structure (tree)
=======
|       |  (tree node)
=======
/   |  
------    |    ------
/          |         
=======     =======     =======
|       |   |       |   |       |    (leaf level)
=======     =======     =======
In this example?? the tree has a depth of one (z=1) and branching factor of
three (b=3).  The node at the top of the tree is the root node.  The level
of nodes furthest from the root is the leaf level.  All trees created by
mdtest are balanced.
????????????У?????????1??z=1?????????????3??b=3??.?????????????