[pve-devel] cgroups implementation proposal for kvm (cpuunits support for kvm)
Alexandre DERUMIER
aderumier at odiso.com
Mon Dec 19 15:46:20 CET 2011
Hi,
I just see that cgroup in not yet implemented in proxmox , so we cannot use "CPU Units" for kvm vm.
on exemple of benefit , is true workload balancing when your cpu is at 100%.
if you have 2 vm,
1 vm with 1 core : cpu.shares = 1000
1 vm with 8 cores : cpu.shares = 1000
when cpu is at 100%, you have 50% / 50% sharing between the 2 vm. (and it's work with kvm and openvz mix)
openvz seem to use it already, i see 3 cgroup containers, mount by /etc/init.d/vz
/proc/vz/fairsched/VMID/
/proc/vz/container/VMID/
/proc/vz/beancounter/VMID/
faisched is use for cpu
beancouner is use for block io
container, for devices access persmissions i think
As we need common cgroups for kvm and openvz, here a proprosal:
1) remove automounting from /etc/init.d/vz , and add it to /etc/init.d/pvedaemon (make more sense, as we need to manage cgroups for kvm and openvz)
2)
change mounting points to cgroup "standard" path: /dev/cgroups/ (vzctl detect it automaticly)
/proc/vz/fairsched/ -> /dev/cgroups/fairsched
/proc/vz/container/ -> /dev/cgroups/container
/proc/vz/beancounter/ -> /dev/cgroups/beancounter
3) for kvm guest,at vm start
create a container /dev/cgroups/fairsched/VMID/
echo vmpid > /dev/cgroups/fairsched/VMID/tasks
echo cpuinits > /dev/cgroups/fairsched/VMID/cpu.shares
at vm stop:
delete vm container /dev/cgroups/fairsched/VMID/
what do you think about it ?
Regards,
Alexandre
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aderumier.vcf
Type: text/x-vcard
Size: 183 bytes
Desc: not available
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20111219/447626b8/attachment.vcf>
More information about the pve-devel
mailing list