This discussion goes back to the early days of virtualization and how resources are assigned. Before, people wanted to assign virtual hardware the same way they did physical hardware, which leads to inefficient use of resources. This has become less of an issue in today’s virtual data centers, but there are still some ratios that people need to be aware of. I am going to cover some of the important things to consider around the assignment and oversubscription of CPUs and help you increase the CPU performance in your VMware environment.
As a VMware admin you will need to learn about your application environment and servers when virtualizing them. This means that if they are moving from physical to virtual you should monitor their resource usage before moving to virtual. This can be done with OS level tools or there are a number of third-party tools available to help with this.
The main theme here is to accurately identify what the application’s needs will be so that you can assign an appropriate amount of resources to the virtual server. Sometimes you will be working with app owners who are bringing in a new application, and some of these vendors request some pretty large virtual resources. This may be a result of them still thinking in terms of physical servers. You will need to negotiate to a sizing level that both parties are comfortable with.
In short, it’s better for you to start at a smaller more reasonable level and work to tune the application for best performance. It will be easier for you to scale up the resources as demand can be identified versus trying to steal resources back from the application. Most newer Operating Systems can hot add resources but cannot be removed without an outage.
The last thing you want to do is keep piling on resources to the point in which things get out of control. As you can see from the image below, nothing good will come from this method.
So you may be wondering what would happen if you handed out too many vCPUs in your environment. Well, a few things: First, there would be a negative affect on VM performance and second, there would be a reduction in the amount of VMs you might be able to fit on each host. The thing that I want to point out is if you assign too many unnecessary resources, eventually they are going to overwhelm and affect performance. This might not even be a result of high demand, but rather a side effect of poor allocation. Much like the people in the bus below found out they were soon over taken by the horde.
When it comes to manage vCPU performance in a VMware environment there are two primary items that you want to be monitoring and managing.
I have really only scratched the surface here on this subject. In a future post I’ll go further into in how to identify CPU ready issues.
(The images used in this article were used from the movie World War Z, which is an awesome movie that I recommend.)