Rate this page del.icio.us  Digg slashdot StumbleUpon

Why Should You Care About Virtualization?

by the editorial team

This article was republished from this location.

by Rik van Riel

Virtualization is the latest hype. Why should you care? After all, computers are getting cheaper every day…

This is a fair, and often-heard question.

On the other side, there are virtualization fanatics, who run four virtual machines on their desktop and feel the same about virtualization as they felt about the color monitor or the sound card years ago - they can never go back to computing without it, but they can’t quite explain why somebody else should care about virtualization.

This article aims to describe why some people want virtualization, and why some other people absolutely need virtualization.

Consolidation

The most common use for virtualization is consolidation: combining multiple workloads on one physical computer. This allows people to run a lot of virtual machines on fewer physical computers.

But computers are cheap…

Computers may be cheap, but with enough of them, the cost adds up.

Looking at a typical data center today, it is full. There is literally no more space to add extra computers and the power and air conditioning are near their limits, as well. However, since dual-core CPUs and 1GB RAM sticks are so inexpensive, the vast majority of the servers only have 10-20% of their capacity in use.

The data center is full, but the servers are empty.

If the IT department wants to run more server workloads, do they:

  1. Build a new data center, or

  2. Use the capacity inside the existing servers?

As long as there is free space available inside a data center, adding a few computers is the easy way to go. However, once the data center is full, IT management has a hard time convincing the upper management that an entire new data center should be built.

To make matters worse, there might not even be enough electricity available nearby. It’s not as if you can just plug a 5MW data center into the power grid, and you do not want to have to train an entire new staff in another state!

Virtualization can offer a relatively easy way out. When the datacenter fills up, you can start actually filling up the servers.

Hardware isolation

Hardware is getting faster every month. However, moving a workload to a new server requires installing an OS on the new server and then configuring it to run the application. After that, you copy over the application data and hope everything still works.

Virtual machines do not have this issue, since they do not interact with real hardware. You install the host OS onto the new server, then copy over the virtual machine in its entirety. No need to reconfigure the OS that runs the applications, since that is inside a virtual machine.

Legacy operating systems

The problem gets a lot worse when dealing with an older operating system. Yes, the one that runs that critical database. With a bit of bad luck, that older OS might not boot on quad-core CPUs. Look around in any data center, and there is a critical application that’s tied to old hardware because it’s running on a legacy operating system.

Wouldn’t it be nice if you could magically run that old operating system on new hardware?

It is possible with full virtualization, such as VMware binary rewriting, or Xen or KVM with Intel VT or AMD-V capable CPUs. It works because the virtualization layer emulates simple hardware, so the octo-core CPU looks like an older 8-CPU system, only with faster CPUs. Multi-core, ACPI device discovery and interrupt routing, support for 10GigE or SATA, all are no longer a problem.

It is true that virtualization can have significant overhead. However, because the virtualization software emulates simple hardware, it may help you run legacy OSes on much faster hardware than anything the legacy OS could boot on natively. It may help with the power bill, too…

Testing

Whether you are a student doing software development, or the CIO of a major bank, there is always a shortage of test hardware.

Virtualization allows testers to create low priority virtual machines for testing. Test out the new Fedora Rawhide or Debian Unstable on a virtual machine, before it breaks your desktop. Give your developers a bunch of virtual test machines each, instead of having them wait for each other to finish using the test systems.

Maintenance

With virtual machine migration - such as VMware vmotion, or Xen live migration - it is possible to move a virtual machine from one system to another while it is running. Believe it or not, this is useful for more things than impressing your friends…

There are a number of situations in which you may want to migrate virtual machines to other physical machines:

Hardware failure. For example, if a CPU fan breaks down, the CPU throttles itself and runs at a very slow speed. Move the virtual machines onto healthy systems and fix the hardware, all without application downtime.

Load balancing. The virtual web server of one of your customers just got overwhelmed. Move away some of the virtual machines of other customers on the same host, so there is enough capacity to handle the heavier load on the one customer’s web server.

Flexible maintenance window. You would like to upgrade those CPUs during the daytime, but you cannot shut down the applications used by everybody else in the office. With live migration, move the virtual machines off each physical system before performing surgery.

Power savings

Consider a stack of machines providing a web service. They are not busy all day. At peak hours, for example, 9am to 5pm, they might be working at capacity, but at off hours, for example, 10pm to 6am, they may be working at only 10% of their capacity. IT staff could dramatically reduce power bills by migrating virtual machines around the server room so that at off-peak hours, 90% of all machines can be shut down. A 5MW machine room running at 0.5MW for even just one third of the day is a significant savings.

Security and performance isolation

Running different applications in their own virtual machines means that if one of your applications starts misbehaving, for example, eating up all memory, the other applications on the same system do not get swapped out. This one misbehaving application runs slowly (but it would anyway), while the other applications continue running as if nothing happened.

A similar effect occurs when one application gets compromised. Just that virtual machine (or part of it) is under control of the attacker. As long as the virtual machines are well isolated from each other, which is typically the case in all virtualization technologies where each virtual machine runs its own kernel, the other virtual machines are safe.

Container technologies, such as Linux VServer, Virtuozzo/OpenVZ, and Solaris Zones, typically have a lower degree of isolation, in exchange for lower overhead and more flexible resource use.

About the author

Rik van Riel is a Linux kernel developer by day and an anti-spam activist by night. For some values of “day” and “night,” Rik works as a senior software engineer at Red Hat, Inc.

Copyright (C) 2007 by Rik van Riel and others. This article is licensed under a Creative Commons Attribution-ShareAlike 2.0 License (CC BY-SA). Attribution must include a link to the original source at http://virt.kernelnewbies.org/WhyVirtualization.

Leave a reply