[Discuss] virtualization overhead
blu
blu at nedharvey.com
Mon Aug 6 22:03:54 EDT 2012
> From: discuss-bounces+blu=nedharvey.com at blu.org [mailto:discuss-
> bounces+blu=nedharvey.com at blu.org] On Behalf Of Rich Braun
>
> As for how it could be possible: CPU performance far exceeds that of any
> current I/O. So emulation overhead drops way below the roughly 3% CPU
> overhead that I recall measuring. Throw a big RAM cache underneath your
> VM, and you can get blazing fast numbers.
It all depends. As you allude here, your host OS may cache the guest HDD, even when the guest is rebooting with cold cache it may be greatly accelerated... And also, the host OS can swap out guest memory that might be "hard wired" in the guest... So if some "hard wired" pages become very cold, the host may swap them out to make more room for caching/buffering. So there's another opportunity where VM may be faster than physical.
In some cases, you might host your guest storage on ZFS, and you might have a lot of sync-mode IO work, which is necessarily sync-mode because of the guest filesystem. But you stick all this IO into a ZFS pool with tiered storage (I'm misusing that term, referring to dedicated cache & log devices) or completely disable ZIL, and you're able to accelerate the IO beyond what it would have been if physical, *because* the host OS filesystem is more powerful and more performant than the guest filesystem.
There's always *some* cpu overhead. So CPU cycles will never be quite as fast on the guest as they would be physical. But in everything I've seen for the last 8 years, the difference is never more than 1%, so the difference is negligible for all situations that I'm aware of. I'm mostly benchmarking EDA tools, matlab, cadence, synopsys, java, etc.
I often notice 3D graphics acceleration is better physical. But not always.
My personal assessment would be: In almost all cases, the performance difference between physical and virtual is negligible. But when the difference exists, sometimes the virtual is faster and sometimes the virtual is slower. It depends on what you're doing and how you're doing it. The bias leans toward... Usually there's no difference, and if there is a difference, probably the VM is a little slower.
More information about the Discuss
mailing list