Applicable Products
- All QNAP NAS models running QTS or QuTS hero
Overview
Faulty memory can cause system instability or data corruption. You can check your NAS's memory health in QTS by installing memtester through Entware QPKG.
Note: Running memory tests can disrupt NAS services. Back up your important data and perform these steps during a maintenance window.
Tip: The OOM (Out Of Memory) Killer is a process in Linux that terminates applications if the system runs out of memory. Test only a portion of total memory to avoid system instability.
Procedure
Step 1: Install memtester utility
Download memtester utility and extract and save it into Public shared folder
Step 2: Stop all NAS services
Warning: Stopping all services will interrupt access to shared folders, applications, and network services. Make sure no users are actively accessing the NAS before proceeding.
sudo /etc/init.d/services.sh stop
Step 3: Check Available Memory
sudo free -g
total used free shared buffers cached
Mem: 62 9 53 0 0 4
-/+ buffers/cache: 4 58
Swap: 22 0 22
The free memory is around 53GB.
Step 4: Run Memtester
Test on free memory (aorund 80–90% of the total memory to avoid triggering the OOM Killer).
sudo chmod +x /share/Public/memtester.*
sudo /share/Public/memtester.{x64/armv7/arm64} 53G 1
memtester.x64 / memtester.armv7 / memtester.arm64: Choose the one which fit in with your NAS platform to run.53G: Free memory size to test (around 80–90% of total RAM, e.g, 64GB).1: Number of test loops to run.
Step 5: Interpret Results
If you see repeated FAILURE messages, your memory module may be defective and should be replaced.
memtester version 4.7.1 (64-bit)
Copyright (C) 2001-2024 Charles Cazabon.
Licensed under the GNU General Public License version 2 (only).
pagesize is 4096
pagesizemask is 0xfffffffffffff000
want 54272MB (56908316672 bytes)
got 54272MB (56908316672 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 : testing 43FAILURE: 0xffffffffffffffff != 0xffffdfffffffffff at offset 0x00000000082b72a8.
Block Sequential : testing 159FAILURE: 0x9f9f9f9f9f9f9f9f != 0x9f9fbf9f9f9f9f9f at offset 0x00000000082b56e8.
Checkerboard : testing 2FAILURE: 0xaaaaaaaaaaaaaaaa != 0xaaaa8aaaaaaaaaaa at offset 0x00000000082b72a8.
Bit Spread : testing 0FAILURE: 0xfffffffffffffffa != 0xffffdffffffffffa at offset 0x00000000082b72a8.
Bit Flip : testing 2FAILURE: 0x0000000000000001 != 0x0000200000000001 at offset 0x00000000082b56e8.
Walking Ones : testing 12FAILURE: 0xffffffffffffefff != 0xffffdfffffffefff at offset 0x00000000082b5608.
FAILURE: 0xffffffffffffefff != 0xffffdfffffffefff at offset 0x00000000082b72a8.
Walking Zeroes : testing 16FAILURE: 0x0000000000010000 != 0x0000020000010000 at offset 0x00000000082b5238.
FAILURE: 0x0000000000010000 != 0x0000200000010000 at offset 0x00000000082b56e8.
8-bit Writes : ok
16-bit Writes : ok
Step 6: Start all NAS services
Once testing is complete, restart all NAS services to restore normal operation:
sudo /etc/init.d/services.sh start
Reminder: After restarting, check that all expected NAS services are running normally.
Step 7: Removing memtester utility
Remove memtester utility if you don't need it anymore.
sudo rm -f /share/Public/memtester.*
Further Reading
How do I perform a Memory test on QNAP NAS ?
适用产品
- All QNAP NAS models running QTS or QuTS hero
概述
故障内存可能导致系统不稳定或数据损坏。您可以通过在 QTS 中安装memtester通过 Entware QPKG。
注意:运行内存测试可能会中断 NAS 服务。请备份重要数据,并在维护窗口期间执行这些步骤。
提示: OOM(内存不足)杀手是 Linux 中的一个进程,当系统内存不足时会终止应用程序。仅测试部分总内存以避免系统不稳定。
步骤
步骤 1:安装 memtester 工具
下载memtester工具并解压缩,保存到 Public 共享文件夹中
步骤 2:停止所有 NAS 服务
警告:停止所有服务将中断对共享文件夹、应用程序和网络服务的访问。确保在继续之前没有用户正在访问 NAS。
sudo /etc/init.d/services.sh stop
步骤 3:检查可用内存
sudo free -g
total used free shared buffers cached
Mem: 62 9 53 0 0 4
-/+ buffers/cache: 4 58
Swap: 22 0 22
可用内存大约为 53GB。
步骤 4:运行 Memtester
在可用内存上测试(大约占总内存的 80-90% 以避免触发 OOM 杀手)。
sudo chmod +x /share/Public/memtester.*
sudo /share/Public/memtester.{x64/armv7/arm64} 53G 1
memtester.x64/memtester.armv7/memtester.arm64: 选择适合您 NAS 平台的版本运行。53G: 可用内存大小进行测试(约占总 RAM 的 80–90%,例如,64GB)。1: 要运行的测试循环次数。
步骤 5:解释结果
如果您看到重复的失败消息,您的内存模块可能有缺陷,应予以更换。
memtester 版本 4.7.1 (64 位)
版权所有 (C) 2001-2024 Charles Cazabon。
许可证 d 根据 GNU 通用公共许可证第 2 版(仅限)发布。
页面大小为 4096
页面大小掩码为 0xfffffffffffff000
需要 54272MB (56908316672 字节)
获得 54272MB (56908316672 字节),尝试 mlock ... 已锁定。
循环 1/1:
卡住地址 :正常
随机值 :正常
比较 XOR :正常
比较 SUB :正常
比较 MUL :正常
比较 DIV :正常
比较 OR :正常
比较 AND :正常
顺序递增 :正常
固定位 :测试 43 失败:0xffffffffffffffff != 0xffffdfffffffffff 在偏移量 0x00000000082b72a8。
块顺序 :测试 159 失败:0x9f9f9f9f9f9f9f9f != 0x9f9fbf9f9f9f9f9f 在偏移量 0x00000000082b56e8。
棋盘格 :测试 2 失败:0xaaaaaaaaaaaaaaaa != 0xaaaa8aaaaaaaaaaa 在偏移量 0x00000000082b72a8。
位扩散 :测试 0 失败:0xfffffffffffffffa != 0xffffdffffffffffa 在偏移量 0x00000000082b72a8。
位翻转 :测试 2 失败:0x0000000000000001 != 0x0000200000000001 在偏移量 0x00000000082b56e8。
行走的 1 :测试 12 失败:0xffffffffffffefff != 0xffffdfffffffefff 在偏移量 0x00000000082b5608。
失败:0xffffffffffffefff != 0xffffdfffffffefff 在偏移量 0x00000000082b72a8。
行走的 0 :测试 16 失败:0x0000000000010000 != 0x0000020000010000 在偏移量 0x00000000082b5238。
失败:0x0000000000010000 != 0x0000200000010000 在偏移量 0x00000000082b56e8。
8 位写入 :正常
16 位写入 :正常
步骤 6:启动所有 NAS 服务
测试完成后,重启所有 NAS 服务以恢复正常操作:
sudo /etc/init.d/services.sh start
提醒:重启后,检查所有预期的 NAS 服务是否正常运行。
步骤 7:移除 memtester 工具
如果不再需要,移除 memtester 工具。
sudo rm -f /share/Public/memtester.*
进一步阅读
如何在 QNAP NAS 上执行内存测试?