The correct way to use virtualization

by scalingexperts

Download our Web Scaling eBook
Web Scaling vol. 1 - Small Architectures

Why virtualize?

This question has been asked and answered a million times. Most IT consultants will tell you exactly how to virtualize your environment, depending on your needs. That’s fine, but the truth is, there are actual valid reasons to do it, and they have nothing to do with your needs.

  • You’ll save money, and since saving money is important for EVERYONE, that need is not specific to you.
  • You’ll save time, once again EVERYONE needs to save time.
  • You’ll simplify your life, now seriously if you don’t get my point, just stop reading.

That leaves us with the question, why doesn’t EVERYONE virtualize?

Well to answer that, you have to be aware that virtualization only solves a specific set of problems. Technology hasn’t reached the point where it can be applied to absolutely every situation, so for the moment we have no choice but to pick and choose.

What to virtualize?

That’s a fun question to answer, because most people get it wrong, and then complain that their servers are slow, or having strange problems, or unbearably difficult to manage (what?).

In my opinion, absolutely everything CAN be virtualized, but SHOULDN’T for the sake of not waking up at 3am trying to figure out why your server didn’t actually WRITE the data to disk when it said it would.
Here’s my current list of things to virtualize:

  • Web servers
  • Caching servers
  • Load-balancers, firewalls, routers and proxys
  • Non-busy mail servers
  • DNS servers
  • All other application servers with little to no disk IO activity

Here’s my current list of things to NOT virtualize:

  • File servers
  • Database servers

You’ll notice the trend, essentially it’s related to disk IO. With virtualization, you’re sharing devices and adding another layer between your disk and your data. When data needs to be written to disk, it’s usually because it’s extremely important information. In regards to file/database servers, you just can’t afford having layers of software (sometimes buggy) between your data and the disk.

Some might say: “Don’t virtualize load-balancers or firewalls because you lose network performance”, which is a correct statement, but entirely based on peanuts. In fact, if you have network performance issues, you can easily spawn the same virtual servers on multiple physical machines, therefore potentially increasing your total network throughout beyond that of what 1 small Gigabit network adapter can do. There’s a word for that: Scalability.

Are we doomed?

No, we’re not doomed! In fact, you can go ahead and virtualize your file/database servers too, but make sure you do one thing:


That one thing will be like magic. You see with PCI Passthrough, you’re essentially giving full control of your PCI device to one of your virtual machines. If you have only 1 virtualized fileserver accessing a PCIe RAID adapter through PCI Passthrough, you’ll not only get a huge performance boost (native performance), but you’ll also have direct access to the disk as if you weren’t using virtualization at all.

The advantage now is that your environment becomes much more homogenized (which is good when you have fifty thousand servers to manage), and you can easily use the other wonderful features of virtualization, with some minor caveats (usually regarding live migrations).