mbw
benchmark tool that measures memory copy performance by allocating two memory
TLDR
Run 3 memory bandwidth tests with 512MB size
SYNOPSIS
mbw [options] sizeMB_
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
Show averages only-t _type_
Test type: 0=memcpy, 1=dumb (byte-by-byte), 2=mcblock (block copy)-b _bytes_
Block size for mcblock test
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.
