Linux command
mbw 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
mbw -n 3 512
Example
mbw -n 3 -q -a 512
Example
mbw -n 3 -q -t0 512
Example
mbw -n 10 -q -t2 -b 1024 8192
Example
mbw -n 0 -t1 -q 2048
说明
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.
参数
- -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
FAQ
What is the mbw command used for?
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.
How do I run a basic mbw example?
Run `mbw -n 3 512` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -n _count_ do in mbw?
Number of test iterations (0 for infinite)