ONTAP Rest API Discussions

Question Regarding Volume Metrics Output

ns-api-guru
810 Views

I am fetching volume metrics from the following endpoint:

GET /api/storage/volumes/11111/metrics?fields=throughput%2Clatency%2Ciops&max_records=1&interval=1h
 
Here is the output:

 

GET trace: < GET /api/storage/volumes/11111/metrics?fields=throughput%2Clatency%2Ciops&max_records=1&interval=1h

{
  "records": [
    {
      "timestamp": "2023-08-15T23:51:00Z",
      "latency": {
        "read": 0,
        "write": 205,
        "other": 128,
        "total": 128
      },
      "iops": {
        "read": 0,
        "write": 1,
        "other": 7105,
        "total": 7107
      },
      "throughput": {
        "read": 0,
        "write": 15207,
        "other": 0,
        "total": 15207
      },
      "_links": {
        "self": {
          "href": "/api/storage/volumes/11111/metrics/2023-08-15T23%3A51%3A00Z"
        }
      }
    }
  ],
  "num_records": 1,
  "_links": {
    "self": {
      "href": "/api/storage/volumes/11111/metrics?fields=throughput%2Clatency%2Ciops&max_records=1&interval=1h"
    },
    "next": {
      "href": "/api/storage/volumes/11111/metrics?start.seq_no=1&start.timestamp=2023-08-15T23%3A50%3A45Z&fields=throughput%2Clatency%2Ciops&max_records=1&interval=1h"
    }
  }
}

 

 

  • How are 'total' values calculated? For example, for 'throughput', the total value makes sense. For IOPS, it sort of makes sense even though "7105 + 1 = 7106", not "7107"... But for latency, total value does not make sense to me. Why is it "128"?
1 ACCEPTED SOLUTION

ddegraaf
778 Views

This is working as designed. What you are looking at is the latency graphs for a volume workload.
The 'workload total latency' here is the total average latency for that workload.
Which means that it is derived by calculating:

((read ops * read lat) + (write ops * write lat) + (other ops * other lat)) / (read ops + write ops + other ops)

In this case that would be ((0*0)+(1*205)+(7105*128))/(0 + 1 + 7105) = 128.0108 = 128 as an integer

The 'workload latency' here represents the avg read, write and other latency seen.

 

As far as the IOPS incongruity it is most likely explained by converting the floting point number to integers. For example: 7105.3 + 1.3 = 7106.6 -> 7107 as an integer. 

View solution in original post

1 REPLY 1

ddegraaf
779 Views

This is working as designed. What you are looking at is the latency graphs for a volume workload.
The 'workload total latency' here is the total average latency for that workload.
Which means that it is derived by calculating:

((read ops * read lat) + (write ops * write lat) + (other ops * other lat)) / (read ops + write ops + other ops)

In this case that would be ((0*0)+(1*205)+(7105*128))/(0 + 1 + 7105) = 128.0108 = 128 as an integer

The 'workload latency' here represents the avg read, write and other latency seen.

 

As far as the IOPS incongruity it is most likely explained by converting the floting point number to integers. For example: 7105.3 + 1.3 = 7106.6 -> 7107 as an integer. 

Public