From the course: Learning Virtualization

Using virtualization for more efficient utilization of hardware

From the course: Learning Virtualization

Using virtualization for more efficient utilization of hardware

- [Instructor] In this section, I'd like to talk about one of the advantages of virtualization, and that's the efficient utilization of hardware. Simply put, virtualization should allow us to use the resources we need; no more, no less. This will hopefully help us avoid the situation where a server is significantly underpowered or overpowered. Almost all of the hypervisor tools currently available on the market will allow us to easily resize a virtual machine manually. So this would be a manual process performed by an administrator where we increase or decrease the number of processors, the amount of RAM or the number or size of hard drives. Some of the more advanced hypervisors on the market will do some of this for you automatically. So the hypervisor will continuously monitor a virtual machine. When that virtual machine begins to get short on a certain resource, the hypervisor will provide additional resources. And also if a virtual machine has an excessive amount of resources, the hypervisor can adjust the resources to the proper level. Some examples of times when you might want to increase or decrease the amount of resources available to a virtual machine. And one happens with the initial sizing of a server. So when we first determined that we have a need for a new server, whether it be a virtual server or a physical server, we'll need to make some estimates of how much RAM, processor and disk this server needs. Sometimes we aren't 100% accurate with these estimates. And once we build and start running the server, we find that we actually need significantly more or significantly less of a certain resource. If you had built out a physical server, at this point it can be fairly difficult to change the amount of resources. Adding new resources would be an additional cost. Removing resources can also be difficult. It's unlikely we would be able to recover the money we spent on the resource in the first place. However, with a virtual machine, it's fairly easy to add and remove resources, and therefore the initial sizing of a server isn't quite as important. It's no longer vital that we get this exactly right the first time. We now have a margin of error where we can go back and change things after the initial sizing. There are also some business cases where you will have a temporary change in the need for resources. So for example, if you are an e-commerce site doing a lot of sales online, you probably have a certain workload during most of the year, and then a significant increase in workload around the Christmas buying season in late November and December. You may need to handle five or 10 times more traffic than you normally do. And obviously that's going to require more resources in your server. Again, with a physical server, it might be extremely difficult to increase the number of processors or RAM significantly. But with a virtual machine, it can be quite easy. When we resize a virtual machine, this will have some impact to the guest operating system. Some older operating systems have trouble with increasing or decreasing the amount of memory or processor. In particular, processor was a problem in some of the legacy versions of Windows. So for example, Windows XP and Windows 2003 would have problems if you went from a single processor to multiple processors. If you already had multiple processors, you actually could change the number. You could go from two to four or vice versa. But going from single to multiple, or going from multiple to single would cause problems. This is actually no longer a problem in modern operating systems. So everything from Windows Vista on and from Windows Server 2008 on will handle these changes quite well. We can change the amount of processor or the amount of RAM without a significant impact on the operating system. Other than all operating systems have some maximum, there is some maximum number of processors and some maximum number of RAM. So before you go crazy adding a ton of resources, you'll want to check the documentation of the guest operating system and see what is the maximum it can handle.

Contents