1

Assuming one single-socket Xeon D server, 8 cores, 16 threads, two 10G SFP+ interfaces, 64 GB of RAM, two SSDs...

An application bundle that includes a nginx, MariaDB, some app logic, and maybe Redis. OS would be FreeBSD or Fedora Server.

Does it confer any benefit to spin up several redundant VMs, each containing the full bundle, vs. just running one instance of the bundle on bare metal with no virtualization?

Would you predict any difference in networking performance or throughput? Does sharing the NICs among several VMs boost capacity at all? I mean some kind of SR-IOV hardware virtualization or similar. Can a NIC handle more connections if it's virtualized?

Is it better to just have one instance of the app exploit and control the hardware directly?

(Assume same OS as host and guest in the virtualization case. I guess using KVM with Fedora.)

Thanks.

2
  • We don't know. Can you test it? What metrics are important to you? – ewwhite Jul 4 '20 at 22:06
  • According to virtualization vendors, the overall overhead is within single digits of percent. A lot of unknowns - drivers, compatibility, etc. However, I highly doubt if a virtualized environment can outperform a bare-metal deployment. Utilizing virtualization provides many additional features, performance is NOT once of them when you compare to bare-metal. – Vick Vega Jul 4 '20 at 22:24
3

This is a simple "How long is a piece of string" question. Depends on your string; we have no clue how long yours is. As @ewwhite says, do some testing. If this is an entirely theoretical/academic question, then you're asking on the wrong site.

Rule of thumb - sure, bare metal should outperform a set of VMs on the same hardware because virtualization does take some overhead, minimal as it is. And a Gigabit NIC can only move 1 Gbps, virtualization doesn't change that.

But there's plenty of implementation specifics that could mean your app won't be best that way.

If your app is single-threaded and CPU is your bottlneck (as opposed to RAM or IO), then you're not going to be able to use most of your hardware. Assuming that it can scale out instead of scale up, then just make it a bunch of VMs and have a whole bunch of single CPU VMs. (Or dual-CPU VMs maybe.)

Or there can be limitations that you can run into within a single OS (max open file handles, TCP ephemeral ports, I'm sure there are others) that would limit potential throughput, and thus spreading the load out to multiple VMs on that hardware could get you past that. That's not a performance bottleneck as such but it is a bottleneck that virtualization fixes.

There can also be management reasons that VMs are preferable. VMs can be easier to spin up and down automatically than bare metal, especially if you don't own the bare metal (hosting/cloud providers); often VMs can make more sense, even if they don't perform exactly as well as the underlying hardware theoretically could.

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.