mbw
Memory bandwidth benchmark tool
TLDR
SYNOPSIS
mbw [options] sizeinMiB
DESCRIPTION
mbw (Memory Bandwidth) is a benchmark tool that measures memory copy performance by allocating two memory regions and timing how fast data can be copied between them.Three test methods are available: memcpy uses the C library's optimized memcpy function, dumb copies byte-by-byte to measure raw memory access speed, and mcblock copies in user-specified block sizes to analyze cache behavior.Results are reported in MB/s, helping identify memory subsystem performance, compare different systems, or detect issues with memory configuration.
PARAMETERS
-n _count_
Number of test iterations (0 for infinite)-q
Quiet mode; show only statistics, suppress per-iteration output-a
Suppress printing averages-t _type_
Test type: 0=memcpy, 1=dumb (byte-by-byte), 2=mcblock (block copy)-b _bytes_
Block size in bytes for mcblock test (-t2)-h
Show quick help
CAVEATS
Results can vary significantly based on system load, CPU frequency scaling, and memory access patterns. For consistent benchmarks, ensure the system is idle and consider disabling CPU frequency scaling. The dumb test is intentionally slow and useful for measuring worst-case memory latency.
HISTORY
mbw was written by Andras Horvath as a simple tool to test memory bandwidth, particularly useful for comparing RAM performance across different systems or configurations.
