Checking vSphere Flash Read Cache
Sometimes we need to check that everything is working fine with SSD. In order to check that, first connect to esxi via ssh
~ # esxcli storage vflash cache list
vfc-1540989573-server.xxxxxxxx-000001# esxcli storage vflash cache stats
Usage: esxcli storage vflash cache stats {cmd} [cmd options]Available Commands:
get Get vflash cache statistics.
reset Reset vflash cache statistics.
In this case vfc-1540989573-server.xxxxxxxx-000001 is the virual machine id
Now we’ll use:
# esxcli storage vflash cache stats
# esxcli storage vflash cache stats get
Error: Missing required parameter -c|–cache-name
Usage: esxcli storage vflash cache stats get [cmd options]
Description:
get Get vflash cache statistics.
Cmd options:
-c|–cache-name=<str> The vflash cache file name (required)
-m|–module-name=<str>
The vflash module name
Now it’s time to run the complete command to get all information related with Flash cache, so here the result.:
~ # esxcli storage vflash cache stats get -m vfc -c vfc-1540989573-server.xxxxxxxx-000001
Read:
Cache hit rate (as a percentage): 6
Total cache I/Os: 8068
Mean cache I/O latency (in microseconds): 288
Mean disk I/O latency (in microseconds): 20807
Total I/Os: 146717
Mean IOPS: 101
Max observed IOPS: 101
Mean number of KB per I/O: 2365
Max observed number of KB per I/O: 2365
Mean I/O latency (in microseconds): 9862
Max observed I/O latency (in microseconds): 9862
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: 265818
Once you know everything is working fine, Total I/Os: 146717 is the evidence that SSD is receiving I/O’s interactions.
The second and probably the most important thing you have to do is to get the specific block size for the virtual machine.
~ # vscsiStats -l
~ # vscsiStats -l
Virtual Machine worldGroupID: 495475, Virtual Machine Display Name: server.hostingred.com, Virtual Machine Config File: /vmfs/volumes/53479e2c-387086b8/server.hostingred.com/server.hostingred.com.vmx, {
Virtual SCSI Disk handleID: 8241 (scsi0:0)
Virtual SCSI Disk handleID: 8242 (scsi0:1)
Virtual SCSI Disk handleID: 8243 (scsi0:2)
}
And run the following on a busy day at least 2 or 3 hours:
~ # vscsiStats -s -w 495475
vscsiStats: Starting Vscsi stats collection for worldGroup 495475, handleID 8241 (scsi0:0)
Success.
vscsiStats: Starting Vscsi stats collection for worldGroup 495475, handleID 8242 (scsi0:1)
Success.
vscsiStats: Starting Vscsi stats collection for worldGroup 495475, handleID 8243 (scsi0:2)
Success.
Where 495475 is the worldGroupID, so you have to check your own id, or ids in your infrastructure.
At the end, run :
~ # vscsiStats -p ioLength
Histogram: IO lengths of commands for virtual machine worldGroupID : 495475, virtual disk handleID : 8241 (scsi0:0) {
min : 4096
max : 524288
mean : 8980
count : 366944
{
0 (<= 512)
0 (<= 1024)
0 (<= 2048)
0 (<= 4095)
218406 (<= 4096)
0 (<= 8191)
47401 (<= 8192)
40948 (<= 16383)
52524 (<= 16384)
3251 (<= 32768)
1532 (<= 49152)
165 (<= 65535)
751 (<= 65536)
467 (<= 81920)
477 (<= 131072)
393 (<= 262144)
629 (<= 524288)
0 (> 524288)
}
}
Histogram: IO lengths of Read commands for virtual machine worldGroupID : 495475, virtual disk handleID : 8241 (scsi0:0) {
min : 4096
max : 262144
mean : 22133
count : 2442
{
0 (<= 512)
0 (<= 1024)
0 (<= 2048)
0 (<= 4095)
85 (<= 4096)
0 (<= 8191)
28 (<= 8192)
16 (<= 16383)
2018 (<= 16384)
144 (<= 32768)
36 (<= 49152)
2 (<= 65535)
27 (<= 65536)
15 (<= 81920)
45 (<= 131072)
26 (<= 262144)
0 (<= 524288)
0 (> 524288)
}
}
Histogram: IO lengths of Write commands for virtual machine worldGroupID : 495475, virtual disk handleID : 8241 (scsi0:0) {
min : 4096
max : 524288
mean : 8892
count : 364502
{
0 (<= 512)
0 (<= 1024)
0 (<= 2048)
0 (<= 4095)
218321 (<= 4096)
0 (<= 8191)
47373 (<= 8192)
40932 (<= 16383)
50506 (<= 16384)
3107 (<= 32768)
1496 (<= 49152)
163 (<= 65535)
724 (<= 65536)
452 (<= 81920)
432 (<= 131072)
367 (<= 262144)
629 (<= 524288)
0 (> 524288)
}
}
Histogram: IO lengths of commands for virtual machine worldGroupID : 495475, virtual disk handleID : 8242 (scsi0:1) {
min : 4096
max : 524288
mean : 22127
count : 4659
{
0 (<= 512)
0 (<= 1024)
0 (<= 2048)
0 (<= 4095)
2330 (<= 4096)
0 (<= 8191)
65 (<= 8192)
69 (<= 16383)
1612 (<= 16384)
224 (<= 32768)
80 (<= 49152)
5 (<= 65535)
40 (<= 65536)
29 (<= 81920)
37 (<= 131072)
101 (<= 262144)
67 (<= 524288)
0 (> 524288)
}
}
Histogram: IO lengths of Read commands for virtual machine worldGroupID : 495475, virtual disk handleID : 8242 (scsi0:1) {
min : 4096
max : 262144
mean : 27578
count : 1232
{
0 (<= 512)
0 (<= 1024)
0 (<= 2048)
0 (<= 4095)
18 (<= 4096)
0 (<= 8191)
3 (<= 8192)
2 (<= 16383)
1023 (<= 16384)
54 (<= 32768)
24 (<= 49152)
0 (<= 65535)
25 (<= 65536)
14 (<= 81920)
23 (<= 131072)
46 (<= 262144)
0 (<= 524288)
0 (> 524288)
}
}
Histogram: IO lengths of Write commands for virtual machine worldGroupID : 495475, virtual disk handleID : 8242 (scsi0:1) {
min : 4096
max : 524288
mean : 20168
count : 3427
{
0 (<= 512)
0 (<= 1024)
0 (<= 2048)
0 (<= 4095)
2312 (<= 4096)
0 (<= 8191)
62 (<= 8192)
67 (<= 16383)
589 (<= 16384)
170 (<= 32768)
56 (<= 49152)
5 (<= 65535)
15 (<= 65536)
15 (<= 81920)
14 (<= 131072)
55 (<= 262144)
67 (<= 524288)
0 (> 524288)
}
}
Histogram: IO lengths of commands for virtual machine worldGroupID : 495475, virtual disk handleID : 8243 (scsi0:2) {
min : 4096
max : 524288
mean : 19174
count : 4374
{
0 (<= 512)
0 (<= 1024)
0 (<= 2048)
0 (<= 4095)
1806 (<= 4096)
0 (<= 8191)
20 (<= 8192)
131 (<= 16383)
1851 (<= 16384)
220 (<= 32768)
128 (<= 49152)
34 (<= 65535)
37 (<= 65536)
36 (<= 81920)
50 (<= 131072)
31 (<= 262144)
30 (<= 524288)
0 (> 524288)
}
}
Histogram: IO lengths of Read commands for virtual machine worldGroupID : 495475, virtual disk handleID : 8243 (scsi0:2) {
min : 4096
max : 262144
mean : 26251
count : 758
{
0 (<= 512)
0 (<= 1024)
0 (<= 2048)
0 (<= 4095)
87 (<= 4096)
0 (<= 8191)
0 (<= 8192)
5 (<= 16383)
534 (<= 16384) ---ESTABLISH THIS VALUE
40 (<= 32768)
21 (<= 49152)
0 (<= 65535)
13 (<= 65536)
13 (<= 81920)
30 (<= 131072)
15 (<= 262144)
0 (<= 524288)
0 (> 524288)
}
}
Histogram: IO lengths of Write commands for virtual machine worldGroupID : 495475, virtual disk handleID : 8243 (scsi0:2) {
min : 4096
max : 524288
mean : 17691
count : 3616
{
0 (<= 512)
0 (<= 1024)
0 (<= 2048)
0 (<= 4095)
1719 (<= 4096)
0 (<= 8191)
20 (<= 8192)
126 (<= 16383)
1317 (<= 16384)
180 (<= 32768)
107 (<= 49152)
34 (<= 65535)
24 (<= 65536)
23 (<= 81920)
20 (<= 131072)
16 (<= 262144)
30 (<= 524288)
0 (> 524288)
}
}
Specifically you need to look for this section : IO lengths of Read commands
And now establish the value:
Related News
VMware Esxi firewall commands
Although this option allows you to put rules relatively easy, many times this rules areRead More
esxcli Connect to localhost failed:
This issue may occur either because has lost the session between esxi with vCenter orRead More