Re: To save or not to save



On Thu, Nov 15, 2012 at 07:49:46PM +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.

Have you tried making Boxes use the

  VIR_DOMAIN_SAVE_BYPASS_CACHE

flag yet ? oVirt saw serious problems with host performance when
saving VMs to disk, unless they used VIR_DOMAIN_SAVE_BYPASS_CACHE
to avoid trashing the I/O cache.

> So I've been wondering if its worth it to save the VMs on quit. So
> lets look at both the reasons above:
> 
> 1. For hosts with a lot of RAM, where most of the guest RAM will not
> be swapped out, is there a compelling reason to save RAM as they have
> plenty to spare? For hosts with not a lot of RAM, saving mostly just
> means saving swap at the cost of home partition (or somewhere else in
> filesystem).
> 
> 2. Alex already fixed that on libvirt level I believe?

Fixed what in libvirt ?

> So I'm not sure if saving all running VMs at quit is a great idea
> anymore. One thing we could do is to compare the memory usage of all
> the guests with memory size of host and make the decision to save or
> not to save based on that.

I'd like to see more concrete data & research on what we can do to
improve save-to-disk before abandoning it.


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]