gcloud spanner instances adds total CPU based autoscaling flags
Introduced 2026-01-06 · score 0.95
HOW TO USE IT
When configuring managed autoscaling for a Spanner instance, set `--autoscaling-total-cpu-target` with the required autoscaling limits and storage target. Use `gcloud spanner instances create` to create an instance or `gcloud spanner instances update` to configure an existing one.
gcloud spanner instances create <instance-id> --config=<instance-config> --description=<description> --autoscaling-min-nodes=<min-nodes> --autoscaling-max-nodes=<max-nodes> --autoscaling-total-cpu-target=<total-cpu-percent> --autoscaling-storage-target=<storage-percent>gcloud spanner instances update <instance-id> --autoscaling-min-nodes=<min-nodes> --autoscaling-max-nodes=<max-nodes> --autoscaling-total-cpu-target=<total-cpu-percent> --autoscaling-storage-target=<storage-percent>WHY THIS HELPS
Configure total CPU based autoscaling for Spanner instances.
REQUIREMENTS AND LIMITATIONS
- Availability: beta and GA
- INSTANCE (required): Cloud Spanner instance ID.
- --config (required): Instance configuration; defines geographic placement and replication.
- --description (required): Instance description.
- --autoscaling-total-cpu-target (required): Target percentage of total CPU the autoscaled instance can utilize. At least one CPU target must be specified; the documented target range is 10–90%.
- --autoscaling-storage-target (required): Target percentage of storage for the autoscaled instance; required when other autoscaling arguments are specified.
- --autoscaling-min-nodes (required): Minimum node count for autoscaling. Specify this and max nodes, or use the processing-unit limits instead; the two limit units are mutually exclusive.
- --autoscaling-max-nodes (required): Maximum node count for autoscaling. Specify this and min nodes, or use the processing-unit limits instead; the two limit units are mutually exclusive.
- --autoscaling-min-processing-units (required): Minimum processing units for autoscaling. Use with max processing units instead of node limits; the two limit units are mutually exclusive.
- --autoscaling-max-processing-units (required): Maximum processing units for autoscaling. Use with min processing units instead of node limits; the two limit units are mutually exclusive.
- --autoscaling-high-priority-cpu-target: Target percentage of high-priority CPU; may be specified alongside the total CPU target.
- --asymmetric-autoscaling-option.location (required): Location of the read-only region to scale asymmetrically; required when using this option.
- --asymmetric-autoscaling-option.min_nodes: Minimum nodes for asymmetric autoscaling; otherwise inherited from the base instance configuration.
- --asymmetric-autoscaling-option.max_nodes: Maximum nodes for asymmetric autoscaling; otherwise inherited from the base instance configuration.
- --asymmetric-autoscaling-option.min_processing_units: Minimum processing units for asymmetric autoscaling.
- --asymmetric-autoscaling-option.max_processing_units: Maximum processing units for asymmetric autoscaling.
- --asymmetric-autoscaling-option.total_cpu_target: Total CPU target for asymmetric autoscaling; documented range is 10–90%.
- --asymmetric-autoscaling-option.high_priority_cpu_target: High-priority CPU target for asymmetric autoscaling.
- --asymmetric-autoscaling-option.disable_total_cpu_autoscaling: Set TRUE to disable total CPU autoscaling for the replica; cannot disable both total CPU and high-priority CPU autoscaling on the same replica.
- --asymmetric-autoscaling-option.disable_high_priority_cpu_autoscaling: Set TRUE to disable high-priority CPU autoscaling for the replica; cannot disable both total CPU and high-priority CPU autoscaling on the same replica.
- Prerequisite: The managed autoscaler create examples are for Enterprise and Enterprise Plus edition instances.
- Prerequisite: For creation, provide `--config` and `--description`; managed autoscaling requires storage target, limits in nodes or processing units, and at least one CPU target.
FIRST-PARTY EVIDENCE
- https://docs.cloud.google.com/sdk/docs/release-notes#55100_2026-01-06
- https://docs.cloud.google.com/sdk/gcloud/reference/spanner/instances/create
- https://docs.cloud.google.com/sdk/gcloud/reference/spanner/instances/update
- https://docs.cloud.google.com/spanner/docs/create-manage-instances
Check the installed version and the source before using it. Entry JSON