Tendrl / node-agent

A python agent local to every managed storage node in the sds cluster
GNU Lesser General Public License v2.1
4 stars 14 forks source link

Change the logic for calculation of iops values #818

Closed shtripat closed 6 years ago

shtripat commented 6 years ago

Currently the values of totalRead and totalWrites are saved as iops gauge_read and gauge_write in graphite which is wrong.

Interval 5 Stats:
   Block Size:               2048b+                8192b+
 No. of Reads:                    0                     0
No. of Writes:                   10               1048576
 %-latency   Avg-latency   Min-Latency   Max-Latency   No. of calls         Fop
 ---------   -----------   -----------   -----------   ------------        ----
      0.66      37.05 us      14.00 us    2268.00 us          21825    FINODELK
      0.94     125.47 us      36.00 us    5246.00 us           9097       FSYNC
      2.92     163.25 us      99.00 us    4638.00 us          21812    FXATTROP
     95.48     111.08 us      78.00 us    6597.00 us        1048586       WRITE

    Duration: 178 seconds
   Data Read: 0 bytes
Data Written: 8589965312 bytes

It should be calculated as below

iops = (total no. of reads + writes) / duration

For example in above case the value would be something like

iops = ((0 + 0) + (10 + 1048576)) / 178 = 5890.93

shtripat commented 6 years ago

Closing as required PR merged