Redshift Queues

redshift

I'm brand new to RedShift and am trying to debug why our systems are running very slowly. I've noticed that we have around 50 users and hundreds of daily reports running, all of which take substantial execution time. I believe that part of the problem my reside in the problem with too many concurrent queries running and slowing the system.

I would like to optimize the queuing system so that certain users/applications are give priority, while low priority reports that are less seldom run will go into a different queue.

How can I view the current queues and setup new ones? Further, is it possible to restrict individual users to a particular queue so that every query that they run will be in that particular queue? Thanks.

Best Answer

Amazon provides WLM (Work Load Management) specifically for this task.

This allows you to allocate memory and other resources like setting concurrency, setting timeout values etc. If you have access to AWS Redshift Console, you can easily assign a parameter group to a cluster and then browse through Parameter Groups > WLM and set below WLM parameters for that particular cluster -

Concurrency - Max number of queries which can run concurrently.

User Groups - You need to create user group like (report_gr, etl_gr, default_gr etc) and assign users to those groups accordingly.

Timeout - Timeout value for that user group's queries

Memory - Percentage of memory allocated for that user group's queries.

Related Question