All Products
Search
Document Center

PolarDB:Enable the serverless feature on a read-only column store node

Last Updated:Oct 31, 2024

This topic describes how to enable the serverless feature on a read-only column store node.

Prerequisites

A PolarDB for MySQL 8.0 Enterprise Edition cluster that contains at least one read-only column store node is created.

Implementation methods

Benefits

Effective cost reduction during business peak and off-peak hours

The serverless architecture of PolarDB can automatically downgrade the configurations of a cluster during off-peak hours and upgrade the configurations during peak hours to handle load fluctuations, which effectively reduces costs. Assume a scenario where 32 cores and 64 GB of memory are required during 12 peak hours, and 16 cores and 32 GB of memory are required during 12 off-peak hours to meet the performance requirements. Compared with the configurations of 32 cores and 64 GB of memory, the configurations of 16 cores and 32 GB of memory that use the serverless architecture reduce the costs of compute nodes by 25%.

Optimized serverless architecture

The In-Memory Column Index (IMCI) feature implemented on read-only nodes optimizes the elastic resource features of the serverless architecture, which further improves the performance and user experience.

  • Improved resource utilization: Read-only column store nodes provide a comprehensive resource management mechanism that allows you to configure multiple key system parameters such as cache, thread pool, and execution memory online. In the serverless architecture, the parameters are automatically modified when resources are scaled up or down to ensure optimal resource utilization.

  • Accelerated SQL queries: Read-only column store nodes are mainly used in analysis scenarios. To ensure that complex SQL queries run quickly, a large amount of resources are allocated to a single complex SQL query in most cases. An increase in the number of complex SQL queries can lead to resource contention. As a result, subsequent simple SQL queries in the queue are blocked by complex ones, resulting in slow SQL queries. In the serverless architecture, read-only column store nodes automatically allocate additional resources based on SQL queuing situations to alleviate the slow SQL issue caused by queuing.

    Note

    This benefit is supported in the following engine versions:

    • PolarDB for MySQL 8.0.1 whose revision version is 8.0.1.1.39 or later.

    • PolarDB for MySQL 8.0.2 whose revision version is 8.0.2.2.20 or later.

  • Fast loading of IMCIs during startup: After a cluster is restarted, several minutes are required for read-only column store nodes to rebuild the internal index information. During this period, IMCIs are unavailable. In the serverless architecture, read-only column store nodes use elastic resources to accelerate the rebuilding process and allow IMCIs to quickly become available.

    Note

    This benefit is supported in the following engine versions:

    • PolarDB for MySQL 8.0.1 whose revision version is 8.0.1.1.36 or later.

    • PolarDB for MySQL 8.0.2 whose revision version is 8.0.2.2.20 or later.

  • Accelerated log replay: IMCIs are created based on the replay of physical logs. However, the replay latency of IMCI logs may increase due to insufficient resources for creating IMCIs when the system allocates most resources for SQL queries. The replay latency may cause queries to be routed to other nodes or wait for the log replay to complete, resulting in slow SQL queries. In the serverless architecture, read-only column store nodes automatically allocate additional resources for log replay to improve log replay performance.

    Note

    This benefit is supported in PolarDB for MySQL 8.0.1 whose revision version is 8.0.1.1.45 or later.

  • Accelerated DDL processing: An extended period of time is required to process DDL statements on IMCIs. In the serverless architecture, column store nodes adaptively increase thread resources to accelerate the processing of DDL statements.

    Note

    This benefit is supported in the following engine versions:

    • PolarDB for MySQL 8.0.1 whose revision version is 8.0.1.1.44 or later.

    • PolarDB for MySQL 8.0.2 whose revision version is 8.0.2.2.25 or later.

Procedure

Specify a scaling range for a read-only column store node with defined specifications

  1. Log on to the PolarDB console.

  2. In the upper-left corner, select the region in which the cluster is deployed.

  3. Find the cluster and click its ID.

  4. In the Database Nodes section of the Basic Information page, click Enable Serverless.

  5. In the Enable Serverless dialog box, configure the Maximum Resources for Single Node and Minimum Resources for Single Node parameters. For more information, see Enable the serverless feature for a cluster with defined specifications.

  6. Click OK.

    The serverless feature is enabled on the read-only column store node with defined specifications.

    image.png

Create a serverless read-only column store node

  1. In the left-side navigation pane, click Clusters.

  2. In the upper-left corner, select the region in which the cluster is deployed.

  3. Find the cluster and click its ID.

  4. In the Database Nodes section of the Basic Information page, click Enable Serverless.

  5. In the Enable Serverless dialog box, configure the Read-only Column Store Nodes parameter and click OK. In this example, one read-only column store node is created.

    PolarDB automatically creates a read-only column store node whose resources range from 1 PolarDB Capacity Unit (PCU) to 32 PCUs.

    image.png