membench(1)

πŸ“¦ version 1.2.2, in ubuntu stonking

✨ membench(1) β€” the memory bandwidth & latency glow-up ✨

okay bestie, welcome to the General Commands Manual section for membench, and lemme tell you, this little icon is everything πŸ’– no preamble, we're going straight in.


🌸 NAME 🌸

membench β€” modern memory bandwidth and latency benchmarks πŸ”₯


πŸŽ€ SYNOPSIS πŸŽ€

membench [options]

πŸ’… DESCRIPTION πŸ’…

This manual page documents briefly the membench command. (Yes, "briefly" β€” she's mysterious, she's that girl. πŸ™ˆ)

membench is a portable, multi-platform memory bandwidth benchmark built for comprehensive system analysis, periodt. πŸ’…

Latency measurement uses linked list traversal with random node order to ✨defeat prefetchers✨ β€” like, the hardware tries to be sneaky and guess where you're going next and this benchmark is just "no. nope. random." 😭

Statistical validity is ensured via multiple samples until the coefficient of variation is under 5%, or the max sample count is hit β€” whichever comes first, bestie, we're not torturing your CPU forever.

Memory model: each thread gets its own buffer. everyone minding their own business, as they should 🧚

Total memory = size_kb Γ— threads (Γ—2 for copy, because copy needs src + dst β€” the girlies need both πŸ’œ)


🌈 OPTIONS 🌈

  • -h β€” show this help. short, sweet, slay.
  • -V β€” print version and exit. bye babes πŸ‘‹
  • -v β€” verbose output (use -vv if you want more detail, because of course there's a double version 😌)
  • -s SIZE_KB β€” test only this buffer size, measured in KB. like, e.g. -s 1024 for 1MB. one size only, we're being decisive today πŸ’…
  • -f β€” full sweep: test literally all the sizes up to the memory limit. Default is to test up to 512 MB per thread.
  • -p THREADS β€” use exactly this many threads (default: num_cpus)
  • -a β€” auto-scaling: try different thread counts to find the best one. She's slower but she finds the optimal thread count per buffer size. highkey worth it πŸ‘‘
  • -t SECONDS β€” maximum runtime, where 0 = unlimited (default: unlimited). no curfew, no cap πŸ•
  • -r TRIES β€” repeat each test N times and report the best (default: 3)
  • -o OP β€” run only this operation: read, write, copy, or latency. Can be specified multiple times (default: all). pick your fighter, or pick all of them, we don't judge πŸ₯°
  • -H β€” enable huge pages for large buffers (>= 4MB). Uses THP (no setup needed) or explicit 2MB pages. Automatically skipped for small buffers, because petty for no reason isn't the vibe πŸ’€
  • -R β€” human-readable output with summary (default: CSV). for when you want her in her soft, readable era πŸ“–

πŸ¦‹ ENVIRONMENT VARIABLES πŸ¦‹

OpenMP Thread Affinity (environment variables):

  • OMP_PROC_BIND=spread β€” spread threads across NUMA nodes (this is the default)
  • OMP_PLACES=cores β€” one thread per physical core
  • OMP_NUM_THREADS=N β€” override the thread count

πŸ“ CSV OUTPUT πŸ“

Output is CSV to stdout, and the columns are:

  • size_kb β€” per-thread buffer size (KB)
  • operation β€” read, write, copy, or latency
  • bandwidth_mb_s β€” aggregate bandwidth in MB/s (0 for latency)
  • latency_ns β€” median memory latency in ns (0 for bandwidth)
  • latency_stddev_ns β€” latency standard deviation in ns (0 for bandwidth)
  • latency_samples β€” number of samples for latency measurement
  • threads β€” thread count used
  • iterations β€” iterations performed
  • elapsed_s β€” elapsed time in seconds

πŸ’œ SEE ALSO πŸ’œ

tinymembench(1), memtester(8).


🫢 a lil heads-up from your girl: this page is from the General Commands Manual, dated February 9 2026, and the man page itself is labeled membench(1). So when you cite her, cite her correctly. iykyk πŸ’–

k bye bestie, go benchmark something and let your RAM be the main character βœ¨πŸŒˆπŸ’…

πŸ“¦ where this page comes from