Google Cloud Platform

Better VM Rightsizing Recommendations with the Stackdriver Agent

We launched the VM Rightsizing Recommendations beta in July of 2016 and since then many users have taken advantage of it to achieve savings or more optimal machine shapes.

rightsizing-1wxm2.PNG

Until recently, Rightsizing Recommendations were based solely on the CPU and memory statistics visible to the Compute Engine virtual machine manager. This approach works well for CPUs that can be accurately monitored, but is fairly limited for memory. There, the challenge is that the virtual machine manager has no insight into how the guest operating system manages the memory and what part is allocated for processes and caches, etc. Without understanding what exactly is happening inside a VM instance, a recommendation can’t be tailored to the real memory usage.

rightsizing-2f72q.PNG
Recommendations without visibility to how the accessed RAM is used

This is where the Stackdriver Agent comes in. When you install it on your VM instance, the Stackdriver Agent exports additional metrics to our monitoring system. These metrics allow the Rightsizing Recommendations system to accurately determine how much memory is allocated by processes vs. operating system caches and how much memory it freed up. This, in turn, allows us to calculate recommendations that more closely match the real workload.

rightsizing-3xkip.PNG
Stackdriver Agent-based recommendations with a look through to the used RAM

Is there a real benefit to the user? Absolutely! When comparing RAM recommendations made with and without the Stackdriver Agent, we see that on average the Agent-based recommendations save 50% more memory, and in some cases, even more. The agent provides better visibility, giving the Rightsizing Recommendations system more and better data to work with, which results in tangible savings to users.

If you wish to get started with Stackdriver Agent-based recommendations, just install the agent on your VMs. The additional metrics will be automatically used for Rightsizing Recommendations and you don’t even need a Stackdriver account.