Memtester 进行内存压力测试

Memtester是用户态工具,用于测试内存子系统的故障。非常方便,支持32位或64位Unix-like系统。 对于硬件开发开发者来说,Memtester 可以定位到物理地址。

下载源码1) 并编译安装:

wget http://pyropus.ca/software/memtester/old-versions/memtester-4.3.0.tar.gz
tar xvf memtester-4.3.0.tar.gz
cd memtester-4.3.0 && make && make install

执行内存压力测试:

memtester [-p physaddrbase] <mem>[B|K|M|G] [loops]

参数说明:

  • Physaddrbase 需要测试的物理地址
  • <mem>[B|K|M|G]:测试内存的大小(单位自由,可以是B、K、M、G)
  • [loops]:测试次数(理论无上限)

结果输出

结果输出

[root@CentOS-7-test memtester-4.3.0]# time memtester 1G 1
memtester version 4.3.0 (64-bit)
Copyright (C) 2001-2012 Charles Cazabon.
Licensed under the GNU General Public License version 2 (only).

pagesize is 4096
pagesizemask is 0xfffffffffffff000
want 1024MB (1073741824 bytes)
got  1024MB (1073741824 bytes), trying mlock ...locked.
Loop 1/1:
  Stuck Address       : ok
  Random Value        : ok
  Compare XOR         : ok
  Compare SUB         : ok
  Compare MUL         : ok
  Compare DIV         : ok
  Compare OR          : ok
  Compare AND         : ok
  Sequential Increment: ok
  Solid Bits          : ok
  Block Sequential    : ok
  Checkerboard        : ok
  Bit Spread          : ok
  Bit Flip            : ok
  Walking Ones        : ok
  Walking Zeroes      : ok
  8-bit Writes        : ok
  16-bit Writes       : ok

Done.

real    8m2.308s
user    8m1.679s
sys     0m0.459s


  • linux/performance/memtester测试内存.txt
  • 最后更改: 2019/04/16 18:31
  • (外部编辑)