To save or not to save



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.

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?

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.

Mostly just thinking aloud here (hence this email rather than patches
on bz)! Ideas?

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124


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