membench(1)
β¨ 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-vvif 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 1024for 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, where0= 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, orlatency. 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 coreOMP_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, orlatencybandwidth_mb_sβ aggregate bandwidth in MB/s (0for latency)latency_nsβ median memory latency in ns (0for bandwidth)latency_stddev_nsβ latency standard deviation in ns (0for bandwidth)latency_samplesβ number of samples for latency measurementthreadsβ thread count usediterationsβ iterations performedelapsed_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
- ubuntu stonking: sc-membench 1.2.2-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms