mbw(1)

πŸ’– NAME πŸ’–

mbw β€” the Memory BandWidth benchmark, bestie. it measures how fast your RAM can actually move data around. no cap. πŸ¦‹


✨ SYNOPSIS ✨

mbw [options] arraysize_in_MiB

like. give it a size in MiB and it goes. that's it. that's the whole vibe. πŸ’…


🌸 DESCRIPTION 🌸

mbw figures out your available memory bandwidth by literally copying huge arrays of data around in memory. that's the whole trick. big copy, big numbers, big slay. πŸ”₯


πŸŽ€ OPTIONS πŸŽ€

  • -q β€” quiet mode. shhh 🀫 it suppresses the informational messages so you only get the numbers.
  • -a β€” stops it from printing the average of each test. if you don't want the averages, you don't get the averages. periodt.
  • -n <number> β€” pick how many loops happen per test. you're in charge of the reps. πŸ’ͺ
  • -t <number> β€” choose which tests run. if you give no -t parameters at all, the default is to run all of them. the lineup is:
    • -t0: the memcpy() test
    • -t1: the dumb test (the b[i]=a[i] style one, iykyk)
    • -t2: memcpy() with an arbitrary block size
  • -b <bytes> β€” the block size, in bytes, for -t2. only matters for -t2, so don't stress about it otherwise. 🫢
  • -h β€” quick help. your lil emergency exit. πŸ™ˆ

πŸ’œ USAGE πŸ’œ

so here's the deal: mbw allocates two arraysize arrays in memory and copies one into the other. the reported 'bandwidth' is literally just the amount of data copied divided by how long that operation took. math. iconic. πŸ‘‘

obviously (and I do mean obviously) mbw needs twice arraysize MiBytes (1024*1024 bytes) of physical memory β€” so you'd better switch off swap, or at minimum make absolutely sure no paging happens, because paging will ruin your numbers and your whole day. 😭

and needless to say, it should not be run on a busy system. don't do it. the numbers will lie to you. πŸ’€


🌈 TODO 🌈

  • multiple thread support
  • better configurability, including using getopt() for parsing arguments

(it's giving "we know, we know, it's on the list") ✨


🧚 AUTHOR 🧚

andras.horvath@gmail.com


okay bestie that's the whole page 🫢 this was the memory bandwidth benchmark, mbw(1), dated Apr 26, 2006 β€” go forth, benchmark responsibly, and remember: no paging, no busy systems, no exceptions. bye bestie!! πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from