4

Suppose I have a VHD residing on Disk A mounted on a Windows Server 2016.

If I turn write caching on for Disk A and the VHD, do I have double write caching?

  • If yes, is this recommended?
  • If it is not, should the write caching be done on Disk A or on the VHD?

Suppose I put this VHD then into a Storage Spaces and created a virtual disk with 5 GB writeback cache.

  • How does this write back cache interact with the write caching?
  • And again, what is the recommended way to configure this for 1) optimal reliability and 2) optimal speed?

Edit:

  • Storage spaces does not allow turning off write cache.
RJ-
  • 151
  • 5

2 Answers2

6

Virtual machine I/O isn't cached, it's very easy to check actually: run Process Manager which incapsulates old FileMon functionality and watch your .vhd(x) files access flags - should be FILE_FLAG_NO_BUFFERING raised and combined with a bunch of different "hint" flags.

https://docs.microsoft.com/en-us/sysinternals/downloads/procmon

Inside the VM you can turn disk cache either on or off - it's irrelevant, results will be pretty much the same.

https://www.starwindsoftware.com/blog/a-little-about-disk-write-cache-on-windows-vm

You'll still cache I/O at file system level inside your VM using vRAM though.

BaronSamedi1958
  • 13,676
  • 1
  • 21
  • 53
-1

VHDs use unbuffered I/O, and don't go through the Windows cache manager. The files that you store in the VHD may be cached, but the VHD itself won't be.

Furthermore, Storage Spaces isn't supported when you use a VHD, mostly because it can't determine whether the underlying data is stored redundantly.

Jake Oshins
  • 5,146
  • 18
  • 15