Virtual machine resources: Less is more!

This week a colleague called me with a VMware ESX problem. He’s doing a Exchange 2007 implementation and he configured a virtual machine which should function as the Mailbox server. He was complaining that the virtual machine took 13 to 15 minutes just to boot and he suspected a storage issue as they had been struggling with the storage for a few days.

I asked him to check the virtual machine performance tab and asked him if he saw anything strange. Nothing! The server had plenty of memory left and was not using very much CPU.

When I asked him how many resources he assigned to the virtual machine his response alerted me. He configured the virtual machine with 16GB of memory and 4 vCPUs!

When I asked him why he gave the virtual machine so much resources his response indicated that he hadn’t read the Virtual Infrastructure best practices and applied the ‘MS, I might use those resources just once during my lifecycle’ sizing. When we checked the%CPU ready performance statistics the values were astronomical.

So I explained the behavior of the CPU scheduler to him and asked him to reduce the number of vCPUs to 1 or 2 and try again. When I called him the next day he told me that the virtual machine now booted within a minute.

So bottom line: Give a virtual machine the resources it needs for normal every day operation and be very modest. Monitor the virtual machine and adjust the resource settings according to your findings. In this case, less definitely is more and it’s very easy, especially in vSphere 4, to (hot) add resources. And if you do need 4vCPUs, it can be more effective to deploy two 2vCPU virtual machines instead of one 4 vCPU virtual machine.