Help Center > > Developer Guide> Resource Load Management> Resource Load Management Framework Overview> Association Tasks

Association Tasks

Updated at: Mar 13, 2020 GMT+08:00

Context

After allocating system resources using resource pools, you must associate tasks with resource pools for service load management.

After a resource pool is associated with a user, all the tasks of the user are automatically associated with the resource pool.

Procedure

  1. Create a resource pool respool associated with the default Cgroup.

    1
    2
    CREATE RESOURCE POOL respool;
    CREATE RESOURCE POOL
    

    You can associate the resource pool with a user-defined Cgroup as required. For details, see Resource Pools.

  2. Create user user1 and associate the user with the respool resource pool.

    1
    2
    CREATE USER user1 WITH RESOURCE POOL 'respool' password 'Bigdata@123';
    CREATE ROLE
    

  3. Run job.sql as user user1.

    gsql -U user1 -W Bigdata@123 -d postgres -p 8000 -f job.sql

    Alternatively, connect to the related database as user user1 and run the task.

    gsql -U user1 -W Bigdata@123 -d postgres -p 8000

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