The CPU core and memory resources predefined for Hologres instances vary depending on instance types. In Hologres, computing and storage are isolated. Therefore, storage resources are irrelevant to instance types. This topic describes the instance types that are available for use in Hologres. You can dynamically adjust the configuration of a Hologres instance based on your business requirements. For example, you can upgrade or downgrade the configuration of the Hologres instance and separately manage the computing resources and storage resources.

Terms

The resources that are used to run a Hologres instance include the resources consumed by processes for metadata management, the computing resources consumed by query services, and the resources consumed by importing and caching services for optimizing data writing. Hologres offers all services based on container technologies. It implements high-performance parallel computing capabilities by using multiple parallel container-based compute nodes.

Hologres predefines the maximum number of connections and the number of shards for a Hologres instance based on the instance type. The default settings are fine-tuned and optimized to meet the requirements in most cases. The maximum number of connections cannot be changed, and the number of shards can be changed by using functions. After a Hologres instance is scaled up, the maximum number of connections is automatically adjusted. For a database created before the instance is scaled up, the number of shards remains unchanged. You must manually change the number of shards for the database. For a database created after the instance is scaled up, the number of shards is determined based on the new instance type.

After a Hologres instance is scaled up, more CPU cores are available. This improves the performance of concurrent queries. In most cases, you do not need to change the number of shards. If you need to write more data to Hologres, you can increase the number of shards. This improves the write throughout. For a row-oriented table, if the number of shards increases, data in this table can be easier read.

Default resource configurations

Hologres predefines the maximum number of connections and the number of shards for a Hologres instance based on the instance type. The following table describes the default resource configuration for each instance type.
Note
  • These configurations are applicable to Hologres V0.10.25 and later.
  • Maximum number of connections for a Hologres instance = Maximum number of connections for a single frontend host × Number of frontend hosts.
Instance type Default number of shards Maximum number of connections Number of connections reserved for superusers
32 CPU cores 20 256 (128 × 2) 6
64 CPU cores 40 512 (128 × 4) 6
96 CPU cores 60 768 (128 × 6) 6
128 CPU cores 80 1,024 (128 × 8) 9
160 CPU cores 100 1,280 (128 × 10) 12
192 CPU cores 120 1,536 (128 × 12) 15
256 CPU cores 160 2,048 (128 × 16) 18
400 CPU cores 240 3,200 (128 × 25) 30
512 CPU cores 320 4,096 (128 × 32) 36

Calculate the maximum number of connections and manage connections

Hologres allows you to calculate the maximum number of connections for a Hologres instance and manage the connections to the Hologres instance.
  • Calculate the maximum number of connections for a Hologres instance.
    After you create a Hologres instance and connect it to a development tool, you can execute the following statement to query the maximum number of connections for a single frontend host.
    Note Maximum number of connections for a Hologres instance = Maximum number of connections for a single frontend host × Number of frontend hosts.
    show max_connections;
  • Manage connections.

    Hologres reserves connections for the superusers of an instance. When the number of connections to the instance reaches the upper limit specified for the instance type, the superusers can connect to Hologres and execute SQL statements to query idle connections and release them. The superusers can also upgrade the configuration of the instance based on business needs. For more information about how to query idle connections and release these connections, see the "Connections" section in the Metrics of Hologres topic.

Query and change the number of shards for a Hologres instance

After a Hologres instance is scaled up, more CPU cores are available. This improves the performance of concurrent queries. In most cases, you do not need to change the number of shards. If you need to write more data to Hologres, you can increase the number of shards. This improves the write throughout.

For a row-oriented table, if the number of shards increases, data in this table can be easier read. For more information about how to query and change the number of shards for a Hologres instance, see Resharding (Beta).