The allocation of resources on the xen virtual machine has been a headache for the efficiency of the virtual machine for a few days. I have seen all the articles saying that the xen pv performance is good, but we found that this is not the case in actual use, after a long time, I finally found that there was still a configuration problem. With xm top, we can see that the cpu usage of dom0 is basically the sum of the cpu usage of all other virtual machines. here we can see that, the number of CPUs for dom0 should be at least half of the total number of CPUs, due to pv. many calculations of the system of the www.2cto.com Virtual Machine rely on dom0, so its cpu usage is much less than that of normal linux, the general rule is that the number of CPUs of a virtual machine can be up to 2. Another point is that the total number of CPUs cannot exceed the number of CPUs on the physical machine. Summary: 1. The number of CPUs of all VMS, including dom0, cannot be greater than the number of physical CPUs. 2. dom0 must occupy at least half of the cpu (which can be appropriately reduced when the load is low) 3. Virtual Machine resources are not more and less, but enough, which is a waste and reduces the overall system performance. author: HopingWhite