Menu
Amazon Redshift
Database Developer Guide (API Version 2012-12-01)

Section 2: Modifying the WLM Query Queue Configuration

Now that you understand how queues work by default, you will learn how to configure query queues in WLM. In this section, you’ll create and configure a new parameter group for your cluster. You’ll create two additional user queues and configure them to accept queries based on the queries’ user group or query group labels. Any queries that do not get routed to one of these two queues will be routed to the default queue at run time.

Step 1: Create a Parameter Group

In this step, we’ll create a new parameter group to use to configure WLM for this tutorial.

To Create a Parameter Group

  1. Sign in to the AWS Management Console and open the Amazon Redshift console at https://console.aws.amazon.com/redshift/.

  2. In the navigation pane, click Parameter Groups.

  3. Click Create Cluster Parameter Group.

  4. In the Create Cluster Parameter Group dialog box, type wlmtutorial in the Parameter Group Name box and type WLM tutorial in the Description box. You can leave the Parameter Group Family setting as is. Then click Create.

Step 2: Configure WLM

In this step, you’ll modify the default settings of your new parameter group. You’ll add two new query queues to the WLM configuration and specify different settings for each queue.

To Modify Parameter Group Settings

  1. On the Parameter Groups page of the Amazon Redshift console, click the magnifying glass icon next to wlmtutorial. Doing this opens up the Parameters tab for wlmtutorial.

  2. On the Parameters tab, review the parameters and values. At this point, all of the settings will have default values. The wlm_json_configuration parameter is the one that will be modified when you configure WLM in this tutorial.

  3. Click the WLM tab. Click Add New Queue twice to add two new queues to this parameter group. Configure the queues with the following values.

    • For queue 1, type 2 in the Concurrency box, test in the Query Groups box, and 30 in the % Memory box. Leave the other boxes empty.

      Note

      You can ignore the warning about invalid memory allocation. After you specify memory values to total 100 percent for all of the queues, the message will disappear.

    • For queue 2, type 3 in the Concurrency box, admin in the User Groups box, and 40 in the % Memory box. Leave the other boxes empty.

    • For queue 3, type 30 in the % Memory box. Leave the other boxes empty.

  4. Click Save Changes.

Step 3: Associate the Parameter Group with Your Cluster

In this step, you’ll open your sample cluster and associate it with the new parameter group. After you do this, you’ll reboot the cluster so that Amazon Redshift can apply the new settings to the database.

To Associate the Parameter Group with Your Cluster

  1. In the navigation pane, click Clusters, and then click your cluster to open it. If you are using the same cluster from Amazon Redshift Getting Started, your cluster will be named examplecluster.

  2. On the Configuration tab, click Modify in the Cluster menu.

  3. In the Modify Cluster dialog box, select wlmtutorial from the Cluster Parameter Group menu, and then click Modify.

    The statuses shown in the Cluster Parameter Group and Parameter Group Apply Status will change from in-sync to applying as shown in the following.

    After the new parameter group is applied to the cluster, the Cluster Properties and Cluster Status show the new parameter group that you associated with the cluster. You need to reboot the cluster so that these settings can be applied to the database also.

  4. In the Cluster menu, click Reboot. The status shown in Cluster Status will change from available to rebooting. After the cluster is rebooted, the status will return to available.