I have one physical machine which has 4 CPUs. I want to have some VM on it. The goal of my work is finding CPU utilization. But I am confused how the CPU usage of VMs and physical machine are related. Is there a relation between CPU utilization of VMs and physical machine? How should I measure the CPU utilization of each VM? What is the CPU utilization of the physical machine?
Asked
Active
Viewed 2,702 times
0
-
what is your virtualization solution? VMWare? VirtualBox? – spacediver Jul 19 '12 at 21:32
-
do your CPU and virtualization solution support hardware virtualization (VT-X/AMD-V)? – spacediver Jul 19 '12 at 21:33
-
what is the purpose of your measurements? what are you going to optimize? – spacediver Jul 19 '12 at 21:34
-
1your single 4-core CPU (I doubt you have 4-head SMP motherboard) may be consumed by VMs differently. You could give each VM only one core, or give some VM more than 1 core. Usually this is configured at the VM settings. – spacediver Jul 19 '12 at 21:35
-
@spacediver:I did not know that it depend to virtualization solutions like VMWare or VirtualBox... Yes it supports The purpose is reducing energy usage – Sara Jul 19 '12 at 21:38
-
1If you run your application in the virtual machine, it would definitely consume more resources than if you run it on the host machine as is. Every virtualization solution has its own overhead expense. If your CPU is not capable of executing guest code efficiently (google for hardware virtualization support), this would increase overall host CPU usage at tens of %, due to additional instruction processing. – spacediver Jul 19 '12 at 21:49
-
basically, virtualization improves maintainability and isolation of pieces, at the price of performance. Efficient solutions could require little amount of overhead. If the CPU efficiency is your goal, you'll consider carefully your options not to resort to virtualization :) – spacediver Jul 19 '12 at 21:51
1 Answers
0
If you are using any xen enabled hypervisor, you can use xenmon or xentop in your Dom0(physical machine) to check the utilization or performance of your VMs.
You can do so by typing xentop(it is /usr/sbin/xentop in my case) on the command line which will give you all the info you are looking for. Alternatively you can use xenmon -l command (/usr/sbin/xenmon.py python script) in my case which shows all the live information about your VMs.

BIBS
- 394
- 3
- 11