An instance type with high specifications indicates high performance of the instance. This topic describes how to select an instance type.

PolarDB-X instances provide services by using compute nodes and data nodes. Instance types are classified based on the CPU and 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 Characteristic
General-purpose polarx.x4.medium.2e 2 cores, 8 GB memory 3072GB 20000 4000 The instance type is an entry-level instance type and is used in testing and experience scenarios and scenarios in which minimal loads exist.
polarx.x4.large.2e 4 cores, 16 GB memory 3072GB 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 memory 3072GB 20000 12000
polarx.x4.2xlarge.2e 16 cores, 64 GB memory 3072GB 20000 14000
Dedicated polarx.x8.large.2e 4 cores, 32 GB memory 3072GB 20000 9000 The ratio of CPU cores to memory is 1:8. The computing resources that are allocated to an instance such as CPU cores are exclusive to the instance. This makes the performance more stable.
polarx.x8.xlarge.2e 8 cores, 64 GB memory 3072GB 20000 18000
polarx.x8.2xlarge.2e 16 cores, 128 GB memory 3072GB 20000 36000
polarx.x8.4xlarge.2e 32 cores, 128 GB memory 3072GB 20000 36000
polarx.x8.4xlarge.2e 32 cores, 256 GB memory 3072GB 20000 72000
Dedicated host polarx.st.8xlarge.25 60 cores, 470 GB memory 6144GB 20000 120000 The dedicated host instance type. The dedicated host instance type ensures that you have sufficient resources to use.
polarx.st.12xlarge.25 90 cores, 720 GB memory 6144GB 20000 140000

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

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. You can estimate the business growth in 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 make sure that the storage usage of a single node remains lower than 70%.

Example:

The storage of the business data is 1,500 GB, and increases in increments of 10 GB per day. The business scenario requires an estimated storage capacity of approximately 5,150 GB over a time period of one year. If 70% of the storage capacity is used, the required storage capacity is estimated by using the following equation: 5,150 GB/0.7 = 7,357 GB. If the dedicated instance type polarx.x8.xlarge.2e is used and the maximum storage capacity of a node is 3,072 GB (3 TB), the required number of nodes whose storage capacity meets the storage requirements is calculated by using the following function: CEILING(7,357 GB/3,072 GB) = CEILING(2.39) = 3

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 resources of PolarDB-X node specifications for estimation, such as CPUs, memory, number of 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 polarx.x8.xlarge.2e is used, the estimated 10,000 to 20,000 QPS can be supported by a single node.
    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. 70% of the resources are reserved. In this case, resources that support 140,000 QPS are required. 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 in increments of 10 GB per 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. The storage requirement can be met by the storage capacity of at least three nodes. PolarDB-X provides storage plans that are billed in pay-as-you-go mode. You can select the number of nodes whose CPU cores meet the CPU requirements at least and the number of nodes whose storage capacity meets the storage requirements at most. For example, you can select at least seven nodes, for which the specification of each node is 8 cores and 64 GB memory or at most four nodes, for which the specification of each node is 16 cores and 128 GB memory.
  • If your business traffic includes report analysis requests, computing tasks consume more resources. We recommend that you select four nodes, for which the specification of each node is 16 cores and 128 GB memory. Use high node specifications to increase the upper limit of the barrel edge. In other scenarios, we recommend that you select seven nodes, for which the specification of each node is 8 cores and 64 GB memory. More nodes provide larger storage capacity. We recommend that you upgrade the specification of a single node to scale up the instance.