I'm transitioning from Xen 3.4 to KVM on CentOS 5.5. I need to assign CPU priorities to VMs, to ensure that one VM (vmA) always receives priority over another VM (vmB).
In Xen I could assign a high credit scheduler weight to vmA, but in KVM the only thing I can think of is nicing the process associated with vmB very high.
Since this is CentOS 5.x, it doesn't appear that cgroups are available.
Is there any better way to do this?
cgroups are available in RHEL6, so I suppose centos 6 should also have it. As for the build itself, centos 5.6 is out, and 5.7 should be on the way, since RHEL5.7 is available. Why 5.3? This is especially important for kvm, because it was made supported in 5.4, and every update improved it a LOT. With 5.3, you're behind not only the majority of critical updates, but also on a build that kvm was never supported on.
And to answer your question - nice is the best option you have with the 5 branch, unless you want to backport cgroups to 2.6.18. you could also use taskset to pin the prioritised VMs to CPUs no other VM would have, but IMO that's overkill