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

What is the performance impact of disabling NCQ?

· 52CE 我爱测

Our cluster system runs currently under CentOS7 with SSDs and NCQ disabled. What kind of a performance drop is to be expected within an i/o-heavy usage scenario? I'm not expecting a precise answer because I know it largely depend…

问题原文

原帖链接 · Sam · CC BY-SA 4.0

Our cluster system runs currently under CentOS7 with SSDs and NCQ disabled. What kind of a performance drop is to be expected within an i/o-heavy usage scenario?

I'm not expecting a precise answer because I know it largely depends on the application, hardware, and network (just an idea would be great).

社区高分解答

原帖链接 · Mr Alpha · CC BY-SA 3.0

NCQ is a technology that lets drives re-order the order in which read and write requests are serviced.

SSDs save you the seek times hard drives are plagued by, but actually reading from and writing to a NAND die is not especially fast. SSDs get around this by reading and writing to multiple NAND dies in parallel.

In order to achieve this SSDs rely on three kinds of strategies: For large IO request the split the request across multiple dies, by splitting it up and writing parts of the data to separate dies in parallel. For reads the data is, hopefully, also split across dies and can be read back in parallel.

For small IO write loads SSDs usually cache a bunch of them in on board memory and the write the whole slew of them out to different NAND dies in parallel. This is why SSDs can have such high random write performance.

For small IO reads, or mixed workloads, the SSD will service the request in the command queue out of order trying to keep as many NAND dies working in parallel as possible. The SSD can only do this if NCQ is enabled. This can make a huge difference in IO heavy work-loads. For AHCI I've seen up to 10x difference, and for NVMe over 100x.

If you've ever seen benchmarks of an SSD from a benchmarking application like CrystalDiskMark or similar you can see that they usually provide 4k random read results both with and without queue depth. If NCQ is disabled the difference between these two numbers is small, with NCQ enable it is huge. For example, this Bit-tech review, put the QD1 4k random read results for the Samsung 950 PRO 512GB (a NVMe drive) at 60MB/s, but the QD32 4k random read results for the same drive are 1261 MB/s.

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

资料来源与适用范围

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

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

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