Help Center > > Developer Guide> Resource Load Management> Resource Management Preparation> Enabling Resource Load Management

Enabling Resource Load Management

Updated at: Sep 17, 2021 GMT+08:00

Context

This section describes how to configure parameters for resource load management.

Prerequisites

  • In GaussDB(DWS), you can manage system resources only as a database administrator. Run the following statement to query user permissions:
    1
    2
    3
    4
    5
    6
    SELECT rolname FROM pg_roles WHERE rolsystemadmin = 't';
     rolname
    ---------
     omm
     Jack
    (2 rows)
    
  • Resource load management can be applied only to users with the login permission. Run the following statement to query user permissions:
    1
    2
    3
    4
    5
    SELECT rolname FROM pg_roles WHERE rolcanlogin = 't';
     rolname
    ---------
     omm
    (1 row)
    
  • If the login permission of a user is revoked, the resource pool of the user is automatically changed to default_pool. For details about default_pool, see Table 2.
  • Except the initial user, if enable_gtm_free is enabled and the concurrency of the associated queue is not controlled, user jobs are not managed in resource management. (For uncontrolled concurrency, the resource pool attribute max_dop is set to 0 and active_statements is set to 0. Besides, the global concurrency and resource pool concurrency of users associated with the resource pool are not controlled.)

Procedure

You can perform the following steps only as a database administrator to enable resource pool-based load management. User omm is used as an example.

  1. Log in to any host where the GaussDB(DWS) cluster is installed as the OS user omm.
  2. Enable the Cgroup function.

    gs_guc reload -Z coordinator -Z datanode -N all -I all -c "enable_control_group=on"

  3. Enable resource pool-based load management.

    gs_guc set -Z coordinator -Z datanode -N all -I all -c "use_workload_manager=on" 

  4. Enable resident backend thread control for the database.

    gs_guc set -Z coordinator -Z datanode -N all -I all -c "enable_backend_control=on" 

  5. Enable control over the autoVacuumWorker thread among the resident backend threads for the database.

    gs_guc set -Z coordinator -Z datanode -N all -I all -c "enable_vacuum_control=on"

  6. Restart the database to make the parameter settings take effect.

    gs_om -t stop && gs_om -t start

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel