Creating a Resource Pool
Background
openGauss creates resource pools to divide host resources. After resource load management is enabled, the default resource pool alone is insufficient to address the resource load management requirements of services. Therefore, new resource pools must be used to reallocate system resources for granular control purposes. Table 1 describes the features of a common resource pool.
Table 1 Features of a common resource pool
After resource load management is enabled, the system automatically creates default_pool. If no resource pool is specified for a session or user, they will be automatically associated with default_pool. By default, default_pool is associated with the DefaultClass:Medium Cgroup and does not limit the number of concurrent services. Table 2 describes the attributes of default_pool.
Table 2 default_pool attributes
Prerequisites
You are familiar with the CREATE RESOURCE POOL, ALTER RESOURCE POOL, and DROP RESOURCE POOLsyntax.
Procedure
Creating a resource pool
Perform the steps in Using gsql to Connect to a Database.
Create a group resource pool and associate it with the specified sub-Class Cgroup. In the following example, the group resource pool named resource_pool_a is associated with the class_a Cgroup.
3.Create a service resource pool and associate it with the specified Workload Cgroup. In the following example, the service resource pool named resource_pool_a1 is associated with the workload_a1 Cgroup.
Managing resource pools
Modify resource pool attributes. In the following example, the Cgroup associated with the resource pool resource_pool_a2 is changed to class_a:workload_a1 (assuming that class_a:workload_a1 is not associated with any other resource pools).
Deleting a resource pool
Delete a resource pool. For example, run the following command to delete the resource pool resource_pool_a2:
Viewing Resource Pool Information
Run the following command to view the information of all the resource pools of the current cluster:
· View information about Cgroups associated with a resource pool. For details, see statistics-information-functions.
In the following example, resource_pool_a1 is the name of the resource pool.
Table 3 gs_control_group_info attributes
Top comments (0)