Home > Blogs > VMware VROOM! Blog


Detailed stats for vSphere Flash Read cache

In the Performance of vFlash Read Cache in VMware vSphere 5.5 whitepaper details about performance in several different workloads is provided [http://www.vmware.com/files/pdf/techpaper/vfrc-perf-vsphere55.pdf].  It also covers details about how to tune and configure vFRC to obtain best performance.  This blog article goes through the details of how to obtain runtime statistics about the vSphere Flash Read Cache like the Cache hit rate, Latency of cached I/Os, and average number of cache blocks evicted as used in the whitepaper.

You can run esxcli to get some of these stats using the following commands:

~ # esxcli storage vflash cache list

This would list the identifiers for the caches that are currently in use.  These are displayed one per vFlash-enabled-VMDKs.   To retrieve the vFRC statistics for a particular vFlash-enabled-VMDK, the following command can be used:

~ # esxcli storage vflash cache get –c <cache-identifier>

However, a few more advanced statistics like the amount of data that is cached at any point of time may be obtained by directly accessing the VSI nodes.  The process to do this is as follows:

Cache identifier may be obtained by either the esxcli command shown above or using

~ # cacheID=`vsish -e ls /vmkModules/vflash/module/vfc/cache/`
~ # vsish -e get /vmkModules/vflash/module/vfc/cache/${cacheID}stats

This displays an output similar to the following:

vFlash per cache instance statistics {
cacheBlockSize:8192
numBlocks:1270976
numBlocksCurrentlyCached:222255
numFailedPrimaryIOs:0
numFailedCacheIOs:0
avgNumBlocksOnCache:172494
read:vFlash per I/O type Statistics {
numIOs:168016
avgNumIOPs:61
maxNumIOPs:1969
avgNumKBs:42143
maxNumKBs:227891
avgLatencyUS:16201
maxLatencyUS:41070
numPrimaryIOs:11442
numCacheIOs:156574
avgCacheLatencyUS:17130
avgPrimaryLatencyUS:239961
cacheHitPercentage:94
}
write:vFlash per I/O type Statistics {
numIOs:102264
avgNumIOPs:307
maxNumIOPs:3982
avgNumKBs:10424
maxNumKBs:12106
avgLatencyUS:3248
maxLatencyUS:31798
numPrimaryIOs:102264
numCacheIOs:0
avgCacheLatencyUS:0
avgPrimaryLatencyUS:3248
cacheHitPercentage:0
}
rwTotal:vFlash per I/O type Statistics {
numIOs:270280
avgNumIOPs:88
maxNumIOPs:2027
avgNumKBs:52568
maxNumKBs:233584
avgLatencyUS:11300
maxLatencyUS:40029
numPrimaryIOs:113706
numCacheIOs:156574
avgCacheLatencyUS:17130
avgPrimaryLatencyUS:27068
cacheHitPercentage:58
}
flush:vFlash per operation type statistics {
lastOpTimeUS:0
numBlocksLastOp:0
nextOpTimeUS:0
numBlocksNextOp:0
avgNumBlocksPerOp:0
}
evict:vFlash per operation type statistics {
lastOpTimeUS:0
numBlocksLastOp:0
nextOpTimeUS:0
numBlocksNextOp:0
avgNumBlocksPerOp:0
}
}

This output contains all of the metrics that are discussed in the vShpere Flash Read Cache whitepaper.  This information can be used for sizing the cache and cache blocks in the most effective way.

Disclaimer: This interface (vsish) is not officially supported by VMware, so please use at your own risk.

3 thoughts on “Detailed stats for vSphere Flash Read cache

  1. TheFluffyAdmin

    Our host lists Identifiers as follows:

    ~ # esxcli storage vflash cache list
    vfc-1197313806-TS1 (1e3fa909-b74a-4295-aa3d-0018b75d7cc1)_1, vfc-137041234-TS1 (1e3fa909-b74a-4295-aa3d-0018b75d7cc1)

    In this case, you should inclose the identifier in quotes, as follows:

    esxcli storage vflash cache get -c ‘vfc-137041234-TS1 (1e3fa909-b74a-4295-aa3d-0018b75d7cc1)’
    World ID: 40644881
    Cachename: vfc-137041234-TS1 (1e3fa909-b74a-4295-aa3d-0018b75d7cc1)
    Vmdkname: 37897cf5-cbt

    ~ # esxcli storage vflash cache stats get -c ‘vfc-137041234-TS1 (1e3fa909-b74a-4295-aa3d-0018b75d7cc1)’
    Read:
    Cache hit rate (as a percentage): 17
    Total cache I/Os: 6509
    Mean cache I/O latency (in microseconds): 169
    Mean disk I/O latency (in microseconds): 15650
    Total I/Os: 39485
    Mean IOPS: 150
    Max observed IOPS: 150
    Mean number of KB per I/O: 704
    Max observed number of KB per I/O: 704
    Mean I/O latency (in microseconds): 6641
    Max observed I/O latency (in microseconds): 6641
    Evict:
    Last I/O operation time (in microseconds): 0
    Number of I/O blocks in last operation: 0
    Mean blocks per I/O operation: 0
    Total failed SSD I/Os: 0
    Total failed disk I/Os: 0
    Mean number of cache blocks in use: 160243

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*