Redshift: Redshift Work Load Management (WLM)



Work Load Management (WLM)

- It enables to create multiple query queues according to different user groups or query groups. This will help in managing workloads.

- Redshift allocates an equal, fixed share of server memory to each queue, and, by default, an equal, fixed share of a queue's memory to each query slot in the queue regardless of the number of queries that are actually running concurrently..

- WLM assigns a query to a queue based on the user's group or query group specified while running the SQL.


Maxmimum concurrency level per queue is 50.
Total concurrency of all the queues is 50.

For each queue, you can specify
• Concurrency level
• User groups
• Query groups
• Wildcards

• WLM memory percent to use
 - To specify the amount of available memory that is allocated to a query
 - If you specify a WLM Memory Percent to Use value for one or more queues but not all of the queues, then the unallocated memory is divided evenly among the remaining queues.

• WLM timeout
 - To limit the amount of time that queries in a given WLM queue are permitted to use. Specified in milliseconds.
 - statement_timeout configuration parameter applies to the entire cluster, WLM timeout
is specific to a single queue in the WLM configuration

If you have multiple queries that each access data on a single slice, set up a separate WLM queue to execute those queries concurrently. Redshift will assign concurrent queries to separate slices.
By increasing concurrency, you increase the contention for system resources and limit the overall throughput.

If a specific query needs more memory than is allocated to a single query slot, you can increase the available memory by increasing the wlm_query_slot_count (p. 697) parameter


Default queue
The last queue defined in the WLM configuration is the default queue.You can set the concurrency level and the timeout for the default queue, but it cannot include user groups or query groups. The default queue counts against the limit of eight query queues and the limit of 50 concurrent queries.

Superuser queue
To run a query in the Superuser queue, a user must be logged in as a superuser and must run the query within the predefined 'superuser' query group.



The WLM configuration is an editable parameter (wlm_json_configuration) in a parameter group, which can be associated with one or more clusters.
You must reboot the cluster after changing the WLM configuration.

Comments