All Products
Search
Document Center

AnalyticDB for PostgreSQL:Change compute node configurations

Last Updated:Jan 03, 2024

As the data size and computing workload of AnalyticDB for PostgreSQL increase, the data processing speed may hit a bottleneck due to insufficient computing resources such as CPU, memory, disk storage, and compute nodes. In this case, you can change the compute node configurations based on your business requirements.

The following table describes how configuration changes are supported for different resource types of AnalyticDB for PostgreSQL.

Operation

Serverless mode

Elastic storage mode

Upgrade node specifications

Unsupported

Supported

Downgrade node specifications

Unsupported

Supported

Add compute nodes

Supported

Supported

Remove compute nodes

Supported

Supported

Usage notes

  • If you want to remove compute nodes from an instance in elastic storage mode, the minor version of the instance must be 6.3.10.5 or later. For information about how to view the minor version of an instance, see View the minor engine version.

  • When you add compute nodes to an instance in elastic storage mode, data reads are not affected. When you remove compute nodes, data writes may be affected.

  • When you remove compute nodes from an instance in elastic storage mode, make sure that the instance capacity after scaling is sufficient to store the original instance data.

  • For instances in Serverless mode, the change to the number of compute nodes may cause the current SQL statements to be interrupted. These SQL statements cannot be resumed even after the change.

Amount of time required to change configurations

It takes about 10 minutes to upgrade or downgrade node specifications. The amount of time that is required to add or remove compute nodes varies based on the instance resource type.

  • Elastic storage mode

    It can take from 30 minutes to dozens of hours to change the number of compute nodes. The exact amount of time depends on a variety of factors such as the number of tables, the number of partitions, the number of indexes, compression status, total data size, and instance specifications. During this period, tables may fail to be written or read. You can try again later. After the change is completed and the instance status changes to running, you can access the instance.

  • Serverless mode

    You can scale AnalyticDB for PostgreSQL instances in Serverless mode by changing the number of compute nodes within minutes without the need to migrate data. The scale speed varies based on the amount of time that is required to apply for resources and is not affected by the data size. The following scaling performance is provided for reference:

    • An instance that has 16 or fewer compute nodes can be scaled within 60 seconds.

    • An instance that has more than 16 compute nodes can be scaled within 5 minutes.

Upgrade node specifications

  1. Log on to the AnalyticDB for PostgreSQL console.
  2. In the upper-left corner of the console, select a region.
  3. Find the instance that you want to manage and choose Change Compute Node Specifications > Upgrade Node Specifications in the Actions column.

  4. On the Upgrade/Downgrade page, configure the parameters that are described in the following table.

    Parameter

    Description

    Instance Resource Type

    The resource type of the current instance is displayed and cannot be modified.

    Compute Node Specifications

    Select node specifications based on your business requirements.

    Single Node Storage Capacity

    Select a storage capacity per node based on your business requirements.

    Warning
    • Data can only be read when you change the node specifications. Perform this operation during an appropriate period of time.

    • Data reads and writes are not affected when you change the storage capacity.

  5. Read and select the Terms of Service, and then click Buy Now.

  6. Return to the Instances page and wait for the instance to change to the Running state.

Downgrade node specifications

  1. Log on to the AnalyticDB for PostgreSQL console.
  2. In the upper-left corner of the console, select a region.
  3. Find the instance that you want to manage and choose Change Compute Node Specifications > Downgrade Node Specifications in the Actions column.

  4. On the Upgrade/Downgrade page, configure the parameters that are described in the following table.

    Parameter

    Description

    Instance Resource Type

    The resource type of the current instance is displayed and cannot be modified.

    Compute Node Specifications

    Select node specifications based on your business requirements.

    Single Node Storage Capacity

    The storage capacity per node cannot be downgraded.

    Note

    This parameter is unavailable for Basic Edition instances in elastic storage mode.

    Warning
    • Data can only be read when you change the node specifications. Perform this operation during an appropriate period of time.

    • Data reads and writes are not affected when you change the storage capacity.

  5. Read and select the Terms of Service, and then click Buy Now.

  6. Return to the Instances page and wait for the instance to change to the Running state.

Add compute nodes

  1. Log on to the AnalyticDB for PostgreSQL console.
  2. In the upper-left corner of the console, select a region.
  3. Find the instance that you want to manage and choose Change Compute Node Specifications > Add Compute Node in the Actions column.

  4. In the Info dialog box, select I am aware of the impact of this operation and agree to continue it. and click OK.

    Note

    This step is available only for instances in Serverless mode.

  5. On the Upgrade/Downgrade page, select a value for the Nodes parameter based on your business requirements, read and select the Terms of Service, and then click Buy Now.

    Warning
    • For instances in elastic storage mode, tables that are in the redistributing state can only be read when you change the number of compute nodes. The amount of time that is required to redistribute data varies based on the table size. Perform this operation during an appropriate period of time.

    • For instances in Serverless mode, after you submit a request to change the number of compute nodes, the current SQL statements are interrupted. These SQL statements cannot be resumed even after the change.

  6. Return to the Instances page and wait for the instance to change to the Running state.

  7. Execute the following SQL statement to prefetch data from tables that have high performance requirements to accelerate data access:

    SELECT count(*) FROM <hot_table>;
    Note
    • Data prefetching is required only for instances in Serverless mode.

    • When you change the number of compute nodes, five steps are performed: the resources are initialized, the metadata about system tables is synchronized, the resources are locked to modify the data distribution information, the resources are unlocked and cleared, and the local cache is asynchronously restored. The hit ratio of the local cache remains low for a short period of time because the local cache is asynchronously restored. You can prefetch data to accelerate data access.

Remove compute nodes

Warning

When you remove compute nodes from an instance in elastic storage mode, make sure that the instance capacity after scaling is sufficient to store the original instance data. During the scaling period, we recommend that you do not perform update or write operations on the instance.

  1. Log on to the AnalyticDB for PostgreSQL console.
  2. In the upper-left corner of the console, select a region.
  3. Find the instance that you want to manage and choose Change Compute Node Specifications > Remove Compute Node in the Actions column.

  4. In the Info dialog box, select I am aware of the impact of this operation and agree to continue it. and click OK.

    Note

    This step is available only for instances in Serverless mode.

  5. On the Upgrade/Downgrade page, select a value for the Nodes parameter based on your business requirements, read and select the Terms of Service, and then click Buy Now.

    Warning
    • For instances in elastic storage mode, tables that are in the redistributing state can only be read when you change the number of compute nodes. The amount of time that is required to redistribute data varies based on the table size. Perform this operation during an appropriate period of time.

    • For instances in Serverless mode, after you submit a request to change the number of compute nodes, the current SQL statements are interrupted. These SQL statements cannot be resumed even after the change.

  6. Return to the Instances page and wait for the instance to change to the Running state.

  7. Execute the following SQL statement to prefetch data from tables that have high performance requirements to accelerate data access:

    SELECT count(*) FROM <hot_table>;
    Note
    • Data prefetching is required only for instances in Serverless mode.

    • When you change the number of compute nodes, five steps are performed: the resources are initialized, the metadata about system tables is synchronized, the resources are locked to modify the data distribution information, the resources are unlocked and cleared, and the local cache is asynchronously restored. The hit ratio of the local cache remains low for a short period of time because the local cache is asynchronously restored. You can prefetch data to accelerate data access.

References

Instance specifications