From: Uri Lublin <uril@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qcow2 format: keep 'num_free_bytes', and show it upon 'info blockstats'
Date: Sun, 18 Jan 2009 15:15:34 +0200 [thread overview]
Message-ID: <49732B76.7060509@redhat.com> (raw)
In-Reply-To: <496F9494.9040402@codemonkey.ws>
Anthony Liguori wrote:
> Uri Lublin wrote:
>> 'num_free_bytes' is the number of non-allocated bytes below
>> highest-allocation.
>>
>> Added bookkeeping to block-qcow2.c
>> Export it using BlockDeviceInfo
>> Show it upon 'info blockstats' if BlockDeviceInfo exists
>>
>
> What is the use case for this?
With both highest_alloc and num_free_bytes, we can have a pretty good idea
about how fragmented a qcow2 image is, and upon a threshold we can:
1. Allocate more disk space (and not wait for the disk space to run out) or
2. Defragment the image (offline: "qemu-img convert", live: yet to be implemented).
Option 1 assumes one is using LVM, or have other means for disk space
allocation. This is especially important for "over subscription" of disk space,
meaning the logical size of the image is larger then the disk space allocated
for it (the physical size allocated for the image).
Currently num_free_bytes is usually pretty small (images grow a lot but not
shrink that much). I am working on a zero-cluster optimization (originally
written by Shahar Frank) which provides a way for the guest file system to
"tell" qemu when blocks are freed (by writing 0's).
An exception is savevm/delvm scenario (which seems to be broken; I'll try to
figure out what's wrong with savevm/delvm when I'll have more time available).
Thanks,
Uri.
prev parent reply other threads:[~2009-01-18 13:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-13 14:52 [Qemu-devel] [PATCH] qcow2 format: keep 'num_free_bytes', and show it upon 'info blockstats' Uri Lublin
2009-01-15 19:55 ` Anthony Liguori
2009-01-18 13:15 ` Uri Lublin [this message]
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=49732B76.7060509@redhat.com \
--to=uril@redhat.com \
--cc=anthony@codemonkey.ws \
--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).