Frequently asked questions about vSphere Flash Read Cache

Last week I received many emails on the topic of vFlash so I figured I would start collecting these questions and answer them in a “frequently asked questions about vSphere Flash Read Cache” article. That way the info it is out in the open and it should be fairly easy to find using google. If you haven’t done so yet, I would recommend starting by reading my introduction to vSphere Flash Read Cache. If you already have, here are the questions (and answers) I received so far:

  • In a cluster where some hosts have vFlash resources and others do not, can I vMotion a VM with vFlash assigned to a host without vFlash resources?
    • In order to successfully migrate a VM vFlash resources are required on the destination host
  • When migrating a VM I have various options, in essence I can move the cache or drop it. What is the impact of moving the cache?
    • When selecting to move the cache essential an “X-vMotion” (cross vMotion / non-shared-disk migration) is performed. Meaning that the “local” vFlash cache file that is stored on the VFFS filesystem is copied from source to destination. This results in the migration taking longer, but also means that the cache is hot instantly and does not need to be warmed up (impact of dropping the cache is the warm up that needs to happen again).
  • What are the requirements and considerations to run vSphere Flash Read Cache from a VM/Guest perspective?
    • The requirements from a guest perspective are minimal, other than VM hardware level 10 (5.5 compatiblity) there are no requirements. Considerations are also minimal, of course the IO pattern will matter, if you do 90% writes then the benefit will be minimal. If you have a specific IO size then a consideration could be changing the block size.
  • Will a VM be moved by DRS when it has vFlash enabled on a disk?
    • DRS treats a virtual machine with vFlash enabled as if “should vm-host” affinity rules are applied. Meaning that it will only move a virtual machine when absolutely needed, example being when entering maintenance mode or when it is the only way to solve over-utilization. (Similar to “low latency VM” functionality)
  • What additional considerations (if any) need to be made for backing up vFRC supported guests; at guest and/or VM layer?
    • There are no direct considerations with regards to backup. Considering vSphere Flash Read Cache is “write-through” there is no such a thing as “dirty data”. Both cache and storage will be in-sync at all times. One thing to realize is though that when you do a full VM image level backup, the VM will need to be restored to a host that has vFlash enabled in order for it to be powered on. Also note that with other solutions which do write-back back-up could be a potential caveat / concern. Discuss the potential impact with those vendors as each implementation differs.
  • What is the purpose of the “block size” which I can specify in the advanced settings? What is the minimum and maximum size?
    • The block size can be configured from 4KB to 1024KB. In order to optimize for I/O performance and minimize overhead try to align the vFlash blocksize to the blocksize used by your Guest OS / Application. You can leverage a tool like vscsiStats to identify the blocksize used by your virtual machine(s).
  • What happens to a virtual machine which is accelerated and the flash device on the host it is running on fails?
    • When a flash device fails which is being used for vFlash and a VM is actively using it then the VM will continue running but will experience a performance degradation as all reads will need to come from the storage device instead of SSD. In other words, an SSD failure does not cause any form of disruption to the workload but could potentially result in a degraded performance (similar to the performance before enabling vFlash)
  • What if I run out of capacity on my flash device?
    • When a flash device runs out of capacity you will simply not be able to reserve flash resources for new virtual machines or virtual machines for which you want to allocate flash resources.
  • Does vSphere Flash Read Cache do anything for writes like other solutions do?
    • Well I guess the short answer is “no, not directly”. It is called “vSphere Flash Read Cache” for a reason I guess… But when you think about it, although it doesn’t provide write-back caching the “read caching” portion will free up expensive array resources used for those reads. These expensive resources can now be used for… indeed… writes. So although vSphere Flash Read Cache does not provide write-back caching, only write-through, it might lead to accelerated writes simply because of the decrease of stress on your storage system.
  • Is it possible to configure vSphere Flash Read Cache on a virtual machine with Raw Device Mappings (RDM)?
    • vSphere Flash Read Cache does not support Physical RDMs vSphere Flash Read Cache does support Virtual RDMs.
  • Can I use vFlash on a virtual machine which is stored on a VSAN datastore?
    • No you cannot enable vFlash on a virtual machine which is stored on a VSAN datastore. Considering VSAN already provides read caching and write bufferering there is no real value in enabling that second layer of caching and subsequently add complexity along with it.
  • If I have VSAN enabled and also a NAS/SAN datastore, can my VM that is running on the NAS/SAN datastore be enabled for vFRC?
    • Yes, when the VM is stored on the NAS/SAN datastore you can enable vFRC for this particular VM.
  • Is there a minimum size for vSphere Flash Read Cache allocation to a virtual machine?
    • The minimum size for vSphere Flash Read cache is dependent on the selected blocksize. With a 4KB blocksize the minimum is 4MB, and with a 1MB blocksize the minimum is 276MB
  • What happens if I have my block size configured to 1024KB and I do a 4KB IO?
    • Within that 1024KB cache block your 4KB IO will be stored, the rest of the block (1020KB in this scenario) will be marked as “empty”. Hence the reason it is important to align your IO block size with your cache block size to avoid wastage.
  • What happens to my cache when I resize it on a powered-on VM?
    • When the cache is resized all cache is discarded. This results in a period of time where the cache will need to warm up again.
  • If a host fails and virtual machines with vFRC enabled need to be failed over and there are no sufficient resources available what happens?
    • vFRC allocations are reservations. The behavior is similar to that of a CPU or memory reservation. When there is not enough unreserved capacity available then HA will not be able to power-on the virtual machine.
  • When I configure vSphere Flash Read Cache the maximum cache size seems to be limited to 200GB, what is supported and how do I change this?
    • The maximum cache size per virtual machine is 400GB, however in the current release the cache size is limited to 200GB. You can however change the advanced setting called “VFLASH.MacCacheFileSizeMB” to 409600 if desired. Do note that you will need to change this setting on every host if you want the virtual machine to be able to vMotion between hosts or want vSphere HA to be able to restart a virtual machine.
  • How do I monitor a VM to see how much cache is being used? Is there anything in vCenter or ESXTOP to help me?
    • vCenter contains multiple metrics on a virtual machine level. Just look at the advanced section and more explicitly the virtual disk counters starting with “Virtual Flash …”. There are also various helpful metrics to be found using “esxcli storage vflash cache stats get -c <cache name>. This will for instance provide you with the cache hit rate, latency etc. I have not found any esxtop counters yet.
  • When a virtual machine with vSphere Flash Read Cache enabled is vMotioned including the cache which network is used to transfer the cache?
    • When a VM is migrated / vMotioned including the cache then the “XvMotion / enhance vMotion / non-shared migration” logic is used to move the cache content from source to destination. The data is transferred over the vMotion network. Ensure that sufficient bandwidth is available to shorten the migration time.
  • When flash content is migrated along with the virtual machine, will the migration process make a distinction between hot and cold cache?
    • XvMotion is responsible for migrating the cache from source to destination. Today it doesn’t know the difference and will copy the full file from source to destination. Meaning that if you have a cache size of 10GB the full 10GB will be copied regardless of it being used or not.
  • Can I use the same disk that is divided into partition for vSphere Flash Read Cache & VSAN SSD tier?
    • This is not supported! Both VSAN and vSphere Flash Read Cache require there own flash device.
  • The SSD in my host is being reported in vSphere as “non-SSD”. According to support this is a known issue with the generation of server I am using. Will this “mis-reporting” of the disk type affect my ability to configure a vFlash? <added 17/Sept/2013>
    • Yes it will, you will need to tag the SSD as local using (example below is what I use in my lab, your identifier will be different). And in this case I claim it as being “local” and as “SSD”.
      esxcli storage nmp satp rule add –satp VMW_SATP_LOCAL –device mpx.vmhba2:C0:T0:L0 –option “enable_local enable_ssd”
  • If I disable Strict Admission Control for vSphere HA, would it be able to power-on a VM with vFRC enabled? <added 17/Sept/2013>
    • No, admission control does not have anything to do with powering on virtual machines. Even if you disable admission control and there are no sufficient flash resources available then a virtual machine with vFRC enabled cannot be powered on.
    • Also note, that HA Admission Control does not take vFRC resources in to account whatsoever. So in an environment running vFRC you can technically use 100% of all flash resources, whilst Admission Control was setup in an N+1 fashion.
  • Is vFRC as good as the caching solution by vendor X? <added 18/Sept/2013>
    • I have had this question many times. It is difficult to answer as it depends. It depends on:
      • Your requirements from a functional perspective (read vs write back caching)
      • Type of workload you are running (read vs write, VDI vs Server)
      • Support requirements (Not all solutions out there are on the VMware compatibility list)
      • Operational requirements (vFRC needs to be enabled per virtual disk, some vendors do per datastore for instance etc)
      • Budget and even current vSphere licenses used (vFRC is included with Enterprise Plus)
  • x

If you have any other questions, don’t hesitate to drop them here and I will add them to the FAQ when applicable to the broader audience.

Be Sociable, Share!

    Comments

    1. Niran Even-Chen says

      Duncan, When you say “One thing to realize is though that when you do a full VM image level backup, the VM will need to be restored to a host that has vFlash enabled in order for it to be powered on”, can you elaborate? If the cache is write through then why is the full VM image restore depended on it?

      • Duncan says

        Because the VM configuration has vFlash enabled. Of course you can take it out, but that is an extra step. Just something to be aware off operationally speaking

        • says

          “Because the VM configuration has vFlash enabled. Of course you can take it out, but that is an extra step. Just something to be aware off operationally speaking”
          – How do you take it out? Do I just edit the machine and set the vfrc to 0, then it will start? I’d like to evaluate vfrc on one host and if that host fails, I’d need to be able to start that vm on host without any vfrc.

    2. Luke D says

      “vFRC allocations are reservations.” I’m concerned that this could be quite cumbersome to manage with large numbers of VMs with different workload characteristics.

      I’m thinking out loud.. how about using relative “shares” combined with analysis of “hot” blocks for a sort of weighted MRU approach. Even better — vFRC resource pools. I guess it’s still early days. Anyone know what the other vendors are doing?

    3. Nyh says

      I suspect that the answer is no, but… Can I use the same disk that is divided into partition for Read Cache & vSan SSD tier?

    4. says

      Thanks Duncan.
      If the ESXi host has both VSAN and vFlash, does it mean the block is cached 2x? I hope VSAN will be vFlash aware and intelligently use the vFlash for Read cache instead of duplicating it. This can help reduce the SSD cost as it’s not exactly cheap since each host will need 2.

        • Remy Zandwijk says

          So “No you cannot enable vFlash on a virtual machine which is stored on a virtual machine.” in the FAQ should be “No you cannot enable vFlash on a virtual machine which is stored on a VSAN datastore”. Right?

    5. Tim says

      Does the caveat regarding image level backups apply to VMs replicated using vSphere Replication as well? IOW, would the target site require hosts to be vFlash enabled too?

    6. Magnus says

      It seems vscsistats can’t handle hosts with lots of VMs (75+). We get an overflow error trying to use vscsistats to get block size. It’s a shame since these are the type of hosts (4CPU, 1 TB RAM) that could benefit from the flash cache. We are on 5.1 build 1065491

      Example error:
      ~ # vscsiStats -l
      VscsiStats: Failed instance list get: worldGroups
      vscsiStats: exiting with error
      VscsiStats error code 0xbad0093: VSI GetList handler overflow

    7. Tyson Then says

      Hi Duncan,
      Thanks for the info.
      I read that vFRC support 8 SSDs per host. I can’t seem to find how multiple SSDs are aggregated. Is data striped across multiple drives like RAID0 with aggregated performance? Or just the combined storage across the drives with data “spilling” across drives.
      Thanks again for your informative posts.

      • says

        You can, you will have to set it using “esxcli” as “local” though. Keep in mind though that the network latency will diminish some of the expected results.

    8. karan gandhi says

      Hi Duncan , 1 Q , how many vflash modules we can have on host ? like vfc , vfc1, suppose we are using one ssd and one pcie ssd , I want my critcal application to use vfrc of pcie ssd and other less critical to use normal SSD , can we can any entries in vmx file of Vm to specify the type of Vflash to be used by one vmdk

    9. Bjørn-Tore says

      Duncan, I dont get my local SSD disks up in the vFlash Add Capacity window. Is there anything I must do on server before they show up and becomes eligible SSD devices ? I could not find so much info on this.

    10. sujith says

      Can i enable/disable or manager vFRC via a vCenter windows version or is it mandator to use the web client.

    11. Sujith says

      Thank you Duncan , one more thing please.
      My ‘esxcli storage core device list ‘ does return “Is SSD: true” I see it as “SSD” type in the vCenter now. But it doesn’t list in the vFRC add capacity window .

      Device Display Name: Local LSI Disk (naa.60030057014488c019165ec007d2de99)
      Storage Array Type: VMW_SATP_LOCAL
      Storage Array Type Device Config: SATP VMW_SATP_LOCAL does not support device configuration.
      Path Selection Policy: VMW_PSP_FIXED
      Path Selection Policy Device Config: {preferred=vmhba1:C2:T0:L0;current=vmhba1:C2:T0:L0}
      Path Selection Policy Device Custom Config:
      Working Paths: vmhba1:C2:T0:L0
      Is Local SAS Device: false
      Is Boot USB Device: false

      ( reboot dint help )
      Do you think there’s something in addition to this i need to do.I was initially planning on using a vendor PCI-e SSD flash card.

      - thanks

    12. Paul_P says

      As vFRC enabled VMs which are backed up need to be restored to a vFRC enabled host, is this the same for SRM replicated VMs too? Either with vSphere replication or using an array replication technology?

      Thanks.

    13. Mark says

      Hi Duncan,
      What command to make the SSD local ?
      I tried the following command, but don’t work.

      esxcli storage nmp satp rule add –satp VMW_SATP_LOCAL –device ‘diskname’ –option “enable_local enable_ssd”

      thanks

    14. Frank says

      Duncan,

      I have successfully added SSD capacity within VFRC, but the menu option to grant specific VMDKs access to the read cache is missing in my web client. Any ideas?

    15. Hung Vu says

      Hi there,
      I read and understand Host Swap Cache to VFlash (VFFS) replace the function swap-to-SSD of earlier ESXi-5.0 to over subcribe of Memory of ESX-Host to VMs.
      But I configure Host-Swap-Cache and make a test of over subcribe to a VM, which das it’s datastore reside on a SAN-LUN, it doesn’ work as expected.
      Says My ESX-Host has 100GB Mem.
      I create a Host-Swap-Cache 30GB.
      My VM’s config hat as following resource allocations:
      Shares: 120GB
      Reservation: 100GB (As bis as the physical Mem od ESX-Host)
      Limit: 120GB
      After powered on the VM, I see a 20GB .vswp-file on the datastore of the VM in SAN.
      Why do the over subcribed 20GB not reside in the VFFS of Host-Swap-Cache ?

      Many thanks for hind.!
      HungVu

    16. says

      Duncan,
      What would happen to the VM if the SSD where it’s read cache was stored failed? Would the VM still continue running just fine or would it fail? Would ESXi rebuild the cache on another SSD if one were available?

      • duncan@yellow-bricks says

        The VM would continue to work just fine, with performance degraded to normal disk speeds

      • Tony says

        If i have 3 SSD (eg3*450GB ) I could server up as raid5 so one failure keeps things nice and sweet. However reading the above it seems just leaving as none raided seems to be okay… If I have 3 drives in the host and one fails and there is enough space left, would the cache just be rewarmed on one of the other drives in the host? Thanks

    17. alket says

      Hey Duncan,

      What’s the heuristic for how the cache gets populated and how blocks get evicted? I am running a simple test replaying an i/o trace but not able to make sense of the numbers yet.

      Thanks
      Alket

    18. Ash says

      Duncan,

      Thank you for the info,

      This is what I am currently facing , once I allocate vFRC to a Vm(I gave about 10GB) , it started performing way too slow, Slower then without Having the vFRC, then I found the Vmware KB 2057219 which said
      “The cache had sufficient time to build. It can take quite some time for the Virtual Flash cache to build.” , So i gave it some time(Apporx 20 min ) then when I checked the performance It was considerably fast and better than what I expected.

      My question is , is there any way we can check with the Cache has completed build , is there any commands which can help in Monitor the cache build status ?

    Leave a Reply