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

I've a 2.6GHz dual core machine with 8G memory. I want to set CPU Speed (Change to Hz i.e. 1GHz or 500MHz processors etc) for VM. I could not found it in xm and virsh commands help. Is there any way to change Hz in Xen?

share|improve this question
    
What XEN Version are you using with CentOS 6.2 and how did you accomplish that? –  Nils Apr 22 '12 at 20:45

2 Answers 2

It should work from XEN 4.x onwards with recent CPUs (e.g. AMD-Opteron-Quad-Core or newer).

For details look at the XEN-Wiki about power-management.

Naturally you can only change the Dom0 CPUs - there are no real ones in DomUs.

share|improve this answer

You can't really do that in the way you would expect. i.e. you can't just say that that VM has a 1GHz processor.

What you can do though is change the number of CPU cores assigned to the virtual machine, and the scheduling weight and cap.

You mention the use of virsh which means libvirt. I suggest you first start looking at the credit scheduler docs which details those options and then by using the schedinfo & setvcpus parameters to virsh you should be able to tweak things as you require.

EDIT: If you set the cap to around 36 it's approximately 1GHz or 35% of 1 core assuming that it's always going to be running at full speed.

share|improve this answer

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.