This post continues from the Operationalize Your World post. Do read it first so you get the context.
The much needed ability to get visibility into Guest OS Memory is finally possible in vSphere. Part of the new features in vR Ops 6.3, you can now get Guest OS RAM metrics without using agent. So long you have vSphere 6.0 U1 or later, and the VM is running Tools 10.0.0 or later, you are set. Thanks Gavin Craig for pointing this out. The specific feature needed in Tools is called Common Agent Framework. That removes the need for multiple agents in a VM.
As a result, we can now update the guidance for RAM Right Sizing:
For Apps that manage its own RAM, use metrics from the Apps. For others, use metrics from the Guest OS. Use vR Ops Demand if you have no Guest OS visibility. Do not use vCenter Active.
Examples of applications that manage its own RAM are JVM and Database. If you use Guest OS counter, you can result in wrong sizing and make situation worse. Manny Sidhu provides a real example here. The application vendor asked for 64 GB RAM when they are only actively using 16 GB, as he shared in the vCenter screenshot below.
For apps that do not manage its own RAM, you should use Guest OS data. The table below compares 63 VMs, using a variety of Microsoft Windows. A good proportion of them are just idle, as this is a lab, not real life production.
- What conclusion do you arrive at? I’ve added a summary at the bottom of the list.
- How do you think VM Consumed vs VM Active vs Guest OS Used?
And the table below shows comparison for Linux.
What do you spot? What’s your conclusion? How does this change your capacity planning?
Here is the summary for both OS. Total sample size is 101 VMs. I’ve also added comparison. Notice something does not add up?
To help you compare further, here is a vR Ops heatmap showing all the VMs.
I created a super metric that compares Guest OS metric with VM Active. As expected, Guest OS is higher as it takes into account cache. It’s not just Used, and Windows does use RAM as cache (I think Linux does too, but not 100% sure).
The super metric is a ratio. I divide Guest OS : VM Active. I set 0 as Black, 5 as yellow, and 10 as red. Nothing is black, as VM Active is lower than Guest in all samples.
- VM Consumed is always near 100%, even on VM that are idle for days. This is expected, as its nature as a cache. Do not use it for right sizing.
- Windows memory management differs to Linux. Notice its VM Consumed is higher (94%) than Linux (82%). I guess it’s writing zero during boot creates this.
- VM Active can be too aggressive as it does not take into account cache. vR Ops adds Demand counter, which makes the number less aggressive.
- Guest OS Used + Cache is much greater than VM Active or VM Demand. It’s 69% vs 15% vs 31%
- Guest OS Used + Cache + Free does not add up to 100%. In the sample, it only adds to 83%. If you know why, email me at email@example.com
Based on the above data, I’d prefer to use Guest OS, as it takes into account cache.
Side reading, if you need more info: Refer to this for Windows 7 metrics, and this for Windows 2008 metrics. This is a simple test to understand Windows 7 memory behaviour.
You can develop a vR Ops dashboard like the one below to help you right size based on Guest OS. Notice it takes a different approach with the dashboard to right size CPU. Memory is a form of Storage, CPU is not.
The dashboard answers the following questions:
- How many large VMs do I have? What’s the total RAM among them?
- Answered by the scoreboard widget. It only shows large VM (default is >24 GB RAM) which is powered on and has Guest OS metric.
- Are the large VM utilizing the RAM given to them?
- Answered by the 2 line charts:
- Maximum Guest OS Used (%) in the group
- Average Guest OS Used (%) in the group
- In general, Guest OS Used can hit 100% as Windows/Linux takes advantage of the RAM as cache. Hence you see the peak of Used is high.
- Answered by the 2 line charts:
- Where are these large VMs located?
- Answered by the heat map.
The dashboard excludes all VMs that do not have Guest OS RAM data. Since not all VMs have Guest OS RAM data, the first step is to create a group that only contains VMs with the data. Use the example below.
You should also manually exclude app that manages its own memory.
Notice the Group Type is VM Types. Follow that exactly, including the case!
Once you created the group type and group, the next steps is to download the following:
- Super metrics. Don’t forget to enable them!
You should download the dashboard, view, super metric and the rest of Operationalize Your World package.
You can customize the dashboard. Do not be afraid to experiment with it. It does not modify any actual metric and object as dashboard is just a presentation layer.
Take for example, the scoreboard. We can add color coding to quickly tell you the amount of RAM wasted. If you have > 1 TB RAM wasted, you want it to show red.
To do that, it’s a matter of editing the scoreboard widget. I’ve added thresholds, so it changes from green to yellow when I cross 500 GB, to orange when I cross 750 GB, and to red when I cross 1 TB.
Hope that helps. If you are not getting the data, I hope this post will help you.
I’m keen to know how it helps you right sizing with confidence, now that you have in-guest visibility.