Compute Engine provides idle VM recommendations to help you identify virtual machine (VM) instances that have not been used over the previous 1 to 14 days. You can use idle VM recommendations to find and stop idle VM instances to reduce wasting resources and reduce your compute bill.
Compute Engine generates recommendations automatically based on system metrics gathered by the Cloud Monitoring service. You can configure idle VM recommendations to receive more or fewer recommendations.
This page provides conceptual information on how Compute Engine generates idle VM recommendations and on the parameters you can use to configure them.
- For more information on how to identify idle VMs and take action, see View and apply idle VM recommendations.
- For more information on how to configure idle VM recommendations, see Configure idle VM recommendations.
Pricing
Idle VM recommendations are available free of charge. Using recommendations to reduce your resource usage can result in cost savings.
Limitations
For standalone VMs, idle VM recommendations are not available in following cases:
- Instances with local SSDs
- Instances with GPU/TPUs
- App Engine flex resources
- Dataflow resources
- Google Kubernetes Engine resources
How detection of idle VM instances works
Compute Engine generates recommendations about idle VM instances based on historical usage metrics. By default, the historical observation period is 14 days, or, for new VMs, starting one day after VM creation. By changing the default observation period, you can customize the recommendations that you receive.
To generate recommendations, the algorithm considers the CPU and network usage in the last observation period. If CPU and network usage are below predefined thresholds, the Recommender classifies the VM as idle.
Frequency of recommendations
After a VM is created and running for at least one day during the observation period, Compute Engine begins generating idle VM recommendations for it. New recommendations are generated once per day.
Relation with machine type sizing recommendations
Machine type sizing recommendations recommend the optimal size for a VM. You might receive a machine type recommendation to downsize an idle VM.
If you must keep an idle VM running despite its low utilization, you can use machine type recommendations to help you choose the optimal size for underutilized VMs.
Customize recommendations
Compute Engine lets you customize the recommendations you receive for your project by changing the configuration used by the recommendation algorithm. In particular, by changing the default observation period, you can receive recommendations that better fit your workloads, applications, and infrastructure needs.
To learn how to modify the configuration for your project, see Configure idle VM recommendations.
Choose the right configuration
This section describes the values that you can set for the configuration. Changing these values affects the recommendations that you receive.
The observation period
Set the observation period to modify the duration of the window used to calculate the recommendations.
You can set the observation period to a value between 1 day and 14 days, using
a string with the total number of seconds, followed by the letter s
.
- For an observation period of 1 day, use
"86400s"
. - For an observation period of 14 days, use
"1209600s"
.
By default, the observation period is 14 days.
- Use a shorter observation period if you want to receive recommendations based on short-term changes in your workload.
- Use a longer observation period if you want to receive recommendations that are not affected by short-term fluctuations in your workload.
What's next
- Learn how to view and apply idle VM recommendations.
- Learn how to configure idle VM recommendations.