问题原文
原帖链接 · 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.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
