Linux – the performance difference of a Virtual Machine vs the Physical host

linuxperformancevirtual machinevirtualbox

Where I work we are running relatively powerful PCs using the Debian Linux Distribution. However for certain programs which we need to install it would be better to have CentOS and these would be our main work tools. Changing the OS for all of the computers in our workplace is a possibility, but we are trying to decide if using VirtualBox is a better choice for simplicity.

This all hinges on the following point. The programs we need to run are simulators which are very processor intensive tasks that can easily run up to an hour or more each time a simulation is launched. We need to decide if the performance degradation when using Virtual Box is large enough to merit our change of OS.

So my question is if anyone can verifiably tell me what is the performance hit from running a processor intensive task in virtual box versus running it on the native PC?

Thanks.

Best Answer

For number-crunching programs (very CPU-bound), there should be almost zero performance hit for the VM. The instructions run directly on the CPU, which is the same for host and VM.

Even for serious compilation tasks, the performance difference is hardly noticeable. We run CentOS VMs in VMware on Windows.

Since you're running Linux on the host, you might also consider KVM (Kernel Virtual Machine) instead of VirtualBox. It is a series of kernel modules that provides virtualization services in Linux, using the Intel VT-x virtualization extensions available on most all modern CPUs. QEMU uses KVM as an accellerator to run x86 code directly on the host CPU.

Just install the virt-manager to try it out.

Related Question