My Xen dom0 is a Gentoo x64 pvops. I boot my guest Gentoo, in PV mode, system with the same kernel my dom0 uses. When I emerge in the guest system, building a CPP package, I am experiencing low CPU utilization.

From the System Monitor tool on dom0, I see the CPU utilization is about 12% for both cores. But in the guest, the system is almost hung. Building a package takes forever.

  • Are you running the DomU in PV or HVM mode? What are you doing with emerge - where are your software repositories located? Why XEN - chroot seems to be a better fit in your case... – Nils May 1 '12 at 20:07
  • @Nils, I added info. in the post; I am playing around with Xen. It may not be a better fit, but I just what to know why. – David S. May 2 '12 at 2:15

You can start by setting vcpus in the guest.

vpus = <number of virtual cpu cores>

You could also consider pinning some vcpus to the guest.

vcpu-set domain-id vcpu-count

Enables the vcpu-count virtual CPUs for the domain in question. Like mem-set, this command can only allocate up to the maximum virtual CPU count configured at boot for the domain.

If the vcpu-count is smaller than the current number of active VCPUs, the highest number VCPUs will be hotplug removed. This may be important for pinning purposes.

Attempting to set the VCPUs to a number larger than the initially configured VCPU count is an error. Trying to set VCPUs to < 1 will be quietly ignored.

Some guests may need to actually bring the newly added CPU online after vcpu-set, go to SEE ALSO section for information.

vcpu-list [domain-id]

Lists VCPU information for a specific domain. If no domain is specified, VCPU information for all domains will be provided.

vcpu-pin domain-id vcpu cpus

Pins the VCPU to only run on the specific CPUs. The keyword all can be used to apply the cpus list to all VCPUs in the domain.

Normally VCPUs can float between available CPUs whenever Xen deems a different run state is appropriate. Pinning can be used to restrict this, by ensuring certain VCPUs can only run on certain physical CPUs.




Finally there has been several articles on the Xen blog recently regarding scheduling, NUMA, and cpupools http://blog.xen.org/index.php/2012/04/26/numa-and-xen-part-1-introduction/

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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