Application Integration
1751921 Members
4852 Online
108783 Solutions
New Discussion юеВ

Get the Cache Hit Rate from the CLI?

 
SOLVED
Go to solution
michael_rodrigu
New Member

Get the Cache Hit Rate from the CLI?

Is it possible to see the cache hit rate for a volume or for the whole array using a CLI command? I've looked through the reference document and saw some data related to cache using "vol --info" but couldn't find anything specifically showing the hit rate?

1 REPLY 1
jcates98
Trusted Contributor
Solution

Re: Get the Cache Hit Rate from the CLI?

Hi Michael,

The vol command will show you how the volume is configured - for example what performance policy is set, whether or not caching is enabled, and what the caching policy is.  It will not, however, give you any statistics as far as how many reads are actually being serviced from the cache.  For that, you'll need to look to the stats command.  (Or InfoSight, or the NimbleOS Web UI...)

You asked about hit rates for both a single volume and the whole array, so I'll include examples of each.

Whole Array

Nimble OS $ stats --diff --interval 5

Will use per-second statistics

Stats from 2016-06-01,12:46:45 to 2038-01-18,19:14:07

       reads      writes    seqRead%   nsMemHit%   nsSsdHit%         netRxKB         netTxKB         ssdRdKB         ssdWrKB         hddRdKB         hddWrKB

         110         214           0         100           0           18119             248               0               0          141212             740

           0         230           0           0           0           11695              61               0               0          112977             792

         108         206           0         100           0           18189             306               0               0          141220            2148

           9         252           0         100           0           11702             202               0               0          141212            8508

           2         219           0         100           0           18281             100               0               0          112970            6976

           1         219           0         100           0           11992              71               0               0          141212            3468

           0         179           0           0           0           18099              99               0               0          141212            1588

         119         259           0         100           0           11737              77               0               0          112977             968

There are a couple of things to point out here.  First, the --diff option to the stats command gives us incremental statistics rather than a running total.  Next, make particular note of the nsMemHit% and nsSsdHit% fields.  These represent the percentage of reads being serviced from either memory (nsMemHit%) or the flash drives (nsSsdHit%).  The cache hit rate is the sum of these two fields.  I have a very modest workload running on my array in this example, and all of the reads are being serviced from memory.  Note that when there are no reads occurring, this percentage drops to zero.

Individual Volume

Nimble OS $ stats --diff --interval 5 --vol REPL.vmdk

Will use per-second statistics

Stats from 2016-06-01,12:47:53 to 2038-01-18,19:14:07

        vol       reads            rdKB      writes            wrKB    seqRead%   nsMemHit%   nsSsdHit%          dataKB      dataSnapKB

  REPL.vmdk           0               0         121            8020           0           0           0               0               0

  REPL.vmdk           0               0         145           15476           0           0           0               0               0

  REPL.vmdk           0               0         151           13288           0           0           0               0               0

  REPL.vmdk           0               0         149           15017           0           0           0               0               0

  REPL.vmdk           0               0         165           13888           0           0           0               0               0

  REPL.vmdk           1            2.50         161           15316           0         100           0               0               0

  REPL.vmdk        6246           24984         138           10297           0         100           0               0               0

  REPL.vmdk         907            3628         181           14286           0         100           0               0               0

  REPL.vmdk           0               0         133           13300           0           0           0               0               0

  REPL.vmdk           1            2.50         155           15058           0         100           0               0               0

  REPL.vmdk           0               0         149           13809           0           0           0               0               0

  REPL.vmdk           0               0         144           15038           0           0           0               0               0

  REPL.vmdk           0               0          99           10050           0           0           0               0               0

This is essentially the same command line usage as the whole array option, with a volume specified on the command line using the --vol parameter.  Again, the cache hit rate is the nsMemHit% plus the nsSsdHit%.

Cheers,

Julian