"WRITE BACK" OPTION FOR HYPER-V

%3CLINGO-SUB%20id%3D%22lingo-sub-2110595%22%20slang%3D%22en-US%22%3E%22WRITE%20BACK%22%20OPTION%20FOR%20HYPER-V%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2110595%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Hyper-V%20Friends%2C%3C%2FP%3E%3CP%3Ethe%20following%20important%20fact%20will%20probably%20only%20be%20known%20to%20very%20few%20admins%20today.%3C%2FP%3E%3CP%3EIn%20all%20previously%20published%20and%20also%20the%20current%20Hyper-V%20versions%2C%20all%20write%20operations%20that%20are%20processed%20by%20the%20Hyper-V%20storage%20stack%20are%20always%20passed%20on%20to%20the%20underlying%20storage%20subsystem%20as%20WRITE-THROUGH.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20bottom%20line%20is%20that%2C%20every%20Hyper-V%20forces%20the%20underlying%20storage%20subsystem%20to%20completely%20bypass%20the%20write%20cache%20built%20into%20the%20RAID%20controller%20or%20the%20SAN.%20Even%20then%2C%20if%20the%20Write%20Cache%20is%20activated%20in%20the%20controller%20policy%20and%20is%20also%20requested%20via%20the%20application.%20This%20active%20bypassing%20of%20the%20write%20cache%20leads%20in%20most%20cases%20to%20very%20massive%20performance%20losses%20when%20writing!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIncidentally%2C%20this%20behavior%20is%20documented%20by%20Microsoft%2C%20but%20this%20information%20is%20very%20well%20hidden%20and%20not%20easy%20to%20decipher%20at%20first%20glance.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Ftroubleshoot%2Fwindows-server%2Fvirtualization%2Fhyper-v-storage-caching-layers-data-consistency-requirements%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Ftroubleshoot%2Fwindows-server%2Fvirtualization%2Fhyper-v-storage-caching-layers-data-consistency-requirements%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E2%80%9CHost%20filesystem%20cache.%20The%20Hyper-V%20storage%20stack%20also%20uses%20unbufferred%20writes%20to%20make%20sure%20that%20the%20writes%20from%20the%20guest%20bypass%20the%20underlying%20host%20filesystem%20stack.%E2%80%9D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20understand%20that%20in%20some%20systems%20%2F%20scenarios%2C%20especially%20those%20where%20critical%20data%20is%20involved%20and%20the%20write%20cache%20of%20the%20storage%20is%20for%20example%20not%20buffered%20by%20a%20battery%2C%20it%20is%20wiser%20to%20work%20with%20WRITE-THROUGH.%20Therefore%20I%20would%20respect%2C%20if%20the%20Hyperv%20works%20per%20standard%20with%20%22WRITE-THROUGH%22%2C%20but%20I%20as%20the%20admin%20would%20also%20have%20the%20possibility%20to%20change%20this%20behavior%20to%20%22WRITE-BACK%22%20or%20%22ORIGINAL%20IO%22%2C%20so%20thus%20my%20expensive%20and%20batterybuffered%20SAN%20cache%2C%20can%20be%20used%20sensibly%20for%20writing%20again.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20Regards%20from%20Germany%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlex%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2110595%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EHyper-V%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Estorage%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Contributor

Hi Hyper-V Friends,

the following important fact will probably only be known to very few admins today.

In all previously published and also the current Hyper-V versions, all write operations that are processed by the Hyper-V storage stack are always passed on to the underlying storage subsystem as WRITE-THROUGH.

 

The bottom line is that, every Hyper-V forces the underlying storage subsystem to completely bypass the write cache built into the RAID controller or the SAN. Even then, if the Write Cache is activated in the controller policy and is also requested via the application. This active bypassing of the write cache leads in most cases to very massive performance losses when writing!

 

Incidentally, this behavior is documented by Microsoft, but this information is very well hidden and not easy to decipher at first glance.

 

https://docs.microsoft.com/en-us/troubleshoot/windows-server/virtualization/hyper-v-storage-caching-...

 

“Host filesystem cache. The Hyper-V storage stack also uses unbufferred writes to make sure that the writes from the guest bypass the underlying host filesystem stack.”

 

I understand that in some systems / scenarios, especially those where critical data is involved and the write cache of the storage is for example not buffered by a battery, it is wiser to work with WRITE-THROUGH. Therefore I would respect, if the Hyperv works per standard with "WRITE-THROUGH", but I as the admin would also have the possibility to change this behavior to "WRITE-BACK" or "ORIGINAL IO", so thus my expensive and batterybuffered SAN cache, can be used sensibly for writing again.

 

Best Regards from Germany

 

Alex

0 Replies