Caching modes in QEMU
Mode | Host page cache | Guest disk write cache |
---|---|---|
none | off | on |
writethrough | on | off |
writeback | on | on |
unsafe | on | ignored |
Considerations
- device.virtio-disk0.config-wce=off (qemu) or config-wce=off (libvirt) prevents guest from setting the write cache
- Use cache=none for local RAW storage, cache=writethrough for NFS/iSCSI backed storage