Hardware virtualization

2019-07-20 11:22发布

I have read different type of virtualization on Wikipedia but my question is that how CPU act in each case? For example what will happen to CPU during software vs hardware virtualization? I mean in software virtualization if I increase number of VMs cpu load also increases in hardware virtualization if I increase number of VMs cpu load again increases so what is the difference between these two situation?

1条回答
狗以群分
2楼-- · 2019-07-20 11:55

It's not clear what you're exactly asking but hardware supported virtualization is where the CPU has additional hardware support/instructions (eg: VT-x) to facilitate some common tasks usually seen in virtualization. This makes it quicker as compared to writing a little assembly/software program that does the equivalent job of the virtualization hardware.

So in hardware accelerated virtualization, that task is delegated to that h/w block for completion. In software only virtualization, a small software routine is run to do the same job. Usually the dedicated hardware is much faster than the software routine - which is why they were designed-in in the first place.

(post question edit)

Hardware virtualization is "hardware assisted". Traditional CPUs have hardware blocks that allow them to run commonly seen software workloads very efficiently ("We're multiplying 15% of the time? Ok, lets put a hardware multiplier in there"). Over decades of chip making and code profiling, we have a pretty good fit between the code written and the chips available. Recently virtualization has taken off and in virtualization a new workload pattern emerges that is not seen/supported by 'traditional' CPU. Chipmakers identified this pattern and added extra instructions into the hardware to accelerate such workloads. So now you have hardware assisted virtualization CPUs can do some those tasks quickly.

Despite that, realize the when you virtualize a machine, you still have to process the traditional stuff that the operating systems have been doing (usual workload) PLUS the new workload seen from hypervisors etc. So even with hardware supported virtualization, adding more VMs will consume more CPU.

查看更多
登录 后发表回答