BW_MMAP_RD(8)
๐ bw_mmap_rd โ from the LMBENCH collection, section 8 (admin/system commands, bestie, we're in the big leagues)
okay so picture this: it's giving "read a whole file and add up all the numbers" but make it a benchmark. that's the whole vibe. let's get into it โจ
โจ NAME โจ
bw_mmap_rd โ clock how long it takes to read a file and sum it all up ๐งฎ
๐ธ SYNOPSIS ๐ธ
bw_mmap_rd [ -P <parallelism> ] [ -W <warmups> ] [ -N <repetitions> ]
size file
๐ฆ DESCRIPTION ๐ฆ
so bw_mmap_rd makes a memory mapping to the file, and then reads through that mapping in an unrolled loop โ literally the same kind of loop they use over in bw_mem_rd(8). slay, consistency.
and the important part, bestie: this benchmark is meant to be used on a file that's already in memory. like, the file is sitting in RAM. so what you're measuring is a reread benchmark โ a re-read, not a first-touch-from-disk moment. if you wanna do other kinds of file benchmarking, go hang out with lmdd(8) instead, she handles that ๐
also the size spec? you can end it with k or m, and they mean kilobytes (* 1024) or megabytes (* 1024 * 1024). cute, right? no cap.
๐ฅ OUTPUT ๐ฅ
the output format is exactly "%0.2f %.2f\n", and the two numbers are megabytes and megabytes_per_second. so like:
8.00 25.33
first number = the megabytes, second number = megabytes per second. iconic. periodt.
๐ MEMORY UTILIZATION ๐
this benchmark should move approximately the reported amount of memory. that's the whole point, she's moving memory and she's telling you how much ๐ซถ
๐ ACKNOWLEDGEMENT ๐
funding for the development of this tool was provided by Sun Microsystems Computer Corporation. we love a sponsor that funds the vibes ๐
โญ SEE ALSO โญ
๐ AUTHOR ๐
Carl Staelin and Larry McVoy โ absolute legends, no notes ๐
and fr fr: comments, suggestions, and bug reports are always welcome. they literally want to hear from you, bestie, don't be shy ๐ญ
copyright (c) 1994 Larry McVoy, and this page's date stamp is the good old $Date$ โ yes, she's a classic, she's been iconic since '94, and she's still serving BW_MMAP_RD(8) energy at the very bottom of the page. bye bestie, go measure some rereads ๐ฆ๐โจ
๐ฆ where this page comes from
- debian bookworm: lmbench 3.0-a9+debian.1-6
- debian trixie: lmbench 3.0-a9+debian.1-9
- ubuntu jammy: lmbench 3.0-a9+debian.1-6
- ubuntu noble: lmbench 3.0-a9+debian.1-6build3
- ubuntu questing: lmbench 3.0-a9+debian.1-9
- ubuntu resolute: lmbench 3.0-a9+debian.1-10
- ubuntu stonking: lmbench 3.0-a9+debian.1-10
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms