If database resource usage is not controlled, concurrent tasks easily preempt resources. As a result, the OS will be overloaded and cannot respond to user tasks; or even crash and cannot provide any services to users. The GaussDB(DWS) workload management function balances the database workload based on available resources to avoid database overloading.
Parameter description: Specifies whether to enable the resource management function. This parameter must be applied on both CNs and DNs.
Type: SIGHUP
Value range: Boolean
1 | select gs_wlm_readjust_user_space(0); |
Default value: on
Parameter description: Specifies whether to enable the Cgroup management function. This parameter must be applied on both CNs and DNs.
Type: SIGHUP
Value range: Boolean
Default value: on
If a method in Setting GUC Parameters is used to change the parameter value, the new value takes effect only for the threads that are started after the change. In addition, the new value does not take effect for new jobs that are executed by backend threads and reused threads. You can make the new value take effect for these threads by using kill session or restarting the node.
Parameter description: Specifies whether to control the database permanent thread to the DefaultBackend Cgroup. This parameter must be applied on both CNs and DNs.
Type: POSTMASTER
Value range: Boolean
Default value: on
Parameter description: Specifies whether to control the database permanent thread autoVacuumWorker to the Vacuum Cgroup. This parameter must be applied on both CNs and DNs.
Type: POSTMASTER
Value range: Boolean
Default value: on
Parameter description: Specifies whether to enable the perm space function. This parameter must be applied on both CNs and DNs.
Type: POSTMASTER
Value range: Boolean
Default value: on
Parameter description: Specifies whether to enable the background calibration function in static adaptive load scenarios. This parameter must be used on CNs.
Type: SIGHUP
Value range: Boolean
Default value: on
Parameter description: Specifies the maximum global concurrency. This parameter applies to one CN.
The database administrator changes the value of this parameter based on system resources (for example, CPU, I/O, and memory resources) so that the system fully supports the concurrency tasks and avoids too many concurrency tasks resulting in system crash.
Type: SIGHUP
Value range: an integer ranging from -1 to INT_MAX. The values -1 and 0 indicate that the number of concurrent requests is not limited.
Default value: 60
Parameter description: Specifies the minimum execution cost of a statement under the concurrency control of a resource pool.
Type: SIGHUP
Value range: an integer ranging from –1 to INT_MAX
Default value: 100000
Parameter description: Specifies the name of the Cgroup in use. It can be used to change the priorities of jobs in the queue of a Cgroup.
If you set cgroup_name and then session_respool, the Cgroups associated with session_respool take effect. If you reverse the order, Cgroups associated with cgroup_name take effect.
If the Workload Cgroup level is specified during the cgroup_name change, the database does not check the Cgroup level. The level ranges from 1 to 10.
Type: USERSET
You are not advised to set cgroup_name and session_respool at the same time.
Value range: a string
Default value: DefaultClass:Medium
DefaultClass:Medium indicates the Medium Cgroup belonging to the Timeshare Cgroup under the DefaultClass Cgroup.
Parameter description: Specifies how frequently CPU data is collected during statement execution on DNs.
The database administrator changes the value of this parameter based on system resources (for example, CPU, I/O, and memory resources) so that the system fully supports the concurrency tasks and avoids too many concurrency tasks resulting in system crash.
Type: SIGHUP
Value range: an integer ranging from -1 to INT_MAX. The unit is second.
Default value: 30
Parameter description: Specifies whether the database automatically switches to the TopWD group when executing statements by group type.
Type: USERSET
Value range: Boolean
Default value: off
Parameter description: Specifies the memory information recording mode.
Type: USERSET
Value range:
Default value: none
Parameter description: Specifies the sequence number of the memory background information distributed in the needed thread and plannodeid of the query where the current thread is located.
Type: USERSET
Value range: a string
Default value: empty
It is recommended that you retain the default value for this parameter.
Parameter description: Specifies whether the real-time resource monitoring function is enabled. This parameter must be applied on both CNs and DNs.
Type: SIGHUP
Value range: Boolean
Default value: on
Parameter description: Specifies whether resource monitoring records are archived. If this parameter is set to on, records in the history views (GS_WLM_SESSION_HISTORY and GS_WLM_OPERATOR_HISTORY) are archived to the corresponding info views (GS_WLM_SESSION_INFO and GS_WLM_OPERATOR_INFO) at an interval of 3 minutes. After being archived, the records are deleted from the history views. This parameter must be applied on both CNs and DNs.
Type: SIGHUP
Value range: Boolean
Default value: off
Parameter description: Specifies whether the user historical resource monitoring dumping function is enabled. If this function is enabled, data in view PG_TOTAL_USER_RESOURCE_INFO is periodically sampled and saved to system catalog GS_WLM_USER_RESOURCE_HISTORY.
Type: SIGHUP
Value range: Boolean
Default value: on
Parameter description: Specifies the retention time of the user historical resource monitoring data. This parameter is valid only when enable_user_metric_persistent is set to on.
Type: SIGHUP
Value range: an integer ranging from 0 to 3650. The unit is day.
Default value: 7
Parameter description: Specifies whether the instance resource monitoring dumping function is enabled. When this function is enabled, the instance monitoring data is saved to the system catalog GS_WLM_INSTANCE_HISTORY.
Type: SIGHUP
Value range: Boolean
Default value: on
Parameter description: Specifies the retention time of the instance historical resource monitoring data. This parameter is valid only when enable_instance_metric_persistent is set to on.
Type: SIGHUP
Value range: an integer ranging from 0 to 3650. The unit is day.
Default value: 7
Parameter description: Specifies the resource monitoring level of the current session. This parameter is valid only when enable_resource_track is set to on.
Type: USERSET
Value range: enumerated values
Default value: query
Parameter description: Specifies the minimum execution cost for resource monitoring on statements in the current session. This parameter is valid only when enable_resource_track is set to on.
Type: USERSET
Value range: an integer ranging from -1 to INT_MAX
Default value: 100000
Parameter description: Specifies the minimum statement execution time that determines whether information about jobs of a statement recorded in the real-time view (see Table 1) will be dumped to a historical view after the statement is executed. Job information will be dumped from the real-time view (with the suffix statistics) to a historical view (with the suffix history) if the statement execution time is no less than this value.
Type: USERSET
Value range: an integer ranging from 0 to INT_MAX. The unit is second (s).
Default value: 1min
Parameter description: Specifies the memory quota in adaptive load scenarios, that is, the proportion of maximum available memory to total system memory.
Type: SIGHUP
Value range: an integer ranging from 1 to 100
Default value: 80
Parameter description: Stops memory protection. To query system views when system memory is insufficient, set this parameter to on to stop memory protection. This parameter is used only to diagnose and debug the system when system memory is insufficient. Set it to off in other scenarios.
Type: USERSET
Value range: Boolean
Default value: off
Parameter description: Specifies the job type of the current session.
Type: USERSET
Value range: a string
Default value: empty
Parameter description: Specifies whether the black box function is enabled. The core files can be generated even through the core dump mechanism is not configured in the system. This parameter must be simultaneously used on CNs and DNs.
Type: SIGHUP
Value range: Boolean
Default value: off
Parameter description: Specifies whether to enable the dynamic workload management function.
Type: POSTMASTER
Value range: Boolean
Default value: on
Parameter description: Specifies the maximum number of core files that are generated by GaussDB(DWS) and can be stored in the path specified by bbox_dump_path. If the number of core files exceeds this value, old core files will be deleted. This parameter is valid only if enable_bbox_dump is set to on.
Type: USERSET
Value range: an integer ranging from 1 to 20
Default value: 8
When core files are generated during concurrent SQL statement execution, the number of files may be larger than the value of bbox_dump_count.
Parameter description: Specifies the upper limit of IOPS triggered.
Type: USERSET
Value range: an integer ranging from 0 to 1073741823
Default value: 0
Parameter description: Specifies the I/O priority for jobs that consume many I/O resources. It takes effect when the I/O usage reaches 90%.
Type: USERSET
Value range: enumerated values
Default value: None
Parameter description: Specifies the resource pool associated with the current session.
Type: USERSET
If you set cgroup_name and then session_respool, the Cgroups associated with session_respool take effect. If you reverse the order, Cgroups associated with cgroup_name take effect.
If the Workload Cgroup level is specified during the cgroup_name change, the database does not check the Cgroup level. The level ranges from 1 to 10.
You are not advised to set cgroup_name and session_respool at the same time.
Value range: a string. This parameter can be set to the resource pool configured through create resource pool.
Default value: invalid_pool
Parameter description: whether to control transaction block statements and stored procedure statements.
Type: USERSET
Value range: Boolean
Default value: on
Parameter description: Specifies the memory size of a real-time query view.
Type: SIGHUP
Value range: an integer ranging from 5 MB to 50% of max_process_memory
Default value: 5 MB
Parameter description: Specifies the memory size of a historical query view.
Type: SIGHUP
Value range: an integer ranging from 10 MB to 50% of max_process_memory
Default value: 100 MB
Parameter description: Specifies the retention period of historical TopSQL data in the gs_wlm_session_info and gs_wlm_operator_info tables.
Type: SIGHUP
Value range: an integer ranging from 0 to 3650. The unit is day.
Default value: 0
Before setting this GUC parameter to enable the data retention function, delete data from the gs_wlm_session_info and gs_wlm_operator_info tables.
Parameter description: maximum queuing time of transaction block statements and stored procedure statements if enable_transaction_parctl is set to on.
Type: USERSET
Value range: an integer ranging from –1 to INT_MAX. The unit is second (s).
Default value: 0
This parameter is valid only for internal statements of stored procedures and transaction blocks. That is, this parameter takes effect only for the statements whose enqueue value (for details, see PG_SESSION_WLMSTAT) is Transaction or StoredProc.
Parameter description: Specifies whitelisted SQL statements for resource management. Whitelisted SQL statements are not monitored by resource management.
Type: SIGHUP
Value range: a string
Default value: empty