From: Eric Blake <eblake@redhat.com>
To: Gary Dale <gary@extremeground.com>, Stefan Hajnoczi <stefanha@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>, John Snow <jsnow@redhat.com>,
qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] kvm / virsh snapshot management
Date: Mon, 10 Jun 2019 19:10:47 -0500 [thread overview]
Message-ID: <0cd5c326-4d69-92fd-406d-d9fb8b08ccfc@redhat.com> (raw)
In-Reply-To: <33b31422-1198-783a-cb15-8687a3f30199@extremeground.com>
[-- Attachment #1.1: Type: text/plain, Size: 2148 bytes --]
On 6/10/19 6:00 PM, Gary Dale wrote:
>>> Any ideas on what I'm doing wrong?
>> Do you know for sure whether you have internal or external snapshots?
>> And at this point, your questions are starting to wander more into
>> libvirt territory.
>>
> Yes. I'm using internal snapshots. From your other e-mail, I gather that
> the (only) benefit to blockcommit with internal snapshots would be to
> reduce the size of the various tables recording changed blocks. Without
> a blockcommit, the L1 tables get progressively larger over time since
> they record all changes to the base file. Eventually the snapshots could
> become larger than the base image if I don't do a blockcommit.
Not quite. Blockcommit requires external images. It says to take this
image chain:
base <- active
and change it into this shorter chain:
base
by moving the cluster from active into base. There is no such thing as
blockcommit on internal snapshots, because you don't have any backing
file to push into.
With internal snapshots, the longer an L1 table is active, the more
clusters you have to change compared to what was the case before the
snapshot was created - every time you change an existing cluster, the
refcount on the old cluster decreases and the change gets written into a
new cluster with refcount 1. Yes, you can reach the point where there
are more clusters with refcount 1 associated with your current L1 table
than there are clusters with refcount > 1 that are shared with one or
more previous internal snapshots. But they are not recording a change to
the base file, rather, they are recording the current state of the file
where an internal snapshot says to not forget the old state of the file.
And yes, a qcow2 file with internal snapshots can require more disk
space than the amount of space exposed to the guest. But that's true
too with external snapshots (the sum of the space required by all images
in the chain may be larger than the space visible to the guest).
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-06-11 0:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-02 0:12 kvm / virsh snapshot management Gary Dale
2019-06-10 12:19 ` Stefan Hajnoczi
2019-06-10 15:54 ` Gary Dale
2019-06-10 21:27 ` Gary Dale
2019-06-10 22:07 ` [Qemu-devel] " Eric Blake
2019-06-10 23:00 ` Gary Dale
2019-06-11 0:10 ` Eric Blake [this message]
2019-06-11 3:47 ` Gary Dale
2019-06-10 22:04 ` Eric Blake
2019-06-10 22:47 ` Gary Dale
2019-06-10 22:54 ` Eric Blake
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=0cd5c326-4d69-92fd-406d-d9fb8b08ccfc@redhat.com \
--to=eblake@redhat.com \
--cc=gary@extremeground.com \
--cc=jsnow@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/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