4

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.

Zoltan
  • 155
  • 11
  • This may not be all you need but give Netdata a try - it's a very useful tool to have in your arsenal anyway - https://my-netdata.io/ – Chopper3 Nov 19 '17 at 13:21

1 Answers1

4

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.

Baruch Even
  • 1,043
  • 6
  • 18