Missing Scheduled Shutdown for Non-Production Compute Engine Instances
Yulia Perlis
Service Category
Compute
Cloud Provider
GCP
Service Name
GCP Compute Engine
Inefficiency Type
Inefficient Configuration
Explanation

Development and test environments on Compute Engine are commonly provisioned and left running around the clock, even if only used during business hours. This results in wasteful spend on compute time that could be eliminated by scheduling shutdowns during idle periods. GCP enables scheduling via native tools such as Cloud Scheduler, Cloud Functions, or Terraform automation. Stopping VMs during off-hours preserves boot disks and instance metadata while halting compute billing.

Relevant Billing Model

Compute Engine instances are billed per second (minimum of one minute) based on:

  • Instance type and configuration
  • Runtime duration
  • Additional resources (e.g., persistent disks, external IPs) are billed separately
Detection
  • Identify VMs in dev/test environments using labels, folders, or project naming conventions
  • Analyze instance uptime using Cloud Monitoring or billing export data
  • Detect instances with consistent 9-to-5 usage but continuous runtime
  • Check whether startup/shutdown schedules are already in place
Remediation
  • Use Cloud Scheduler and Cloud Functions to automate VM stop/start workflows
  • Preserve instance configuration and state using persistent disks or custom images
  • Align schedules to working hours and review regularly with workload owners
  • Consider integrating automation with CI/CD tools or environment provisioning scripts