qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre DERUMIER <aderumier@odiso.com>
To: Dietmar Maurer <dietmar@proxmox.com>
Cc: "Kevin Wolf (kwolf@redhat.com)" <kwolf@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qcow2: slow internal snapshot creation
Date: Fri, 23 Nov 2012 15:03:59 +0100 (CET)	[thread overview]
Message-ID: <abb9ca41-d531-4e98-abf6-db44528be841@mailpro> (raw)
In-Reply-To: <24E144B8C0207547AD09C467A8259F755782F76D@lisa.maurer-it.com>

performance is also reduced when snapshot exist. (like if they are no preallocated metadatas)


see initial git commit

http://git.qemu.org/?p=qemu.git;a=commit;h=a35e1c177debb01240243bd656caca302410d38c
"qcow2: Metadata preallocation

This introduces a qemu-img create option for qcow2 which allows the metadata 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 during
the initial writes. However, as soon as create a snapshot, we're back to the
normal slow speed, obviously. So this isn't the real fix, but kind of a cheat
while we're still having trouble with qcow2 on virtio."



----- Mail original -----

De: "Dietmar Maurer" <dietmar@proxmox.com>
À: qemu-devel@nongnu.org
Cc: "Kevin Wolf (kwolf@redhat.com)" <kwolf@redhat.com>
Envoyé: 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=metadata" 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 – any ideas?

  reply	other threads:[~2012-11-23 14:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-23  7:26 [Qemu-devel] qcow2: slow internal snapshot creation Dietmar Maurer
2012-11-23 14:03 ` Alexandre DERUMIER [this message]
2012-11-23 14:09   ` Kevin Wolf
2012-11-23 14:17     ` Alexandre DERUMIER
2012-11-23 14:58       ` Kevin Wolf
2012-11-23 15:53         ` Alexandre DERUMIER
2012-11-23 15:31 ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=abb9ca41-d531-4e98-abf6-db44528be841@mailpro \
    --to=aderumier@odiso.com \
    --cc=dietmar@proxmox.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).