qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/3] FVD: Added support for 'qemu-img update'


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 1/3] FVD: Added support for 'qemu-img update'
Date: Fri, 28 Jan 2011 16:16:03 +0000

On Fri, Jan 28, 2011 at 2:51 PM, Chunqiang Tang <address@hidden> wrote:
>> On Fri, Jan 21, 2011 at 05:19:13PM -0500, Chunqiang Tang wrote:
>> > This patch adds the 'update' command to qemu-img. FVD stores various
>> > image-specific configurable parameters in the image header. A user can
> use
>> > 'qemu-img update' to modify those parameters and accordingly controls
> FVD's
>> > runtime behavior. This command may also be leveraged by other block
> device
>> > drivers, e.g., to set the size of the in-memory metadata cache.
> Currently
>> > those parameters are hard-coded in a one-size-fit-all manner.
>>
>> There's a high risk that users will try this command while the VM is
>> running.  A safe-guard is needed here in order to avoid corrupting the
>> image.
>
> Good observation and this should be added. In FVD, once an image is open,
> a dirty bit is set in the image header. qemu-img update can refuse to work
> or ask for confirmation if it sees the dirty bit.
>
>> Please use qemu-option.h instead of int argc, char **argv just like
>> qemu-img create -o does.
>
> Will do.
>
>> Finally, is this interface really necessary?  As a developer it can be
>> useful to tweak image values (in QED I actually have a free-standing
>> tool that can query and manipulate image internals).  But should users
>> need to micromanage every image file in order to achieve desired
>> functionality/performance?  What's the real need here?
>
> Default values of the image parameters may be suitable for most users, but
> there are cases where more control is needed, not only for performance
> tuning but also for functional control. This is especially true for
> copy-on-read and prefetching, and when many VMs are created based on the
> same image template (like that in a Cloud or the publicly shared VMware
> appliance http://www.vmware.com/appliances/). For example, the image
> template may turn on copy-on-read and prefetching, but a user wants to set
> it off. Even for prefetching, there are parameters that control when to
> start prefetching and how much bandwidth prefetching can use (as
> prefetching has to be conservative). This can be different in different
> environments, e.g., 100MB vs 10GB Ethernet, SAN disk array  vs. a local
> disk. Without control, users share the same image template may often find
> it hard to use.

It should be possible to change prefetching and copy-on-read while the
VM is running.  For example, having to shut down a VM in order to
pause the prefetching is not workable.  In the QED image streaming
tree there are monitor commands for this:

http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/stream-command

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]