Unable to change queue parameter for nr_requests on nvme device

https://access.redhat.com/solutions/3429731

Unable to change queue parameter for nr_requests on nvme device

 SOLUTION 已验证 - 已更新 2018年九月25日01:40 - 

English 

环境

  • Red Hat Enterprise Linux 4
  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • Intel PCIe Data Center (DC) SSD NVME controller

问题

  • When changing the parameter of /sys/block/nvme1/queue/nr_requests from 128 to 512 the system outputs errors like:

    Raw

    # echo 512 > /sys/block/nvme1/queue/nr_requests
    -bash: echo: write error: Invalid argument
    

决议

As nvme devices do not use the regular IO scheduler mechanism used by sd devices, the nr_request parameter is not applicable to nvme stack. The IO handling mechanism in nvme uses blk-mq.

根源

IO scheduler is currently not supported in NVMe.

nr_requests specifies the maximum number of read and write requests that can be queued at one time. The default value is 128, which means that 128 read requests and 128 write requests can be queued before the next process to request a read or write is put to sleep.

NVM Express is based on a paired Submission and Completion Queue mechanism. Commands are placed by host software into the Submission Queue. Completions are placed into an associated Completion Queue by the controller.

猜你喜欢

转载自blog.csdn.net/msdnchina/article/details/89287655