[RFC]How to improve KVM VM resource assignment and per-vm process/thread scheduling.

From: Huangpeng (Peter)
Date: Thu Apr 24 2014 - 22:16:56 EST


Hi, ALL

Currently kvm hypervisor have lots of features depend on linux standard apis,
like vcpupin/mempin/processpin etc. But in the real production environment,
we need an automated resource assign and/or scheduling, is there any plan to
implement it?

resource assignment requirements like:
cpu eligible by the VMs
In case it is eligible, whether it is in use
if it is in use, whether it is dedicated to one VM, or can be shared by many VMs
In case of Shared CPU
need to configure oversubscription ratio
used ratio info

So does memory, I/O device assignment requirements.

per-vm process/thread scheduling requirements like:
On hypervisor side, VMs use vhost-net, virtio-scsi devices have qemu io-thread, vhost-net
thread, ovs thread, hNIC interrupt context(hirq/softirq), you shoud place there threads on the same
numa node to gain best performance, another important thing, you should balance these
threads' cpuload on all the numa cores to avoid unbalance between vcpu usable resources.

Thanks.

Peter Huang