Configure and Manage vSphere Flash Read Cache

What is vSphere Flash Read Cache aka vFlash?

Flash Read Cache helps in accelerating virtual machine performance through the use of flash devices residing in Esxi host as a cache.

vFlash was first introduced in vSphere 5.5. It allows you to use local SSD disks of Esxi host to create a caching layer for your virtual machines. By using host local SSD’s, you can offload some of the IO from your SAN storage to these local SSD disks.

vFlash aggregates local flash devices into a pool and this pool is called “Virtual flash resource” (vFRC). For example if you have 3 x 60 GB SSD you end up with a 180 GB virtual flash resource. Each local SSD configured for vFRC is formatted with a filesystem called VFFS  aka “Virtual Flash File System”.

12

 

vFRC helps reducing lowering application latency as the read IO don’t have to go all the way down to SAN across all the physical network controllers/storage controllers etc and instea they just go to vFRC.

Pre-requisites for using vSphere Flash Read Cache (vFRC):

  • vCenter and ESXi 5.5 or later
  • vCenter Web Client (can only be configured only from Web Client)
  • Can only be configured on a virtual machine with hardware version 10 (VMX-10)
  • The flash storage must be either SSD or PCIe flash card and must be unused

Limitations with vFRC?

Below are some limitations for using vFRC:

  • Maximum of 8 SSDs per VFFS
  • Maximum of 4TB physical Flash-based device size
  • Maximum of 32TB virtual Flash resource total size (8x4TB)
  • Maximum of 400GB of virtual Flash Read Cache per Virtual Machine Disk (VMDK) file

vFRC compatibility with core vSphere Features?

vFRC is totally compatible with vMotion, HA, DRS etc. You can read more on this from here

How to configure vFRC?

In my lab I do not have SSD disks, So I have faked the normal HDD’s as SSD. To do so, select the Esxi host and navigate to Manage > Storage > Storage Devices.

Select the local disk which you want to mark as Flash/SSD and click on the green F button

vfrc-1

Refresh web client to ensure disk is detected as Flash disk.

vfrc-2.1.PNG

Now navigate to Manage > Storage > Virtual Flash Resources Management and click on Add Capacity to create virtual flash resource.

vfrc-2

Select the flash disks from the list which you want to add to the pool.

vfrc-3

Verify the properties of the pool by expanding capacity button.

vfrc-4

Next is to enable virtual machine to use the flash cache. To do so, edit properties of virtual machine and expand the disk settings and for option virtual flash read cache, enter the amount of GB you want to use as a cache.

vfrc-5

Note: There is an advanced option which gives you ability to define the block size. The block size could be important when you want to optimize for a particular application.

vfrc-5.1.PNG

Now flash read cache has been enabled on VM. Now when you try to vMotion such a VM, you will find one extra option as shown below:

Always migrate the cache contents: Virtual machine migration proceeds only if all of the cache contents can be migrated to the destination host. This option is useful when the cache is small or the cache size closely matches the application’s active data.

Do not migrate the cache contents: Flash Read Cache is not migrated, the cache is dropped. Flash Read Cache will be recreated on the destination host. This option is useful when the cache size is large or the cache size is larger than the application’s active data.

vfrc-6

Virtual Flash Resource and Host Swap Cache

In case of memory crunch situation in a highly over allocated environment, Esxi employs its memory management techniques and one of them is host swapping. Swapping is the last resort for reclaiming memory pages from virtual machines and this technique is used only when all memory management techniques like TPS,balloning, Memory compression etc have exhausted and Esxi is still under pressure to meet memory demands of virtual machines.

The backend storage where virtual machine is swapping is of very high importance in case of swapping because contents of memory pages are dumped to storage and accessing memory pages from storage is very slow as compared to accessing it from memory.

with vSphere 5.5, vFRC can be used on an ESXi host to configure a swap cache. The host swap cache is allocated from a portion of the virtual flash resource. SSD disks can be configured to partly use the space for vFRC and partly for host cache.

Using swap to host cache is not the same as placing regular swap files on SSD-backed datastores. Even if you enable swap to host cache, the host still needs to create regular swap files. However, when you use swap to host cache, the speed of the storage where the host places regular swap files is less important.

The Host Cache Configuration page allows you to view the amount of space on a datastore that a host can use to swap to host cache. Only SSD-backed datastores appear in the list of datastores on the Host Cache Configuration page.

Host swap cache can be configured by selecting an Esxi host and navigating to Manage > Settings > Virtual Flash Host Swap Cache configuration.

To know more about vFRC please check out this article from VMware.

Also there is nice short tutorial present on youtube for vFRC configuration.

Additional References

A closer look at vFRC

Introduction to vSphere Flash Read Cache

I hope you find this post informational. Feel free to share this on social media if it is worth sharing. Be sociable 🙂