This topic describes how to enable the High-Compression Engine (X-Engine), and the required conditions and related precautions.
Prerequisites
-
Kernel version must meet the following conditions:
-
8.0.1.1.31 or later.
-
8.0.2.2.12 or later.
To check your cluster version, see Query the kernel version.
-
-
Multi-master Cluster (Limitless) does not support the High-Compression Engine (X-Engine).
-
The cluster's primary node must have at least 8 GB of memory, and each read-only node must have specifications equal to or greater than those of the primary node.
-
The cluster is not part of a global database network (GDN).
Usage notes
-
The high-compression engine (X-Engine) has limitations related to its engine and large transaction functionality.
-
Enabling the High-Compression Engine (X-Engine) automatically restarts the cluster. The restart process causes a connection interruption that lasts for up to 30 seconds. We recommend that you perform this operation during off-peak hours and ensure that your application has a reconnection mechanism.
-
After you enable X-Engine:
-
To prevent access exceptions for tables stored in the high-compression engine (X-Engine), you cannot disable this feature.
-
The cluster cannot join a GDN.
-
Procedure
You can enable X-Engine in one of two ways.
Method 1: For an existing cluster
-
Log on to the PolarDB console. In the left-side navigation pane, click Clusters. Select the region of the cluster, and then click the cluster ID to open the cluster details page.
-
In the left-side navigation pane, choose . On the Data Lifecycle tab, click Enable.
NoteIf you cannot see the Data Lifecycle tab, check whether your cluster meets the prerequisites.
Click the X-Engine (Warm Data) tab. A notification on the page states that X-Engine cannot be disabled after it is enabled, and enabling it requires a cluster restart, which may cause transient disconnections lasting up to 30 seconds. The page also displays three prerequisite checks: the primary node has at least 8 GB of memory, the specifications of each read-only node are greater than or equal to those of the primary node, and the cluster is not part of a GDN. You can proceed only when all conditions are met.
-
In the > Data Lifecycle dialog box, you can customize the memory proportion of X-Engine based on your business requirements and click Enable Now.
The following table lists recommended memory proportion configurations for three typical use cases. You can adjust the configuration to suit your specific workload.
Use case
InnoDB memory (%)
X-Engine memory (%)
InnoDB stores hot data and X-Engine stores cold data. The archived cold data is rarely accessed.
80
20
InnoDB stores hot data and X-Engine stores warm data. The archived warm data is still updated or queried.
50
50
InnoDB stores a small number of tables and X-Engine stores a large number of tables. Data in both engines is actively updated or queried.
20
80
Note-
After you enable X-Engine, you can adjust the memory proportion at any time to suit your specific workload on the Data Lifecycle tab on the page.
-
You can set the memory proportion for X-Engine from 10% to 90%. If you use X-Engine for all tables and have no InnoDB tables, you can set the memory proportion for X-Engine to 90%.
-
Method 2: For a new cluster
When you purchase a PolarDB for MySQL cluster, you can set Storage Engine to InnoDB & X-Engine and adjust the memory proportion for X-Engine. For more information, see the Storage Engine option in Purchase a cluster.
After you enable X-Engine, you can adjust the memory proportion at any time to suit your specific workload on the Data Lifecycle tab on the page.
In the Enable X-Engine proportion section, use the slider to set the memory proportion between X-Engine and InnoDB. The range is from 10% to 90%. For example, if you set it to 50%, a tip below shows X-Engine: 4 GB; InnoDB: 4 GB.
Select the X-Engine (Warm Data) tab. In the X-Engine proportion area, click Edit to adjust the proportion.