LMDD(1)LMDD(1)NAMElmdd - move io for performance and debugging tests
SYNOPSISlmdd [ option=value ] ...
DESCRIPTIONlmdd copies a specified input file to a specified output with possible
conversions. This program is primarily useful for timing I/O since it
prints out the timing statistics after completing.
OPTIONS
Note that all values given to an option can be suffixed by any of 'K',
'M', 'G', 'k', 'm', 'g', representing 10^3, 10^6, 10^9, 2^10, 2^20 and
2^30 respectively.
if=name Input file is taken from name; internal is the default.
internal is a special file that acts like /dev/zero, i.e.,
it provides a buffer of zeros without doing a system call
to get them.
The following file names are taken to mean the standard
input: -, 0, or stdin.
of=name Output file is taken from name; internal is the default.
internal is a special file that acts like /dev/null,
without doing a system call to get rid of the data.
The following file names are taken to mean the standard
output: -, 1, or stdout.
The following file names are taken to mean the standard
error: 2, or stderr.
srand=n The 32-bit value n will be used to see the system's random
number generator for all the various options which require
a random value.
bs=n
randbs=m
randbs_align=k Input and output acceses will use a block size of n bytes
(default 8192). Note that this is different from dd(1),
which has a 512 byte default. If randbs= is specified, the
block size will actually be a random value between k and
n, aligned to a multiple of k. If unspecified, k is 4096.
ipat=n If n is non zero, expect a known pattern in the file (see
opat). Mismatches will be displayed as "ERROR: off=%d
want=%x got=%x". The pattern is a sequence of 4 byte
integers with the first 0, second 1, and so on. The
default is not to check for the pattern.
Page 1
LMDD(1)LMDD(1)
opat=n If n is non zero, generate a known pattern on the output
stream. Used for debugging file system correctness. The
default is not to generate the pattern.
mismatch=n If n is non zero, stop at the first mismatched value.
Used with ipat.
offset=n
skip=n Skip and offset are alternate ways to specify an initial
offset within the input and output files. With offset=, n
bytes are skipped at the beginning of the file. With
skip=, n input blocks (cf. bs=) are skipped.
poff=n If poff is specified, the file offset is printed before
each access.
rand=n This argument, by default off, turns on random behavior.
The argument is not a flag, it is a size, that size is
used as the upper bound for the seeks. Also note that the
block size can be followed by 'k' or 'm' to indicate kilo
bytes (*1024) or megabytes (*1024*1024),
end=n When used with rand, limits the seeks to within n bytes
from the end points of the size specified by rand. This
option is typically used to generate worst case seek time
numbers.
start=n When used with rand, make the range be from start..
rand+start.
randseq=n If specified, n should be a value between 0 and 100. It
represents the percentage chance that an access to the
file will be sequential with the prior access. The new
offset will be random within the limits specified by the
rand=, end= and start= options.
nap=m
randnap=n If nap is specified, lmdd will pause for a random value
between 0 and m seconds between file accesses. If randnap
is also specified, there will be an n% probability that a
nap will occur between accesses, where n is a number
between 0 and 100.
fsync=n If n is non-zero, call fsync(2) on the output file before
exiting or printing timing statistics.
sync=n If n is non-zero, call sync(2) before exiting or printing
timing statistics.
flush=n If n is non-zero and mmap(2) is available, call msync(2)
to invalidate the output file. This flushes the file to
disk so that you need not unmount/mount. It is not as
Page 2
LMDD(1)LMDD(1)
good as mount/unmount because it just flushes file pages -
it misses the indirect blocks which are still cached.
rusage=n If n is non-zero, print rusage statistics as well as
timing statistics.
time=n
count=n These are alternate ways to specify how much data lmdd
should access. time= specifies that lmdd should finish
after n seconds. count= specifies that lmdd should finish
after accessing n blocks (cf. bs= n).
spin=n If specified, lmdd will not exit after the last disk
access, but rather will block until interrupted by the
user.
print=n N is an integer between 0 and 5. This modifies the
printout at the end of the run. 0 means no printout, 1
means latency style printout (useful for randoms), 2 is
microsecond latency, 3 is Kbytes/sec printout, 4 is
Mbyte/sec printout, 5 is output suitable as xgraph(1)
input, and the default is a bandwidth style printout.
timeopen=n If specified, include the time spent opening the files in
lmdd's final output. The final output reports total time
spent in completing the lmdd command. Users would need to
run comparable tests with timeopen= specified and not
specified and calculate the difference in total time spent
in both cases for time spent opening the files.
padin=n If specified, do one extra access to the files initially,
and then reset the timer. This helps to hide start-up
latency on a file system. padin= overrides timeopen=
above.
label=string Print out the string before the results. This is useful
if you are running multiple lmdd's in parallel; use the
if=arg as the label arg so you can sort out the results.
Be warned that it does multiple fprintfs to stderr so the
output can can mixed up. XXX.
log=n If specified, print to stdout a log of each access,
listing type of access (R read, W write), file offset,
access size, and the byte count returned by read or write.
move=n Move this much data. Useful when you want to cycle
through block sizes but always move (approximately) the
same amount of data.
debug=n Sets an external variable "dbg". Only used with the BDS
library.
Page 3
LMDD(1)LMDD(1)
bufs=n Cycle through n different buffers.
mpin=n If specified, use IRIX's mpin() facility to pin all of
lmdd's data buffers in physical memory. This may lead to
performance improvements for some configurations.
touch=n Touch each buffer after the I/O.
usleep=n Sleep n microseconds between each read/write I/O pair.
direct=n If specified, turns on SGI's direct I/O mode on the input
and output files.
idirect=n If specified, turns on SGI's direct I/O mode on the input
file.
odirect=n If specified, turns on SGI's direct I/O mode on the output
file.
bulk=n If specified, set the O_BULK flag when opening files.
(IRIX 6.5 and later only)
nocreate=n If specified, do not set the O_CREAT flag when opening the
output file. By default, lmdd will set O_CREAT and thus
erase any prior file with the same name as the output
file.
hash=n If non-zero, prints a hash mark for every block read and
written (like FTP).
rtmax=n Generates a 10 bucket histogram of read times. By
default, the buckets are from 0 to the value of rtmax, but
the lower bucket can be controlled with the rtmin
variable. See examples below.
rtmin=n When used with rtmax, the 10 buckets for read times are
between rtmin..rtmaxFP.
wtmax=n Generates a 10 bucket histogram of write times. By
default, the buckets are from 0 to the value of rtmax, but
the lower bucket can be controlled with the rtmin
variable. See examples below.
wtmin=n When used with wtmax, the 10 buckets for write times are
between wtmin..wtmaxFP.
realtime=n If non-zero, creates files as XFS realtime files.
notrunc=n If non-zero, overwrites the output file instead of
truncating first.
Page 4
LMDD(1)LMDD(1)EXAMPLES
This is the most common usage, the intent is to measure disk performance.
The file system in this example is a Silicon Graphics XFS mounted via NFS
V3 with BDS extensions and accessed through a HiPPI network running
TCP/IP.
# lmdd of=XXX direct=1 bs=4m move=100m
100.00 MB in 3.14 secs, 31.89 MB/sec
# lmdd if=XXX direct=1 bs=4m move=100m
100.00 MB in 1.63 secs, 61.40 MB/sec
An example of the read histogram. Suppose you expect each read to take
about 50 milliseconds:
# lmdd if=XXX direct=1 bs=4m rtmin=40 rtmax=140 move=500m
READ: 210 milliseconds offset 4.00M
READ: 151 milliseconds offset 8.00M
500.00 MB in 7.26 secs, 68.91 MB/sec
READ operation latencies
50 to 59 ms: 112
60 to 69 ms: 7
70 to 79 ms: 2
80 to 89 ms: 1
110 to 119 ms: 1
140+ ms: 2
Anything larger than rtmax is printed as it happens. The rest of the
times are recorded in their repective buckets and the times are printed
after the entire transfer is complete.
AUTHOR
Larry McVoy, lm@sgi.com. XFS, notrunc, rtmax/wtmin additions by Adam
Sweeney. Even more additions by Ethan Solomita, ethan@engr.sgi.com.
Page 5