CPU auto-scaling monitors the average CPU utilization of your HM-managed cluster and automatically scales up CPU resources when utilization exceeds a configured threshold. This automation prevents performance degradation and potential outages as your database resource consumption grows, without requiring manual intervention.
This automation only scales CPU up, not down. If you need to reduce CPU allocation, you must do so manually.
Warning
CPU scaling triggers a database restart. Configure a maintenance window to control when the restart occurs and avoid unexpected downtime on production clusters.
You configure automations per replica or data group using the dropdown in the Automations section. Scaling applies to all nodes within the selected replica or data group. It isn't coordinated across replicas or data groups — configure each one separately if you need the same behavior elsewhere.
CPU auto-scaling parameters
When you configure an automated operation, there are specific parameters for the CPU auto-scaling automation in addition to the general automation fields:
| Field | Description |
|---|---|
| CPU Threshold | The average CPU utilization percentage that triggers a scaling event (for example, 80). Min: 1, Max: 99. |
| Lookback Window (minutes) | The number of minutes over which HM averages CPU utilization before comparing it to the threshold (for example, 5). This smooths out short-lived spikes. Min: 1, Max: 60. |
| Scaling Method | Choose how to increase CPU resources: Scale by Quantity adds a fixed amount each time, expressed in Kubernetes CPU units, Scale by Percentage increases by a percentage of the current value. |
| Maximum CPU | The upper limit for CPU scaling. The automation never scales beyond this value — if a full increment would exceed it, it scales to the maximum instead. Once reached, no further scaling occurs. |
| Maintenance Window | The maintenance window during which the scaling operation and required database restart are allowed to run. Because CPU scaling requires a restart, leaving this empty isn't recommended for production clusters. See Maintenance windows. |
| Approval | Select Approval Required to create a pending task in Task Manager that a user must approve before it runs, or Approval Not Required to run tasks automatically without manual review. |
Once active, HM evaluates average CPU utilization at each interval using the configured lookback window. When the threshold is crossed, a task is created in Task Manager. You can monitor task status — pending, completed, or rejected — from either the cluster-level Task Manager tab or the project-level Task Manager in the left navigation.
Note
After a CPU scaling event, review your Postgres configuration to ensure it's optimized for the new resource allocation. Parameters such as max_parallel_workers, max_parallel_workers_per_gather, and max_worker_processes may need adjustment to take full advantage of additional CPU.