Linux监控io:如何监控 IO队列深度(deep. io)

I am benchmarking databases above a NVMe SSD. I want to monitor the number of I/O request in the queue in this figure over time to see if the databases fully take advantage of the queues.
enter image description here

我已经尝试过iostat之类的工具,但是avgqu-sz字段始终为零。我认为这可能是因为 NVMe SSD 具有全新的存储栈,而不是传统设备(例如 SATA SSD)。

1
Solution:
cd /sys/kernel/debug/tracing/events/nvme/nvme_sq
# filter by disk name:
echo 'disk=="nvme0n1"' > filter
# enable the event:
echo 1 > enable
# check results from trace_pipe:
cat /sys/kernel/debug/tracing/trace_pipe

我建议还启用/sys/kernel/debug/tracing/events/nvme/nvme_setup_cmd,然后,您可以简要了解 nvme 驱动程序在做什么。

          <idle>-0       [002] d.h.  2558.073405: nvme_sq: nvme0: disk=nvme0n1, qid=3, head=76, tail=76
   systemd-udevd-3805    [002] ....  2558.073454: nvme_setup_cmd: nvme0: disk=nvme0n1, qid=3, cmdid=48, nsid=1, flags=0x0, meta=0x0, cmd=(nvme_cmd_read slba=104856608, len=7, ctrl=0x8000, dsmgmt=7, reftag=0)
          <idle>-0       [002] d.h.  2558.073664: nvme_sq: nvme0: disk=nvme0n1, qid=3, head=77, tail=77
   systemd-udevd-3805    [002] ....  2558.073704: nvme_setup_cmd: nvme0: disk=nvme0n1, qid=3, cmdid=49, nsid=1, flags=0x0, meta=0x0, cmd=(nvme_cmd_read slba=104856648, len=7, ctrl=0x8000, dsmgmt=7, reftag=0)
          <idle>-0       [002] d.h.  2558.073899: nvme_sq: nvme0: disk=nvme0n1, qid=3, head=78, tail=78
   systemd-udevd-3805    [002] ....  2558.073938: nvme_setup_cmd: nvme0: disk=nvme0n1, qid=3, cmdid=50, nsid=1, flags=0x0, meta=0x0, cmd=(nvme_cmd_read slba=104854512, len=7, ctrl=0x8000, dsmgmt=7, reftag=0)
          <idle>-0       [002] d.h.  2558.074134: nvme_sq: nvme0: disk=nvme0n1, qid=3, head=79, tail=79

可以找到此输出中每个字段的说明here

本站系公益性非盈利分享网址,本文来自用户投稿,不代表边看边学立场,如若转载,请注明出处

(698)
Linux新建分区命令:Linux中的分区(partition creation in linux)
上一篇
Nginx流媒体服务器配置:使用 Nginx-rtmp模块配置多人流媒体
下一篇

相关推荐

发表评论

登录 后才能评论

评论列表(27条)