LMDD(8)

πŸ’… LMDD(8) β€” the LMBENCH girlies' I/O mover

okay so bestie, this is lmdd, section 8 of the LMBENCH manual. she moves I/O around and tells you how fast it went. that's the whole vibe. let's go 🫢


✨ NAME ✨

lmdd β€” move io for performance and debugging tests πŸ’«


🌸 SYNOPSIS 🌸

lmdd [ option=value ] ...

πŸ¦‹ DESCRIPTION πŸ¦‹

lmdd copies a specified input file to a specified output, with possible conversions. no cap, that's it. πŸŽ€

the real tea though? this program is primarily useful for timing I/O since it prints out the timing statistics after completing. she's not here to be a file copier, she's here to be a stopwatch with main character energy ⏱️✨


πŸ‘‘ OPTIONS πŸ‘‘

one bullet per option, all of them, no skipping, periodt πŸ’…

  • if=name β€” input file is taken from name; internal is the default. internal is a special file that acts like Sun's /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. and the following file names are taken to mean the standard error: 2, or stderr. πŸ•³οΈβœ¨
  • bs=n β€” input and output block size n bytes (default 8192). ⚠️ note that this is different from dd(1), which has a 512 byte default β€” so don't come in here expecting dd's numbers, she's built different. also note that the block size can be followed by k or m to indicate kilo bytes (*1024) or megabytes (*1024*1024), respectively. πŸ”’
  • 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. πŸ”
  • 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. πŸ›‘
  • skip=n β€” skip n input blocks before starting copy. ⏭️
  • 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. 🌊
  • rand=n β€” this argument, by default off, turns on random behavior. 🎲 the argument is not a flag, it is a size, and 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), πŸ“
  • 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 don't have to unmount/mount. 🧹 it is not as good as mount/unmount because it just flushes file pages β€” it misses the indirect blocks which are still cached. not supported on all systems, compile time option. 🚧
  • rusage=n β€” if n is non-zero, print rusage statistics as well as timing statistics. not supported on all systems, compile time option. πŸ“Š
  • count=n β€” copy only n input records. πŸ”’

🌈 EXAMPLES 🌈

this is the most common usage, the intent is to measure disk performance. the disk is a spare partition mounted on /spare. πŸ—‚οΈ

# mount /spare
# lmdd if=internal of=/spare/XXX count=1000 fsync=1
7.81 MB in 3.78 seconds (2.0676 MB/sec)

now we flush cache:

# umount /spare
# mount /spare

and read it back, bestie:

# lmdd if=/spare/XXX of=internal
7.81 MB in 2.83 seconds (2.7611 MB/sec)

like… the second run is faster, that's the whole point, she ate πŸ”₯


πŸ’– AUTHOR πŸ’–

Larry McVoy, lm@sun.com πŸ‘‘


ok that's the page!! go time your disks, you're gonna slay πŸ’…βœ¨

(c)1994 Larry McVoy β€” $Date$ β€” and yeah this is LMDD(8) from LMBENCH, mwah πŸŽ€πŸ¦‹