From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49682) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbtsI-0003Xe-0b for qemu-devel@nongnu.org; Fri, 23 Nov 2012 09:05:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TbtsA-0000xT-IQ for qemu-devel@nongnu.org; Fri, 23 Nov 2012 09:04:57 -0500 Received: from mailpro.odiso.net ([89.248.209.98]:40287) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbtsA-0000nc-Ca for qemu-devel@nongnu.org; Fri, 23 Nov 2012 09:04:50 -0500 Date: Fri, 23 Nov 2012 15:03:59 +0100 (CET) From: Alexandre DERUMIER Message-ID: In-Reply-To: <24E144B8C0207547AD09C467A8259F755782F76D@lisa.maurer-it.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Qemu-devel] qcow2: slow internal snapshot creation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dietmar Maurer Cc: "Kevin Wolf (kwolf@redhat.com)" , qemu-devel@nongnu.org performance is also reduced when snapshot exist. (like if they are no preal= located metadatas) see initial git commit http://git.qemu.org/?p=3Dqemu.git;a=3Dcommit;h=3Da35e1c177debb01240243bd656= caca302410d38c "qcow2: Metadata preallocation This introduces a qemu-img create option for qcow2 which allows the metadat= a to be preallocated, i.e. clusters are reserved in the refcount table and L1/L2= tables, but no data is written to them. Metadata is quite small, so this happens in almost no time. Especially with qcow2 on virtio this helps to gain a bit of performance dur= ing the initial writes. However, as soon as create a snapshot, we're back to th= e normal slow speed, obviously. So this isn't the real fix, but kind of a che= at while we're still having trouble with qcow2 on virtio." ----- Mail original ----- De: "Dietmar Maurer" =C3=80: qemu-devel@nongnu.org Cc: "Kevin Wolf (kwolf@redhat.com)" Envoy=C3=A9: Vendredi 23 Novembre 2012 08:26:13 Objet: [Qemu-devel] qcow2: slow internal snapshot creation qcow2 snapshot on newly created files are fast: # qemu-img create -f qcow2 test.img 200G # time qemu-img snapshot -c snap1 test.img real 0m0.014s but if metadata is allocated it gets very slow: # qemu-img create -f qcow2 -o "preallocation=3Dmetadata" test.img 200G # time qemu-img snapshot -c snap1 test.img real 1m20.399s but reading the metadata is also fast: # time qemu-img check test.img real 0m0.371s So why is creating a new snapshot that slow =E2=80=93 any ideas?