Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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

share|improve this answer
    
I was wrong - its CentOS 5.5 on Rocks 5.3. The reason I'm stuck with the 5 branch is unfortunately it's not my cluster. We need the 2 VMs to explicitly share the same CPUs, so pinning won't work. I'll use nice unless I can find a backport of cgroups. –  BigChief Jul 23 '11 at 20:09
    
well, if you're stuck with 5, nice is all you have then. but I do suggest you try and keep it as much up to date as possible. That also includes the guests, especially the guest machine kernel. –  dyasny Jul 24 '11 at 3:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.