<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic NetApp 9 : disk average latency calculation : SDK vs CLI in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/NetApp-9-disk-average-latency-calculation-SDK-vs-CLI/m-p/144177#M2750</link>
    <description>&lt;P&gt;Hi guys,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On a FAS2650 storage system, I am trying to compute the disks average latencies.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When querying the API with&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;netapp&amp;gt;
  &amp;lt;perf-object-counter-list-info&amp;gt;
    &lt;FONT color="#0000FF"&gt;&amp;lt;objectname&amp;gt;disk&amp;lt;/objectname&amp;gt;&lt;/FONT&gt;
  &amp;lt;/perf-object-counter-list-info&amp;gt;
&amp;lt;/netapp&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;here is what it says about read latency :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;counter-info&amp;gt;
	&lt;FONT color="#0000FF"&gt;&amp;lt;base-counter&amp;gt;user_read_blocks&amp;lt;/base-counter&amp;gt;&lt;/FONT&gt;
	&amp;lt;desc&amp;gt;Average latency per block in microseconds for user read operations&amp;lt;/desc&amp;gt;
	&amp;lt;is-deprecated&amp;gt;false&amp;lt;/is-deprecated&amp;gt;
	&lt;FONT color="#0000FF"&gt;&amp;lt;name&amp;gt;user_read_latency&amp;lt;/name&amp;gt;&lt;/FONT&gt;
	&amp;lt;privilege-level&amp;gt;admin&amp;lt;/privilege-level&amp;gt;
	&amp;lt;properties&amp;gt;average&amp;lt;/properties&amp;gt;
	&lt;FONT color="#0000FF"&gt;&amp;lt;unit&amp;gt;microsec&amp;lt;/unit&amp;gt;&lt;/FONT&gt;
&amp;lt;/counter-info&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and here is what it says about write latency :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;counter-info&amp;gt;
	&lt;FONT color="#0000FF"&gt;&amp;lt;base-counter&amp;gt;user_write_blocks&amp;lt;/base-counter&amp;gt;&lt;/FONT&gt;
	&amp;lt;desc&amp;gt;Average latency per block in microseconds for user write operations&amp;lt;/desc&amp;gt;
	&amp;lt;is-deprecated&amp;gt;false&amp;lt;/is-deprecated&amp;gt;
	&lt;FONT color="#0000FF"&gt;&amp;lt;name&amp;gt;user_write_latency&amp;lt;/name&amp;gt;&lt;/FONT&gt;
	&amp;lt;privilege-level&amp;gt;admin&amp;lt;/privilege-level&amp;gt;
	&amp;lt;properties&amp;gt;average&amp;lt;/properties&amp;gt;
	&lt;FONT color="#0000FF"&gt;&amp;lt;unit&amp;gt;microsec&amp;lt;/unit&amp;gt;&lt;/FONT&gt;
&amp;lt;/counter-info&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on this information, my understanding is, if I want to compute the total average latency of a specific disk, it will go like this :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;disk_total_average_latency = [ [ (user_read_latency at time t2 - user_read_latency at time t1) / (user_read_blocks at time t2 - user_read_blocks at time t1) ] + [ (user_write_latency at time t2 - user_write_latency at time t1) / (user_write_blocks at time t2 - user_write_blocks at time t1) ] ] / 1000&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The division by 1000 is here to give me the total average latency in milliseconds.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, when I apply this formula, I get very small values, as compared to what the CLI displays.&lt;/P&gt;
&lt;P&gt;As an example, here is the result I get when I run the above formula on one disk at 19:33:48 and 19:36:01 :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;total_average_latency (&lt;FONT color="#0000FF"&gt;19:33:48&lt;/FONT&gt;) = &lt;FONT color="#0000FF"&gt;0.10 ms&lt;/FONT&gt;
total_average_latency (&lt;FONT color="#0000FF"&gt;19:36:01&lt;/FONT&gt;) = &lt;FONT color="#0000FF"&gt;0.14 ms&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And here is what the CLI displays for the same disk :&lt;/P&gt;
&lt;PRE&gt;san::*&amp;gt; statistics disk show -disk &lt;FONT color="#0000FF"&gt;DDD&lt;/FONT&gt;

san : 10/24/2018 &lt;FONT color="#0000FF"&gt;19:34:51&lt;/FONT&gt;

                            Busy *Total Read Write  Read   Write Latency
               Disk   Node   (%)    Ops  Ops   Ops (Bps)   (Bps)    (&lt;FONT color="#0000FF"&gt;us&lt;/FONT&gt;)
------------------- ------ ----- ------ ---- ----- ----- ------- -------
                &lt;FONT color="#0000FF"&gt;DDD&lt;/FONT&gt; san-02     2     12    1    11 23552 2608128    &lt;FONT color="#0000FF"&gt;6001&lt;/FONT&gt;


san::*&amp;gt; statistics disk show -disk &lt;FONT color="#0000FF"&gt;DDD&lt;/FONT&gt;

san : 10/24/2018 &lt;FONT color="#0000FF"&gt;19:36:21&lt;/FONT&gt;&lt;BR /&gt;                            Busy *Total Read Write   Read   Write Latency
               Disk   Node   (%)    Ops  Ops   Ops  (Bps)   (Bps)    (&lt;FONT color="#0000FF"&gt;us&lt;/FONT&gt;)
------------------- ------ ----- ------ ---- ----- ------ ------- -------&lt;BR /&gt;                &lt;FONT color="#0000FF"&gt;DDD&lt;/FONT&gt; san-02     4     22    6    15 965632 3582976    &lt;FONT color="#0000FF"&gt;6555&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;So with the SDK, the order of magnitude is around 0.1 milliseconds, whereas with the CLI, the order of magnitude is around 6 milliseconds.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are my questions :&lt;/P&gt;
&lt;P&gt;- Am I missing anything or doing anything wrong with my calculations ?&lt;/P&gt;
&lt;P&gt;- Is there a known issue regarding the values displayed in the CLI ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope my issue is detailed enough for you guys to help me.&lt;/P&gt;
&lt;P&gt;Should you need any additional information, please let me know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your time.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2025 13:11:01 GMT</pubDate>
    <dc:creator>liok</dc:creator>
    <dc:date>2025-06-04T13:11:01Z</dc:date>
    <item>
      <title>NetApp 9 : disk average latency calculation : SDK vs CLI</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/NetApp-9-disk-average-latency-calculation-SDK-vs-CLI/m-p/144177#M2750</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On a FAS2650 storage system, I am trying to compute the disks average latencies.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When querying the API with&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;netapp&amp;gt;
  &amp;lt;perf-object-counter-list-info&amp;gt;
    &lt;FONT color="#0000FF"&gt;&amp;lt;objectname&amp;gt;disk&amp;lt;/objectname&amp;gt;&lt;/FONT&gt;
  &amp;lt;/perf-object-counter-list-info&amp;gt;
&amp;lt;/netapp&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;here is what it says about read latency :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;counter-info&amp;gt;
	&lt;FONT color="#0000FF"&gt;&amp;lt;base-counter&amp;gt;user_read_blocks&amp;lt;/base-counter&amp;gt;&lt;/FONT&gt;
	&amp;lt;desc&amp;gt;Average latency per block in microseconds for user read operations&amp;lt;/desc&amp;gt;
	&amp;lt;is-deprecated&amp;gt;false&amp;lt;/is-deprecated&amp;gt;
	&lt;FONT color="#0000FF"&gt;&amp;lt;name&amp;gt;user_read_latency&amp;lt;/name&amp;gt;&lt;/FONT&gt;
	&amp;lt;privilege-level&amp;gt;admin&amp;lt;/privilege-level&amp;gt;
	&amp;lt;properties&amp;gt;average&amp;lt;/properties&amp;gt;
	&lt;FONT color="#0000FF"&gt;&amp;lt;unit&amp;gt;microsec&amp;lt;/unit&amp;gt;&lt;/FONT&gt;
&amp;lt;/counter-info&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and here is what it says about write latency :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;counter-info&amp;gt;
	&lt;FONT color="#0000FF"&gt;&amp;lt;base-counter&amp;gt;user_write_blocks&amp;lt;/base-counter&amp;gt;&lt;/FONT&gt;
	&amp;lt;desc&amp;gt;Average latency per block in microseconds for user write operations&amp;lt;/desc&amp;gt;
	&amp;lt;is-deprecated&amp;gt;false&amp;lt;/is-deprecated&amp;gt;
	&lt;FONT color="#0000FF"&gt;&amp;lt;name&amp;gt;user_write_latency&amp;lt;/name&amp;gt;&lt;/FONT&gt;
	&amp;lt;privilege-level&amp;gt;admin&amp;lt;/privilege-level&amp;gt;
	&amp;lt;properties&amp;gt;average&amp;lt;/properties&amp;gt;
	&lt;FONT color="#0000FF"&gt;&amp;lt;unit&amp;gt;microsec&amp;lt;/unit&amp;gt;&lt;/FONT&gt;
&amp;lt;/counter-info&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on this information, my understanding is, if I want to compute the total average latency of a specific disk, it will go like this :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;disk_total_average_latency = [ [ (user_read_latency at time t2 - user_read_latency at time t1) / (user_read_blocks at time t2 - user_read_blocks at time t1) ] + [ (user_write_latency at time t2 - user_write_latency at time t1) / (user_write_blocks at time t2 - user_write_blocks at time t1) ] ] / 1000&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The division by 1000 is here to give me the total average latency in milliseconds.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, when I apply this formula, I get very small values, as compared to what the CLI displays.&lt;/P&gt;
&lt;P&gt;As an example, here is the result I get when I run the above formula on one disk at 19:33:48 and 19:36:01 :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;total_average_latency (&lt;FONT color="#0000FF"&gt;19:33:48&lt;/FONT&gt;) = &lt;FONT color="#0000FF"&gt;0.10 ms&lt;/FONT&gt;
total_average_latency (&lt;FONT color="#0000FF"&gt;19:36:01&lt;/FONT&gt;) = &lt;FONT color="#0000FF"&gt;0.14 ms&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And here is what the CLI displays for the same disk :&lt;/P&gt;
&lt;PRE&gt;san::*&amp;gt; statistics disk show -disk &lt;FONT color="#0000FF"&gt;DDD&lt;/FONT&gt;

san : 10/24/2018 &lt;FONT color="#0000FF"&gt;19:34:51&lt;/FONT&gt;

                            Busy *Total Read Write  Read   Write Latency
               Disk   Node   (%)    Ops  Ops   Ops (Bps)   (Bps)    (&lt;FONT color="#0000FF"&gt;us&lt;/FONT&gt;)
------------------- ------ ----- ------ ---- ----- ----- ------- -------
                &lt;FONT color="#0000FF"&gt;DDD&lt;/FONT&gt; san-02     2     12    1    11 23552 2608128    &lt;FONT color="#0000FF"&gt;6001&lt;/FONT&gt;


san::*&amp;gt; statistics disk show -disk &lt;FONT color="#0000FF"&gt;DDD&lt;/FONT&gt;

san : 10/24/2018 &lt;FONT color="#0000FF"&gt;19:36:21&lt;/FONT&gt;&lt;BR /&gt;                            Busy *Total Read Write   Read   Write Latency
               Disk   Node   (%)    Ops  Ops   Ops  (Bps)   (Bps)    (&lt;FONT color="#0000FF"&gt;us&lt;/FONT&gt;)
------------------- ------ ----- ------ ---- ----- ------ ------- -------&lt;BR /&gt;                &lt;FONT color="#0000FF"&gt;DDD&lt;/FONT&gt; san-02     4     22    6    15 965632 3582976    &lt;FONT color="#0000FF"&gt;6555&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;So with the SDK, the order of magnitude is around 0.1 milliseconds, whereas with the CLI, the order of magnitude is around 6 milliseconds.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are my questions :&lt;/P&gt;
&lt;P&gt;- Am I missing anything or doing anything wrong with my calculations ?&lt;/P&gt;
&lt;P&gt;- Is there a known issue regarding the values displayed in the CLI ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope my issue is detailed enough for you guys to help me.&lt;/P&gt;
&lt;P&gt;Should you need any additional information, please let me know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your time.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 13:11:01 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/NetApp-9-disk-average-latency-calculation-SDK-vs-CLI/m-p/144177#M2750</guid>
      <dc:creator>liok</dc:creator>
      <dc:date>2025-06-04T13:11:01Z</dc:date>
    </item>
  </channel>
</rss>

