Subscribe

# Calculate Volume Latency

Whats the correct way to calculate the Latency of a Volume?

I use the following to get the Latency and IO Counter for Write Requests:

<?xml version="1.0" encoding="UTF-8"?>
<perf-object-get-instances>
<counters>
<counter>write_latency</counter>
<counter>write_ops</counter>
</counters>
<objectname>volume</objectname>
</perf-object-get-instances>
</netapp>

Therefor I get the two requested values:

<counter-data>
<name>write_latency</name>
<value>723389447741</value>
</counter-data>
<counter-data>
<name>write_ops</name>
<value>804869240</value>
</counter-data>

From here: How  can I calculate the Latency in Milliseconds ?

## Re: Calculate Volume Latency

Whats the correct way to calculate the Latency of a Volume?

I use the following to get the Latency and IO Counter for Write Requests:

<?xml version="1.0" encoding="UTF-8"?>
<perf-object-get-instances>
<counters>
<counter>write_latency</counter>
<counter>write_ops</counter>
</counters>
<objectname>volume</objectname>
</perf-object-get-instances>
</netapp>

Therefor I get the two requested values:

<counter-data>
<name>write_latency</name>
<value>723389447741</value>
</counter-data>
<counter-data>
<name>write_ops</name>
<value>804869240</value>
</counter-data>

From here: How  can I calculate the Latency in Milliseconds ?

write_latency is listed as an average in microseconds with the base counter of write_ops.

You'll need to take two samples.  Assuming T1 < T2:

(T2.write_latency - T1.write_latency) / (T2.write_ops - T1.write_ops)

That will be in microseconds.  Multiply by 1000

.

## Re: Calculate Volume Latency

Hi,

Ssee this guide for more information on perf counters and how to 'cook' the data&colon;

http://community.netapp.com/t5/Developer-Network-Articles-and-Resources/NetApp-Unified-Storage-Performance-Management-Using-Open-Interfaces/ta-p/85821

Also, all counters should always increase in value.  So if you ever discover a value that has decreased it must have been reset or rolled over which will mess up your calcuations.  So also check for that condition and discard the sample if a counter decreases in value.

Last thing, in 7-mode the volume counters are really useful but in cDOT beware they only account for processing time starting when the message is received at the backend node and ending when the response is sent from the backend node.  So it does not account for frontend node processing time, cluster network processing time, or QOS delay time if IO is being throttled.  If you are interested in a more end-to-end view you should look to the workload counter group.

Hope that helps!

Cheers,

Storage Architect, NetApp EMEA

## Re: Calculate Volume Latency

This guide is missing "Depends On" column for several components. Can you paste us link of document that contains complete information for netapp filer.
Where can I found the same guide for netapp cluster performance counters.

## Re: Calculate Volume Latency

Hi krayg,

You'll need to take two samples.  Assuming T1 < T2:

(T2.write_latency - T1.write_latency) / (T2.write_ops - T1.write_ops)

That will be in microseconds.

To show that in milli seconds, we need to divide it by 1000 instead of multiplying it by 1000. Correct me if i am wrong.

## Re: Calculate Volume Latency

The depends on field from the doc is also known as a base counter. You can get a list of all objects, counters, and instances using the CLI from Data ONTAP. Check the statistics catalog command tree for more: https://library.netapp.com/ecmdocs/ECMP1196817/html/statistics/catalog/toc.html

Base counter is a field of a counter and you might have to use -instance in your show cud to see it, and maybe be in set -priv advanced mode as well.

hope this helps!

## Re: Calculate Volume Latency

Hi Chris,
I tried CLI commands. I am getting coounter name and description but not the important one's type, display unit and depends on columns that you specified in the document.
Can you shoot exact command to get the three mentioned columns or any other way to identify them.

Regards,
Ratna

## Re: Calculate Volume Latency

Sure, I checked the system and learned you have to be in 'diag' mode and not 'advanced' mode as I had previously suggested:

```sdt-cdot1::*> set -privilege diag

Warning: These diagnostic commands are for use by NetApp personnel only.
Do you want to continue? {y|n}: y

sdt-cdot1::*> statistics catalog counter show -describe -object volume

Object: volume
Counter: asynchronous_frees
Privilege: diag
Base Counter: -
Properties: rate
Unit: per_sec
Size: 8
Description: Number of asynchronous frees per second to the volume

Counter: avg_latency
Privilege: basic
Base Counter: total_ops
Properties: average
Unit: microsec
Size: 8
Description: Average latency in microseconds for the WAFL filesystem to
process all the operations on the volume; not including
request processing or network communication time```

I hope that helps!

Cheers,