The performance of an instance is subject to the instance specifications. The higher specifications an instance has, the higher the performance it can provide. This topic describes how to select an instance type.

PolarDB-X instances provide services by using compute nodes and storage nodes. Instance types are classified based on the CPU or memory of a single node. A PolarDB-X instance consists of multiple nodes. For more information about instance types, see Instance types.

Instance specifications and types

Instance family Instance type CPU and memory Maximum storage capacity Maximum connections Maximum IOPS Features
General-purpose polarx.x4.medium.2e 2 cores, 8 GB 3072 GB 20000 4000 The instance type provides the basic specifications required in tests, trials, and other light-load scenarios.
polarx.x4.large.2e 4 cores, 16 GB 3072 GB 20000 7000 The ratio of CPU cores to memory is 1:4. Computing resources are shared among PolarDB-X instances on the same server. This makes resource utilization more cost effective.
polarx.x4.xlarge.2e 8 cores, 32 GB 3072 GB 20000 12000
polarx.x4.2xlarge.2e 16 cores, 64 GB 3072 GB 20000 14000
Dedicated polarx.x8.large.2e 4 cores, 32 GB 3072 GB 20000 9000 The ratio of CPU cores to memory is 1:8. The computing resources such as CPU cores are exclusive to the instance. This makes the performance more stable.
polarx.x8.xlarge.2e 8 cores, 64 GB 3072 GB 20000 18000
polarx.x8.2xlarge.2e 16 cores, 128 GB 3072 GB 20000 36000
polarx.x8.4xlarge.2e 32 cores, 128 GB 3072 GB 20000 36000
polarx.x8.4xlarge.2e 32 cores, 256 GB 3072 GB 20000 72000
Dedicated host polarx.st.8xlarge.25 60 cores, 470 GB 6144 GB 20000 120000 The dedicated host instance type ensures that you have sufficient resources to use.
polarx.st.12xlarge.25 90 cores, 720 GB 6144 GB 20000 140000

Available resources of an instance = Number of nodes × Resources of a node

Example:

The dedicated instance type is polarx.x8.xlarge.2e. The number of nodes is 2. The instance supports 6 TB (3,072 GB × 2) of storage capacity, 40,000 (20,000 × 2) connections, and a maximum of 36,000 (18,000 × 2) IOPS.

Select an instance type by storage capacity

Select the instance type based on the estimated storage capacity of your business scenario:

  • The storage of the business data increases based on the business growth. We recommend that you estimate the business growth of the next one to two years and determine the maximum storage capacity that is required.
  • The storage of PolarDB-X is divided into space, such as data space, system file space, and log space. We recommend that you size your instance to ensure that the storage usage does not exceed 70%.

Example:

The storage of the business data is 1,500 GB, and increases by 10 GB each day. The business scenario requires an estimated storage capacity of approximately 5,150 GB over a time period of one year. Because the storage usage should not exceed 70%, the required storage capacity is estimated as 5,150 GB/0.7 = 7,357 GB. If the dedicated instance type is polarx.x8.xlarge.2e, which supports the maximum storage capacity of 3,072 GB per node, the total nodes required = 7,357 GB/3,072 GB = 2.39, which rounds up to 3 nodes.

Select an instance type by concurrency

Select the instance type based on the estimated concurrency of your business scenario:
  • You must take note of the limits on the following resources of a PolarDB-X node: CPUs, memory, connections, and IOPS. In transaction-oriented scenarios, CPU bottleneck issues occur. You can estimate the required number of CPU cores based on the estimated queries per second (QPS) of the business scenario.
  • In scenarios in which read and write requests exist and transaction processing requests account for a large proportion, the estimated 1,000 to 3,000 QPS can be supported by a single CPU core. If the dedicated instance type is polarx.x8.xlarge.2e, which has eight CPU cores, the total QPS supported by a node is estimated to be 10,000 to 20,000.
    Note The traffic model of the business scenario is different from common benchmarks. The QPS supported by a single node is provided only for reference. We recommend that you perform stress testing based on your business traffic.
  • A regular traffic peak needs to be considered for estimation. We recommend that you make sure that the resource utilization of a single node remains lower than 70% in a PolarDB-X instance.

Example:

The peak QPS of the business scenario is estimated to be 100,000 and the resource utilization of a single node should stay lower than 70%. In this case, the total estimated QPS required is 140,000. If a single node in a PolarDB-X instance can support 20,000 QPS, seven nodes are required.

Select an instance type based on the combinations of multiple dimensions

Example:

The peak QPS of the business scenario is estimated to be 100,000. The storage of the business data is 1,500 GB, and increases by 10 GB each day. The business scenario requires an estimated storage capacity of approximately 5,150 GB over a time period of one year.

We recommend that you select the instance type in the following manner:

  • A distributed database consists of multiple nodes and has an effect similar to a barrel effect. For example, bursts of traffic cause resource bottleneck issues on individual nodes. This causes slow SQL queries on the instance. We recommend that you select the dedicated instance type. A minimum of 8 cores and 64 GB memory are required in a production environment. The default storage capacity is 3,072 GB, which is equal to 3 TB.
  • The number of required nodes and CPU cores are estimated based on the storage capacity and concurrency. In the preceding example, 56 CPU cores and 7,357 GB of storage capacity are required. The minimum number of nodes whose storage capacity and CPU cores meet the requirements is required. At least 3 nodes are required to meet storage requirements. Because a PolarDB-X storage plan can be billed on a pay-as-you-go basis, more nodes will not incur additional fees. You can select the minimum number of nodes whose CPU cores meet the requirements. For example, you can select seven nodes, for which the specification of each node is 8 cores and 64 GB memory or four nodes, for which the specification of each node is 16 cores and 128 GB memory.
  • In report analysis scenarios, because data analysis consumes a large number of computing resources, we recommend that you select the latter option (four nodes, each with 16 cores and 128 GB memory). More cores per node indicates more computing resources. In this way, it is not easy to reach the resource bottleneck during report analysis. In other scenarios, we recommend that you select the former option (seven nodes, each with 8 cores and 64 GB memory). This ensures larger storage capacity. If you want to upgrade your instance, we recommend that you scale up the specification of a single node, instead of adding nodes.