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

MD RAID - disable NCQ

· 52CE 我爱测

Why is it recommended in a MD RAID (mdadm) to disable NCQ per-disk? echo 1 > /sys/block/sdX/device/queue_depth I read this tip in many articles regarding RAID tuning but nobody explains why.

问题原文

原帖链接 · Javier Franck · CC BY-SA 4.0

Why is it recommended in a MD RAID (mdadm) to disable NCQ per-disk? echo 1 > /sys/block/sdX/device/queue_depth

I read this tip in many articles regarding RAID tuning but nobody explains why.

社区高分解答

原帖链接 · Javier Franck · CC BY-SA 4.0

Thanks for your answer.

Wikipedia states "NCQ can negatively interfere with the operating system's I/O scheduler, actually decreasing performance" and it refers to this article http://www.cs.albany.edu/~sdc/CSI500/Fal10/DiskArmSchedulingPapers/a2-yu.pdf

This article states "Under a random workload, the I/O scheduler should be disabled, that is, noop, and NCQ in charge of scheduling requests entirely; when under a sequential workload, an I/O scheduler should take full charge of scheduling them instead of NCQ. It implies that the type of information that can help scheduling decision can vary according to the workload type."

Thus it seems to be a problem under a sequential workload, but not under a random workload.

At conclusions it states that "In the long run, we suggest that a new SATA 2 specification should contain a well-defined interface to fully control NCQ mechanism."

But this article is rather old (March 2010) and I don't know if it has been solved.

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

资料来源与适用范围

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

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

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