When using virtualization products like VMWare vSphere (ES) or Microsoft Hyper-V you can always run into issues – be it from a management/administration perspective or from a performance perspective. It can help a lot to put certain procedures and best practices into place early on to assure that your environment is stable and runs at the highest performance level possible.
Here are a few of those items where it pays to be pro-active and to follow certain virtualization best practices:
Snapshot management is critical. Have one point of contact for snapshots. Use meaningful names when doing snapshots. Do not hand snapshot capabilities to end users. I would stay away from offering snapshots easily. Keep it as a “secret” and offer it on a case by case basis. Set an end date for snapshots and follow through deleting them. Snapshot files grow and in a worst case scenario could fill up a LUN taking down anything that is connected to that LUN with it.
Thin provisioning makes it difficult to project when VMs and shared data stores will run out of space. Over-committing of shared physical storage can cause catastrophic cascading VM outages. If you use thin provisioning you need to increase your monitoring and resource management.
Poor physical storage balancing can cause disk hot spots and i/o bottlenecks. If VMs are not spread out across multiple disks/LUNs you can run into i/o issues with read/write operations queuing up. As a result your performance will decrease dramatically. If you can – mix busy and less busy VMs on LUNs. Do not have a LUN that only hosts very busy VMs. Increase performance by adding spindles if you can.
Storage Naming Standards
Be descriptive with your storage. Always try to be as descriptive as possible so that you can tell by the name of a LUN on which storage array it is hosted and what kind of disk you have underneath. Rename local storage on the ESX to something that makes clear not to use it and reduce VMs being hosted on non-shared storage.
Reduce the number of CPUs assigned to VMs for better performance. In general most VMs are over-subscribed with CPU resources. Having too much unused CPU power assigned to VMs can decrease your overall performance. The ESX host/vCenter has to do more work calculating resources and this can actually reduce the performance in your environment. When doing a P2V make sure to cut down the number of CPUs on a VM. Do not let it go into production with 4 or 8 CPUs assigned. It is easier to add CPU later on than to take it away.
Memory (incl. Hyper-V)
Keep a close eye on memory allotments for VMs – especially on Hyper-V. VMWare currently has better technology to manage memory over-subscription. Hyper-V will get this in Q1/2011. However, as a best practice monitor VMs to see how much memory they really use and adjust down. Step away from round numbers and don’t be afraid to work with numbers like 1.76 GB for memory assignments. Again, it is easier to add memory later than to take it away. Owners are more motivated to give you 10 minutes downtime when adding memory and are less motivated to give you downtime for a VM that is running fine and you wanting to take away resources.
The memory rules might not necessarily apply to you within a web hosting environment, but it is definitely good to know about and use it where you can.