Windows_exporter Disk Latency

93 views
Skip to first unread message

ضياء سامي

unread,
Dec 28, 2023, 8:53:51 AM12/28/23
to Prometheus Users
Hi

I am trying to monitor Windows disk latency using windows_exporter.
I tested disk performance using two commands below :
C:\> diskspd.exe -c1G -d120 -b4K -o32 -t4 -w10 -L -D -Suw testfile.dat
PS C:\> Get-Counter -ComputerName win-node -Counter '\LogicalDisk(*)\Avg. Disk sec/Read','\LogicalDisk(*)\Avg. Disk sec/Write' -SampleInterval 1

The output of both commands above shows average latency of 11 msec.

While the prometheus query "rate(windows_logical_disk_read_write_latency_seconds_total[20s])" prints 125

Why windows_exporter showing different result ?

Brian Candler

unread,
Dec 28, 2023, 10:44:28 AM12/28/23
to Prometheus Users
Probably because you need to divide by the average number of operations per second done in that time window.

I can't give you the specifics for windows_exporter, but I can for Linux node_exporter:
https://brian-candler.medium.com/interpreting-prometheus-metrics-for-linux-disk-i-o-utilization-4db53dfedcfc

The average latency for disk reads would be:
rate(node_disk_read_time_seconds_total[20s]) / rate(node_disk_reads_completed_total[20s])

ضياء سامي

unread,
Dec 29, 2023, 9:32:41 AM12/29/23
to Prometheus Users
You are right, Thanks a lot Brian.
rate(windows_logical_disk_read_write_latency_seconds_total[10s]) / (rate(windows_logical_disk_reads_total[10s]) + rate(windows_logical_disk_writes_total[10s]))
Reply all
Reply to author
Forward
0 new messages