Feature Description

GaussDB(DWS) resource pools provide concurrency management, memory management, CPU management, and exception rules.

Concurrency Management

Concurrency represents the maximum number of concurrent queries in a resource pool. Concurrency management can limit the number of concurrent queries to reduce resource contention and improve resource utilization.

The concurrency management rules are as follows:

Memory Management

Each resource pool occupies a certain percentage of memory.

Memory management aims to prevent out of memory (OOM) in a database, isolate the memory of different resource pools, and to control memory usage. Memory is managed from the following aspects:

CPU Management

CPU share and CPU limit can be managed.

Choose either of the preceding management methods as needed. In CPU share management, CPUs can be shared and fully utilized, but resource pools are not isolated and may affect the query performance of each other. In CPU limit management, the CPUs of different resource pools are isolated, but this may result in the waste of idle resources.

The CPU usage limit is supported only by clusters of version 8.1.3 or later.

Exception Rules

To avoid query blocking or performance deterioration, you can configure exception rules to let the service automatically identify and handle abnormal queries, preventing slow SQL statements from occupying too many resources for a long time.

The following table describes exception rules.

Table 1 Exception rule parameters

Parameter

Description

Value Range (0 Means No Limit)

Operation

Blocking Time

Job blocking time. It refers to the total time spent in global and local concurrent queuing. The unit is second.

For example, if the blocking time is set to 300s, a job executed by a user in the resource pool will be terminated after being blocked for 300 seconds.

An integer in the range 1 to 2,147,483,647. The value 0 indicates no limit.

Terminated or Not limited

Execution Time

Time that has been spent in executing the job, in seconds.

For example, if Time required for execution is set to 100s, a job executed by a user in the resource pool will be terminated after being executed for more than 100 seconds.

An integer in the range 1 to 2,147,483,647. The value 0 indicates no limit.

Terminated or Not limited

Total CPU time on all DNs.

Total CPU time spent in executing a job on all DNs, in seconds.

An integer in the range 1 to 2,147,483,647. The value 0 indicates no limit.

Terminated or Not limited

Interval for Checking CPU Skew Rate

Interval for checking the CPU skew, in seconds. This parameter must be set together with Total CPU Time on All DNs.

An integer in the range 1 to 2,147,483,647. The value 0 indicates no limit.

Terminated or Not limited

Total CPU Time Skew Rate on All DNs

CPU time skew rate of a job executed on DNs. The value depends on the setting of Interval for Checking CPU Skew Rate.

An integer in the range 1 to 100. The value 0 indicates no limit.

Terminated or Not limited

Data Spilled to Disk Per DN

Allowed maximum job data spilled to disks on a DN. The unit is MB.

NOTE:

This rule is supported only by clusters of version 8.2.0 or later.

An integer in the range 1 to 2,147,483,647. The value 0 indicates no limit.

Terminated or Not limited

Average CPU Usage Per DN

Average CPU usage of a job on each DN. If Interval for Checking CPU Skew Rate is configured, the interval takes effect for this parameter. If the interval is not configured, the check interval is 30 seconds by default.

NOTE:

This rule is supported only by clusters of version 8.2.0 or later.

An integer in the range 1 to 100. The value 0 indicates no limit.

Terminated or Not limited