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

NVMe latency monitoring

· 52CE 我爱测

Is there a way to get read/write queue latencies from NVMe devices? If it's not split for read/write that's better than nothing but ideally I could see these separately. I'd like to go below the usual millisecond level and haven'…

问题原文

原帖链接 · Zoltán · CC BY-SA 3.0

Is there a way to get read/write queue latencies from NVMe devices? If it's not split for read/write that's better than nothing but ideally I could see these separately.

I'd like to go below the usual millisecond level and haven't found anything so far.

社区高分解答

原帖链接 · Baruch Even · CC BY-SA 3.0

NVMe has log pages and the only thing close to what you want is found in log page 02h, it has the following pieces of info:

  • Data Units Read
  • Data Units Written
  • Host Read Commands
  • Host Write Commands
  • Controller Busy Time

So you can take the number of host read and write commands and divide them with the controller busy time, if you do this in relatively short intervals and substract the current value from the previous value you will get the average time of a command in that time interval. Not pretty but close enough.

If you are on Linux you can use the nvme-cli command to get this data.

The above is all internal latency, if you want end-to-end latency you have to measure it yourself in your own application. You have a similar mechanism in /proc/diskstats in Linux that shows number of commands and "busy time" of them to average.

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

资料来源与适用范围

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

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

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