Resource Management of OushuDB Management Guide (Part 2)

Set query maximum and minimum concurrency

In general, the degree of parallelism of a query affects the performance of a query and the throughput of the system. The number of virtual segments allocated to a query by the resource manager determines the parallelism of a query. Under normal circumstances, users do not need to manually intervene in the resource manager's allocation of the number of virtual segments, and the OushuDB resource manager will manage the parallelism of the query well. But sometimes, users may want to control the concurrency of a query. OushuDB provides multiple means for users to control.

  • Via hawq_rm_nvseg_perquery_limit: This is the maximum number of virtual segments that the resource manager can allocate for a query. The default value is 512. The user can adjust this value to relax or tighten the limit on parallelism.

  • NVSEG_UPPER_LIMIT/NVSEG_LOWER_LIMIT: These two values ​​can be specified when creating the resource queue. Determines the minimum and maximum number of virtual segments used by queries in a resource queue. If these two values ​​are not specified, these two parameters are inactive by default.

  • NVSEG_UPPER_LIMIT_PERSEG/NVSEG_LOWER_LIMIT_PERSEG: These two values ​​can be specified when creating the resource queue. Determines the minimum and maximum number of virtual segments used by queries in a resource queue on each node. If these two values ​​are not specified, these two parameters are inactive by default. If the number of nodes is 10 and NVSEG_UPPER_LIMIT_PERSEG is 2, the query of this resource queue can use up to 10 * 2 = 20 virtual segments. The following statement sets this value:

CREATE RESOURCE QUEUE adhoc2 WITH (PARENT='department3', ACTIVE_STATEMENTS=3,

MEMORY_LIMIT_CLUSTER=50%, CORE_LIMIT_CLUSTER=50%, NVSEG_UPPER_LIMIT_PERSEG=2);

 

hawq_rm_nvseg_perquery_limit is a hard limit, and the settings of NVSEG_UPPER_LIMIT/NVSEG_LOWER_LIMIT and NVSEG_UPPER_LIMIT_PERSEG/NVSEG_LOWER_LIMIT_PERSEG cannot exceed the limit of hawq_rm_nvseg_perquery_limit.

{{o.name}}
{{m.name}}

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=324052373&siteId=291194637