Matching your investment in computing resources with your engineering and business needs is a constant evolution. As you gather and monitor usage data, you can make iterative adjustments to improve the efficiency of your infrastructure.
For example, one way to optimize your resources in Google Cloud is by looking for GCP instances that are operating at a low usage rate.
Low CPU usage can be an indicator that you have an opportunity to better size your instance and lower your cloud costs. In this guide, we’ll walk you through the steps to find these low usage instances and make adjustments.
Defining Low CPU Usage
First, CPU usage, or utilization, refers to the computing resources used by a given utility or machine over a period of time. For example, AWS defines low usage to be less than 40% maximum CPU and memory usage over the last four-weeks.
For GCP, there isn’t a universally recommended level, but it’s worth considering any instances whose average CPU utilization is below 35%, and especially if it is below 20%. For the purposes of optimizing your resource allocation, it’s most important to select a benchmark and monitor it consistently.
Locating GCP Instances with Low CPU Usage
In a GCP ecosystem, resizing GCP instances is not only a matter of site reliability engineering but also a business priority. Querying, or identifying, your GCP compute instances with low CPU utilization is a performance management task that should be informed also by your organization's unique engineering and business considerations.
Understanding how your CPU performs across different VM deployments starts with performance monitoring and management. To do this, you need to:
- Go to the VM Instances page.
- Select the VMs you want to view performance metrics for. This should open the VM instance Details page.
- Click the Observability tab to open the Observability Overview page.
- On the Overview page, you'll find "CPU Utilization," where you can see the percent of CPU used by the selected VMs.
Resizing Low Usage GCP Instances
Once you've identified which VMs are under-utilized, over-utilized, or used optimally according to your actual needs, you should resize underutilized VMs.
One of the most convenient and cost-effective ways is to change the machine type, but you can only do this for a stopped VM (in TERMINATED state). That means that you should consider which VMs — and therefore which resources — are a priority for your immediate, short-term, and long-term needs and plans.
To change GCP instances, you need to:
- Go to the VM Instances page.
- Under the Name column, select the name of the VM or VMs you want to resize by changing their type.
- From the VM instance details page, continue as follows:
- If running, click Stop to stop the selected VM(s).
- To edit the VM, click edit Edit.
- In the Machine configuration section, select the desired machine type or create a custom machine type.
- Click Save to save all changes.
Monitoring Low Usage VMs Automatically with Blink
Resizing GCP instances is not a one-time job, but a process that evolves in response to your changing engineering and business considerations.
By adopting a CloudOps automation platform, you can ensure that CPU performance monitoring and cost management is not a single task but a seamless operation performed regularly.
Blink is a no-code/low-code platform that makes it easy to automate checks like this and make optimizations across your cloud stack.
Get started and create your free Blink account today.