[pve-devel] cgroups implementation proposal for kvm (cpuunits support for kvm)

Dietmar Maurer dietmar at proxmox.com
Mon Dec 19 18:11:18 CET 2011


> 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

I am not even sure if we need to control cpu.shares - users expext 1 CPU if they assign 1CPU?

AFAIK blkio cgroup is the wrong way to limit IO for kvm, because it does not really work on (network) file systems. The plan is to do rate control inside kvm:

http://wiki.qemu.org/Features/DiskIOLimits

http://git.kernel.org/?p=virt/kvm/qemu-kvm.git;a=commit;h=0563e191516289c9d2f282a8c50f2eecef2fa773

I had no time to test that so far.

- Dietmar




More information about the pve-devel mailing list