On Thu, Nov 1, 2012 at 11:32 PM, Dusty Mabe <dustymabe@xxxxxxxxx> wrote: > On Thu, Nov 1, 2012 at 11:09 AM, Eric Blake <eblake@xxxxxxxxxx> wrote: >> Basically, you would create a virGroupPtr that describes the entire >> resources you are willing to allow to VMs, then ensure that all VMs are >> members of that virGroupPtr. > > Thanks for the response and some pointers to relevant design > information. If I get some free cycles to implement such a feature I > will get back to you with some more targeted design questions or maybe > even a possible implementation. I think i have a very minimal implementation of what I proposed in my original email ("reserving resources for host"). It is not quite as featureful as what you discussed with danpb (https://www.redhat.com/archives/libvir-list/2011-March/msg01546.html), but it is a small amount of work and should be worth the effort. As of right now this is specifically for qemu - Basically the idea is that right after the cgroup gets created for the qemu driver we will set memory and cpu restrictions for the group like so: from qemu_driver.c: rc = virCgroupForDriver("qemu", &qemu_driver->cgroup, privileged, 1); rc = virCgroupSetMemory(&qemu_driver->cgroup, availableMem); rc = virCgroupSetCpus(&qemu_driver->cgroup, availableCpus); The user will provide values in qemu.conf for "reservedHostMem" and "reservedHostCpus" and then availableMem and availableCpus would be calculated from that. If no values were provided in the conf then simply act as normal and don't enforce any "restrictions". We may also want to expose this "setting" in virsh so that we could change the value once up and running. Does this seem trivial to implement as I suggest? Are there any flaws with this idea? Thanks, Dusty -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list