QCOW2 image format performance

The QCOW2 format is the default QEMU/KVM image format. It has some very interesting features, as compression and encryption, but especially it enable the use of real, file-level snapshots.

But how it performs?

QCOW2 image performance

Mmm... without metadata preallocation, it performs very badly. Enable metadata preallocation, stay away from write-through cache and it perform very well.

To better compare it to the RAW format, I made a chart with the no-caching RAW and QCOW2 results:

RAW vs QCOW2 performance

While without metadata preallocation the QCOW2 format is 5X slower then RAW, with enabled metadata preallocation the two are practically tied. This prove that while RAW format is primarily influenced by caching setting, QCOW2 is much dependent on both the preallocation and caching policies.