Enable X-Engine
This topic describes how to enable the X-Engine Edition, as well as the conditions and precautions for the enabling process.
Prerequisites
-
Engine version must meet the following requirements:
-
8.0.1.1.31 or later.
-
8.0.2.2.12 or later.
To check the cluster version, see Checking the engine version.
-
-
Multi-master Cluster (Limitless) does not support enabling the X-Engine Edition.
-
The specification of the read-write (RW) node of the cluster must be at least 8 GB. The specifications of the read-only (RO) nodes in the cluster must be greater than or equal to the specification of the RW node.
Usage notes
-
X-Engine Edition has limitations on engine features and large transactions.
-
Enabling the X-Engine Edition automatically restarts the cluster. During the restart, transient connection interruptions of up to 30 seconds occur. As a best practice, perform this operation during off-peak hours and make sure that your application has a reconnection mechanism.
-
After you enable the X-Engine Edition:
-
To avoid access exceptions for tables already stored in the X-Engine Edition, this feature cannot be disabled.
-
To join a Global Database Network (GDN), the cluster must run engine version 8.0.2.2.37 or later.
-
Parameters
After you enable the X-Engine Edition, if you need to archive the partitions of a partitioned table to the X-Engine format, you must manually set the following kernel parameters on the Parameters page of the cluster. For the complete parameter descriptions and usage limits of hybrid partitions, see Create a hybrid partition.
|
Parameter |
Level |
Description |
|
|
Global |
Specifies whether to allow creating or archiving partitioned tables that contain partitions of engines other than InnoDB. Valid values:
|
The preceding parameters apply only to clusters of version 8.0.2 with revision version 8.0.2.2.34.1 or later.
Procedure
You can enable the high-compression engine (X-Engine) by using either of the following two methods.
Method 1: Enable the high-compression engine (X-Engine) with one click on an existing cluster
-
Log in to the PolarDB console,In the navigation pane on the left, click Clusters. Select the Region where the cluster is deployed, and then click the cluster ID to go to the cluster details page。
-
In the left-side navigation pane, choose , and on the X-Engine (Warm Data) tab, click Enable.
-
Note
-
If you cannot see the X-Engine (Warm Data) tab, check whether your cluster meets the Prerequisites.
-
After the high-compression storage engine is enabled for the cluster, it cannot be disabled. Enabling it requires restarting the cluster, during which 1 to 2 transient connection interruptions of up to 30 seconds occur.
-
-
In the dialog box, you can customize the memory resource proportion of the X-Engine Edition based on your business scenario, and then click Enable Now.
The following table lists the memory resource proportion configurations of storage engines in three typical scenarios for your reference. You can configure the proportions based on your actual business scenario.
Applicable scenario
InnoDB engine memory resource proportion (%)
X-Engine memory resource proportion (%)
The InnoDB engine stores hot data, the X-Engine engine stores cold data, and the archived cold data is rarely accessed.
80
20
The InnoDB engine stores hot data, the X-Engine engine stores cold data, and the archived cold data is still updated or queried.
50
50
The InnoDB engine stores a small number of tables, the X-Engine engine stores a large number of tables, and the data is updated or queried.
20
80
Note-
After the high-compression engine (X-Engine) is enabled, you can adjust the memory resource proportion at any time based on your business scenario on the page of the cluster, on the X-Engine (Warm Data) tab.
-
The memory resource proportion of X-Engine can be set in the range of 10% to 90%. If you use the X-Engine engine to store all tables and have no InnoDB engine tables, you can set the X-Engine memory resource proportion to 90%.
-
Method 2: Select the high-compression engine (X-Engine) when you purchase a new cluster
When you purchase a new PolarDB for MySQL cluster, you can set the storage engine to InnoDB & X-Engine, and use the slider at X-Engine Memory Usage to set the storage proportion between X-Engine and InnoDB. The range is 10% to 90%. For example, when the value is set to 50%, the prompt below shows X-Engine:4 GB;InnoDB:4 GB. See Purchase a cluster for more information about the Storage Engine option.
After the high-compression engine (X-Engine) is enabled, you can adjust the memory resource proportion at any time based on your business scenario on the page of the cluster, on the X-Engine (Warm Data) tab.