• Data Warehouse Service

dws
  1. Help Center
  2. Data Warehouse Service
  3. Developer Guide
  4. Setting Configuration Parameters
  5. Appendix B: GUC Parameter Description
  6. Load Management

Load Management

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 DWS workload management function balances the database workload based on available resources to avoid database overloading.

cgroup_name

Parameter description: Sets the name of the Cgroup in use or changes the priority of items in the queue of the Cgroup.

If you set cgroup_name and then session_respool, the Cgroups associated with session_respool will take effect. If you set them in reverse order, the Cgroups associated with cgroup_name will 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.

This parameter is a USERSET parameter. Set it based on instructions provided in Table 1.

You are not advised to use cgroup_name and session_respool at the same time.

Value range: a string

Default value: Medium

enable_cgroup_switch

Parameter description: Specifies whether the database automatically switches to the TopWD group when the statement is executed by control group type.

This parameter is a USERSET parameter. Set it based on instructions provided in Table 1.

Value range: Boolean

  • on: Controls the database automatically switched to the TopWD group when it executes statements by database types.
  • off: Controls the database automatically not switched to the TopWD group when it executes statements by database types.

Default value: off

memory_tracking_mode

Parameter description: Specifies the memory information recording mode.

This parameter is a USERSET parameter. Set it based on instructions provided in Table 1.

Value range:

  • none: The memory statistics collecting function is not enabled.
  • normal: Only memory statistics is collected in real time and no file is generated.
  • executor: The statistics file is generated, containing the context information about all allocated memory used by the execution layer.
  • fullexec: The generated file includes the information about all memory contexts requested by the execution layer.

Default value: none

memory_detail_tracking

Parameter description: Sets the memory context allocation priority of a thread and the plannodeid of the query for which the current thread is running.

This parameter is a USERSET parameter. Set it based on instructions provided in Table 1.

Value range: a string

Default value: empty

You are advised to retain the default value for this parameter.

resource_track_level

Parameter description: Specifies the resource monitoring level.

This parameter is a USERSET parameter. Set it based on instructions provided in Table 1.

Value range: enumerated values

  • none: Resources are not recorded.
  • query: Resources used at the query level are recorded.
  • operator: Resources used at query and operator levels are recorded.

Default value: query

resource_track_cost

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.

This parameter is a USERSET parameter. Set it based on instructions provided in Table 1.

Value range: An integer ranging from -1 to INT_MAX

  • If the value is -1 or the cost of executing statements is less than 10, the statements are not monitored by the resource pool.
  • If the value is greater than or equal to 0, and the cost of executing statements exceeds the value and is greater than or equal to 10, the statements are monitored by the resource pool.

Default value: 100000

resource_track_duration

Parameter description: Specifies the minimum statement execution time that determines whether information about jobs of a statement recorded in the real-time view 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. This parameter is valid only when enable_resource_track is set to on.

This parameter is a USERSET parameter. Set it based on instructions provided in Table 1.

Value range: an integer ranging from 0 to INT_MAX. The unit is s.

If it is set to 0, job information of all statements recorded in the real-time resource monitoring view will be dumped to a historical view.

If it is set to a value greater than 0, job information will be dumped to a history view if the statement execution time is no less than this value.

Default value: 60s

bbox_dump_count

Parameter description: Specifies the maximum number of black box core files that are generated by the same process in a folder.

This parameter is a USERSET parameter. Set it based on instructions provided in Table 1.

Value range: An integer ranging from 1 to 20

Default value: 8

NOTE:

When core files are generated during concurrent SQL statement execution, the number of files may be larger than the value of bbox_dump_count.

enable_resource_track

Parameter description: Specifies whether the real-time resource monitoring function is enabled.

This parameter is a POSTMASTER parameter. It is not supported currently.

Value range: Boolean

  • on indicates the resource monitoring function is enabled.
  • off indicates the resource monitoring function is disabled.

Default value: on

enable_resource_record

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 is a SIGHUP parameter. Currently, it cannot be set.

Value range: Boolean

  • on indicates that the resource monitoring records are archived.
  • off indicates that the resource monitoring records are not archived.

Default value: off

disable_memory_protect

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.

This parameter is a USERSET parameter and is valid only for the current session. Set it based on instructions provided in method 3 in Table 2.

Value range: Boolean

  • on indicates that memory protection stops.
  • off indicates that memory is protected.

Default value: off

query_band

Parameter description: Specifies the job type.

This parameter is a USERSET parameter. Set it based on instructions provided in Table 1.

Value range: a string

Default value: empty