Re: To save or not to save



On Fri, Nov 16, 2012 at 10:42:00AM +0100, Alexander Larsson wrote:
> On tor, 2012-11-15 at 19:49 +0200, Zeeshan Ali (Khattak) wrote:
> > Hi everyone,
> >    As you all know currently we save running local VMs when user quits
> > Boxes UI. The reason for doing so were:
> > 
> > 1.  We want to reclaim all the resources (especially RAM, cause CPU
> > could be saved by only pausing the VM)
> > 2. VM state should not be lost across reboots/shutdowns of host
> > 
> > However, saving of VM seems to have been a very heavy operation,
> > especially on machines with not a lot of RAM (on my machine with only
> > 4GB RAM, host more or less freezes completely for a few seconds). The
> > reason AFAICT is that most of guest RAM being unused is swapped out so
> > saving then involves copying GBs of data per running VM from one part
> > of the drive to another.
> 
> I think we very much want to save the VM when exiting. Its one of the
> core points of boxes behaviour. I.E. we have a very explicit and simple
> model wrt when VMs are running and not that everyone can understand.
> There is never any "hidden" state that may cause weird performance
> issues, etc.
> 
> Also, if you have a small amount of ram like you say above then its even
> more important that you save the VMs to free ram when you're not using
> boxes anywmore.
> 
> That said, yes, saving is heavy, and we should look into possibilities
> to make it less so.

Oh the other thing I forgot to mention, is that you can configure
libvirtd to use compression for save images, which can significantly
reduce their on disk footprint. You use more CPU time, but less disk
I/O & space. This is controlled by the #save_image_format = "raw"
parameter in qemu.conf for libvirtd. Using lzop or xz is a good
choice.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


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