Skip to: Site menu | Main content

KVM performance “qcow2” vs “raw”, “ide” vs “virtio”

I just got a new server for private use and needed to put some virtual machines, I decided to go with KVM as it seems it will be supported longer than XEN

Of course regardless of virtualization platform the decision has to be made – how to store Virtual Disks?

KVM wiki suggests that qcow2 is fast enough, is it really?

Some benchmarks of clean install install of Ubuntu 9.10 with KVM, Virtual Disk stored in qcow2 format:

qcow2+ide

Version 1.03c       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
entropy.be       4G 38684  43 53081   9 64187  13 55412  89 360629  43  5278  12

qcow2+virtio

Version 1.03c       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
entropy.be       4G 58859  73 76112  13 74583  14 52058  91 546065  44  5725  32

raw(file)+ide

Version 1.03c       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
entropy.be       4G 74111  83 86947  15 66292  14 50945  89 347763  41  5892   7

raw(file)+virtio:

Version 1.03c       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
entropy.be       4G 74607  90 86478  16 20930   7 51069  88 658254  48  8676  64

as a comparison, native I/O on host filesystem:

Version 1.03c       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
serwer3.itcoms. 16G 75336  82 89196  14 34498   5 46891  79 99439   5 421.1   1

It seems qcow2 perfomance in block input and output is still slightly worse than raw image. Also virtio is faster than ide for qcow2.

All benchmarks were run using `bonnie++ -u root -d /home` using kernel 2.6.31-20-server #58-Ubuntu SMP Fri Mar 12 05:40:05 UTC 2010 x86_64 GNU/Linux

3 Responses to “KVM performance “qcow2” vs “raw”, “ide” vs “virtio””

  1. buy facebook apps vote Says:

    Thanks a whole lot again! Rather great post. I just discovered your weblog post and also wanted to point out that I’ve truly enjoyed reading your web site articles.

  2. software Says:

    I was suggested this blog by my cousin. I am not
    sure whether or not this post is written by
    him as nobody else understand such distinct about my problem.
    You’re wonderful! Thanks!

  3. essie5804 Says:

    Hey there. Have you any idea the steps to making a web site cellular favorable?
    I’m trying to find a motif or plugin that could possibly handle this concern. If you have any suggestions, please share.
    Speedy inquiry that’s 100 % away from theme.
    My web site looks peculiar when surfing around.

Leave a Reply