When to upgrade an instance

Updated at:
Copy as MD

When a PolarDB-X 1.0 instance struggles to keep up with throughput demands, you have two options: optimize the SQL being executed, or upgrade the instance configuration. This topic explains how to read CPU and QPS metrics to confirm that SQL is already optimized and that a configuration upgrade is the correct next step.

Background

Two metrics determine whether a PolarDB-X 1.0 instance can handle your workload:

Metric What it measures Remedy
Response time (RT) Execution cost of individual SQL statements. High RT typically indicates inefficient SQL. SQL tuning
Queries per second (QPS) Throughput capacity of the instance. When QPS hits a ceiling despite optimized SQL, the instance type has reached its limit. Upgrading the configuration increases QPS capacity, which is particularly beneficial when low latency and high QPS are required for database access. Configuration upgrade

PolarDB-X 1.0 performance depends on both the compute layer and the storage layer. A bottleneck at either layer limits overall throughput. For storage-layer metrics, see Monitor storage nodes.

Identify a performance bottleneck

QPS and CPU utilization are positively correlated in PolarDB-X 1.0: as QPS approaches the instance limit, CPU climbs toward saturation. A performance bottleneck at the compute layer is indicated when either of the following conditions is true:

  • CPU utilization exceeds 90%

  • CPU utilization remains above 80% for a sustained period

Check these values on the compute-layer monitoring dashboard. For instructions, see Monitor instances.

Decide whether to upgrade

Use the following decision flow to confirm that a configuration upgrade is warranted:

  1. Tune SQL first. If response time (RT) is high, address query inefficiency through SQL tuning before considering an upgrade.

  2. Rule out a storage-layer bottleneck. Check storage-layer metrics (see Monitor storage nodes). If the storage layer is saturated, address that layer first.

  3. Upgrade the configuration. If SQL is already optimized and the storage layer is healthy but CPU utilization still meets the threshold above, the current instance type cannot support the required QPS. Upgrade the instance configuration.

Upgrade the instance configuration

Each PolarDB-X 1.0 instance type maps to a specific QPS reference value. Selecting a higher instance type raises that ceiling.

Note SQL statements that require heavy compute at the compute layer—such as temporary table sorting and aggregate computing—reduce the effective QPS below the standard reference value for a given instance type.

For upgrade steps, see Change the instance configurations.