What is difference in performance between real CPU cores and vCPU in VM using KVM/QEMU? How much is vCPU slower than bare metal CPU?

And same question for RAM, I know that I can set hugepages, but I do not want, because if I set, I will lost some RAM at host even if VM is no running, so hugepages is not for me.

Thank you


On a properly setup KVM VM host, one that leaves sufficient RAM and CPU for the host to manage VMs, I've seen 95-98% vCPU compared to native.

However, if the CPUs are overallocated, then performance will suffer. I try to leave 1 CPU just for the hostOS and don't over allocate too many vCPUs to any single VM. Generally, each VM only gets 1 vCPU assigned unless there is a specific need for 2. I've never assigned more than 2 vCPUs, but we don't do geospacial DBs here either.

There is a youtube video showing GPU passthru for Windows gaming where 95% of gaming performance including FPS is shown using benchmark tools. I'm not a gamer, but many people who are interested in raw CPU performance inside a VM are.

  • and what about RAM performance? Like latency etc. – tomsk Feb 23 '17 at 21:12
  • If you don't over-commit RAM, it is a non-issue. Context switching of the vCPU is probably a bigger issue, IMHO. OTOH, I don't worry about either CPU nor RAM performance much. Disk and network I/O is 1,000x more important provided you do not over-commit. – JohnP Feb 24 '17 at 23:07

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.