Wednesday, May 28, 2008

Advantage and Virtual Machines

Yes, Advantage works in a virtual machine. In fact I did all my Advantage beta testing using VirtualPC. This allowed me to do tests on the latest builds while still having the latest release on my actual machine. However, just because you can do something should you? Let's examine some of the requirements for virtualization.

One of the major requirements for virtual machines is processor power. Many systems can run even the most demanding services and still only utilize 15% of the total processing power. Most applications are not designed to take advantage of multiple processor systems see Jeff Atwood's post Choosing Dual or Quad Core. Virtualization software uses these under used cores and unused CPU clock cycles to run additional machines on the same hardware. So having those nice quad core processors becomes very handy for virtualization.

Even though you may have plenty of processing power virtual machines require lots of memory. You have to have enough to run your host OS and each of the Virtual Machines. Remember, a 32bit OS can only address 4GB of ram some of which will not be available, (Ian Griffiths breaks down the details here) my system reports 3454MB. So for a system running several VMs you should consider using a 64bit OS.

Next you need to choose your software. Microsoft and VMWare are the leading companies producing virtual machine software. There are consumer solutions such as VMWare Workstation or Microsoft VirtualPC2007 both of which are free. These products work great for testing purposes and I have used both when re-creating customer issues, beta testing and keeping development environments separate.

If you are going to use virtual machines in a production environment you should move up to a server based product such as VMWare Server or Microsoft VirtualServer. These products are more robust and designed to run more efficiently and provide network services.

Assuming that you have the proper hardware performance becomes the next big question. Just how does a VM compare to a physical machine. In many cases the performance nearly equals that of a physical machine.VMWare has an excellent blog dedicated to performance. It has information, charts, graphs and links to many tests that have been conducted using their products. I could not find quite as much information about Microsoft Virtual Server although there are many postings about improving performance.

As I mentioned before I love VMs for testing purposes. It is wonderful to have a "sandbox" that you can do all kinds of experiments and simply clean it all up and start all over again. I don't generally recommend using VMs in production environments because they are just not as robust as a physical machine.

Having said that there are times when it makes sense to use them. A Web hosting company can provide "machines" for many customers which are in fact virtual machines running on shared hardware. In this case it provides a greater level of security since each customer's environment is separate making it more secure. This also saves the hosting company a lot of money on hardware while maximizing the use of the hardware they do purchase.

Virtualization has come a long way and it is quite mature, it has been available since the early 1990s. As hardware continues to get faster and cheaper it will be difficult for software to utilize the full potential of the platform. Virtualization allows for efficient use of hardware resources potentially eliminating the need for multiple servers. As with most software your results may vary and nothing is a good substitute for a good test lab to work out any kinks before you go live.

No comments: