Configure virtual disk caching
For intensive I/O workloads, selecting the optimal caching mode can significantly increase the virtual machine (VM) performance.
About this task
The KVM hypervisor provides several virtual disk caching modes:
-
writethrough - Host page cache is used for reading only. Writes are reported as completed only when the data has been committed to the storage device. The sustained IO performance is decreased but this mode has good write guarantees.
-
writeback - Host page cache is used for both reading and writing. Writes are reported as complete when data reaches the host’s memory cache, not physical storage. This mode has faster IO performance than
writethroughbut it is possible to lose data on host failure. -
none - Host page cache is bypassed entirely. This mode relies directly on the write queue of the physical disk, so it has a predictable sustained IO performance and offers good write guarantees on a stable guest. It is also a safe cache mode for VM live migration.