A couple of weeks ago I posted about SQL Server running in a VM and how disk writes were assured to happen in contradiction to a poorly written article on SQL Solutions. After working with VMware Engineering there’s now a KB article that talks about how and when I/O writes happen with different VMware products. Below is the full text of the KB article. You can also find the source here.
IO crash consistency is defined as maintaining the correct order of writes in order to allow an application to restart properly from a crash. Alternately, crash consistency posits an IO acknowledged successfully to the application is available persistently on disk before any other IOs that depend on data read/written by the original IO.
IO crash consistency for any applications running inside a guest operating system varies based on the VMware product used. VMware virtualization products include VMware ESX, which uses a bare-metal or hypervisor architecture, as well as VMware Workstation, Server and Fusion, which use a hosted architecture.
VMware ESX acknowledges a write or read to a guest operating system only after that write or read is acknowledged by the hardware controller to ESX. Applications running inside virtual machines on ESX are afforded the same crash consistency guarantees as applications running on physical machines or physical disk controllers.
For hosted products, write handling depends on the host operating system.
On Linux hosts, VMware does not use unbuffered IO, because it is not safe or supported across all the Linux versions that VMware supports. So currently, VMware hosted products on Linux hosts always use buffered IO.
On Windows hosts, VMware hosted products use unbuffered IO by default.
On Mac hosts, VMware Fusion uses buffered IO by default. Mac users can change the buffering mode through the Fusion user interface by selecting Optimize for virtual machine disk performance (buffered mode) or Optimize for Mac OS application performance (unbuffered mode). Note: Mac OS X 10.5.0 through 10.5.4 cannot successfully use unbuffered mode.
When using buffered IO, VMware hosted products do not bypass the host’s buffer cache to produce crash consistent virtual machine IO. Consequently, if the IO is buffered within the host operating system, an application running inside a guest operating system on VMware hosted products might lose crash consistency.
-
JP
-
Mike DiPetrillo
