大网数据广告活动
服务器运维问答

smart long test - what is the performance impact on busy server?

· 52CE 我爱测

I have a busy server with a RAID 1 setup. The application (runs in PHP) is very read/write intensive to the database (MariaDB). A cronjob runs smartctl short test every day and checks the output of smartctl -H and mdadm -D . I wo…

问题原文

原帖链接 · Nuno · CC BY-SA 3.0

I have a busy server with a RAID 1 setup. The application (runs in PHP) is very read/write intensive to the database (MariaDB).

A cronjob runs smartctl short test every day and checks the output of smartctl -H and mdadm -D.

I would like to run a long test sometimes, but I am concerned about its performance impact. I read that it can take several hours to complete. If it causes server performance to degrade while it runs, my users will be affected for 5+ hours.

So, a few questions here:

1) Do long smart tests usually impact performance that can be significant to users?

2) Since I have RAID 1 and do short tests, are long tests still necessary?

3) Is there a way to stop a long test if I find it is causing trouble on server performance?

已采纳解答

原帖链接 · Jesse Adelman · CC BY-SA 3.0

  1. It depends. (muhahaha) On what? How much your application uses the disk and how much caching can your application take advantage of. There's no magic here - if the drive is being tested, it cannot serve at the same maximum speed and low latency as when it is not. However, if your minimum latency requirements are less than the impact of the tests, then it is a wash in terms of application impact.
  2. Probably not. Big Enterprise storage companies (EMC, IBM, NetApp, etc.) replace drives based on their M(ean) T(ime) B(etween) F(ailures), not merely waiting for the drive's firmware to report a problem. The short tests test everything that is likely to fail first. The long tests do the same tests as the short tests, except they do not have a time limit. Just assume that all drives will fail, but their likelyhood is higher after the warranty expires.
  3. Yes, PROVIDED that the drive supports aborting (or "suspending") offline collection.

From the 'smartctl(8)' manual page:

       -X, --abort
              Aborts  non-captive  SMART  Self  Tests.  Note that this command
              will abort the Offline Immediate Test routine only if your  disk
              has the "Abort Offline collection upon new command" capability.

(I think you can also abort if you see "Suspend Offline collection upon new command"; I think the man page needs to be updated.) You can check for that capability via:

smartctl -x <device>

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-05-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。