All Products
Search
Document Center

AnalyticDB:High-performance Edition

Last Updated:Apr 11, 2024

AnalyticDB for PostgreSQL High-performance Edition uses a single-replica architecture to help reduce the costs of storage and entry-level instances, and provides high I/O performance.

Note

AnalyticDB for PostgreSQL High-performance Edition instances are suitable for most business analysis scenarios. To meet your core business requirements, we recommend that you use High-availability Edition.

Architecture

The coordinator nodes and compute nodes of AnalyticDB for PostgreSQL High-performance Edition instances are deployed in a single-replica architecture, as shown in the following figure.

Figure 1. High-performance Edition architecture基础版架构图

Compared with the High-availability Edition architecture, the High-performance Edition architecture does not contain the standby coordinator node or secondary compute nodes.

Figure 2. High-availability Edition architecture高可用版架构图

The High-performance Edition architecture provides the following benefits:

  • The storage usage of the standby coordinator node is eliminated.

  • The storage usage of compute nodes is reduced by 50%.

  • The data synchronization process between the primary and secondary compute nodes is eliminated, which improves the I/O performance when data is written.

Billing rules

For information about billing rules, see AnalyticDB for PostgreSQL pricing.

Advantages

Cost reduction

Compared with a High-availability Edition instance, a High-performance Edition instance that uses the same specifications provides the following advantages:

  • The storage cost is reduced by 50% because the instance has only one replica.

  • Compute nodes cost less but provide the same computing capabilities.

    Specifications

    Storage price (USD per month)

    Compute node price (USD per month)

    Total price (USD per month)

    High-performance Edition

    High-availability Edition

    Reduced by

    High-performance Edition

    High-availability Edition

    Reduced by

    High-performance Edition

    High-availability Edition

    Reduced by

    Entry-level specifications

    22.4

    100

    77.6%

    175.55

    352.05

    50.13%

    197.95

    452.05

    56.21%

    Common specifications

    89.6

    200

    55.2%

    668.65

    700.28

    4.52%

    758.25

    900.28

    15.78%

    • The entry-level specifications are the lowest specifications. The entry-level specifications of a High-performance Edition instance are 2 CPU cores, 50 GB of storage, and 2 compute nodes. The entry-level specifications of a High-availability Edition instance are 2 CPU cores, 50 GB of storage, and 4 compute nodes. For entry-level specifications, the price of a High-performance Edition instance is 56% lower than the price of a High-availability Edition instance.

    • In common usage scenarios, an AnalyticDB for PostgreSQL instance uses 4 CPU cores, 100 GB of storage, and 4 compute nodes for High-performance Edition and High-availability Edition. The price of a High-performance Edition instance is 15% lower than the price of a High-availability Edition that uses the same specifications.

Performance improvement

High-performance Edition provides higher I/O performance than High-availability Edition. A High-performance Edition instance that uses 2 CPU cores provides up to 250% of the I/O performance of a High-availability Edition instance that uses the same specifications. The data synchronization and streaming replication processes are eliminated in High-performance Edition. This improves I/O performance in write-intensive scenarios by approximately 100%.

The following section provides examples of the advantages of High-performance Edition over High-availability Edition based on performance in local replication and TPC-H benchmark test scenarios. An instance of each edition is used, and each instance uses 2 CPU cores, 400 GB of storage, and 4 compute nodes.

  • Local replication

    A row-oriented table that contains approximately 90 GB of data is replicated in the instance. Sample statement:

    CREATE TABLE lineitem2 AS (SELECT * FROM lineitem);

    Execution duration:

    • High-performance Edition: 249 seconds.

    • High-availability Edition: 1,307 seconds.

    The test result indicates that the performance of High-performance Edition is approximately five times the performance of High-availability Edition in CREATE TABLE AS SELECT and INSERT INTO SELECT operations.

  • TPC-H testing

    Note

    In this example, a test based on the TPC-H benchmark test is performed, but the test does not meet all requirements of the TPC-H benchmark test. As a result, the test results cannot be compared with the published results of the TPC-H benchmark test.

    In the test, 22 SQL statements are executed on a TPC-H benchmark test dataset that contains 100 GB of data. The following figure shows the results.

    基础版TPC-H测试

    The amount of time that is required by the High-performance Edition instance to complete an operation is 40% less than the amount of time that is required by the High-availability instance. This indicates an improvement in I/O performance.

Availability

Data reliability

AnalyticDB for PostgreSQL uses enhanced SSDs (ESSDs) to store data. This provides high data reliability even in single-replica mode and ensures data integrity when faults occur on compute nodes.

High availability

AnalyticDB for PostgreSQL High-performance Edition provides lower availability because it uses only one replica. This increases the amount of time that is required to recover instances to no more than 8 hours in extreme scenarios, such as physical machine failures. High-performance Edition uses the multi-replica feature of ESSDs to ensure data reliability, and optimizes the checkpoint mechanism of PostgreSQL to reduce recovery time for AnalyticDB for PostgreSQL instances.

The following section compares the availability of AnalyticDB for PostgreSQL High-performance Edition and High-availability Edition instances in common failure scenarios:

  • Failures that trigger the recovery mode

    In most failure scenarios in AnalyticDB for PostgreSQL, the recovery mode is triggered. This kind of failure scenario is far more than compute node failures and host failures. The recovery process for High-performance Edition requires a significantly shorter period of time than the recovery process for High-availability Edition.

    In most cases, SQL crashes are caused by core dumps or out-of-memory (OOM) errors. In this case, the AnalyticDB for PostgreSQL instance enters the recovery mode. In recovery mode, the system clears the remaining locks and memory and replays the Write Ahead Log (WAL) files to ensure data integrity. Service provision for the instance stops during the recovery process and resumes after the instance is recovered. A High-availability Edition instance may require 5 minutes to 10 minutes to be recovered. A High-performance Edition instance can be recovered in 10 seconds by using the optimized checkpoint mechanism.

    • WAL

      In AnalyticDB for PostgreSQL, all data changes of a transaction are recorded in WAL files before the transaction is committed. When a database restores data, WAL files can be replayed to restore the data changes that are committed but not written to disks.

    • CheckPoint

      A checkpoint is the point in a transaction before which all data changes are made on disks. The database can restore data based on the most recent checkpoint. AnalyticDB for PostgreSQL performs checkpoints on a regular basis. When the size of a WAL file reaches a specific threshold, the system also performs checkpoints.

  • Compute node failures

    High-performance Edition instances provide lower availability when a compute node fails. When faults occur on a compute node of a High-availability Edition instance, a replica can be used to perform a failover to ensure service availability. The faulty compute node becomes the secondary compute node and restarts in the backend. When faults occur on a compute node of a High-performance Edition instance, the instance becomes unavailable because no replicas are available, and the instance must be restarted for recovery.

  • Host failures

    Host failure is a serious issue and triggers the automatic migration of the host. In the preceding scenario, the replica of a High-availability Edition instance can be used to perform a failover and ensure that the instance runs as expected. The host migration is performed in the backend. A High-performance Edition instance must be restarted after the host migration is complete. The process requires approximately 15 minutes.

References

FAQ

Q: How do I upgrade an AnalyticDB for PostgreSQL instance from High-performance Edition to High-availability Edition?

A: You cannot directly upgrade an AnalyticDB for PostgreSQL instance from High-performance Edition to High-availability Edition. We recommend that you back up the data of a High-performance Edition instance, purchase a High-availability Edition instance, and then migrate the data to the High-availability Edition instance. For information about how to migrate data, see Migrate data between AnalyticDB for PostgreSQL instances.