Using Quality of Service to manage Server Pool Policies

Today I will continue my series of blog posts about Oracle Grid Infrastructure 12.1.0.2 and the possibilities of automatic management. The previous posts can be found herehere and here. Now I will proceed and show how to setup and activate the Quality of Service Management that was introduced with 12.1.0.2.

1. Prepare Clusterware

In order to enable QoS for the cluster, we need to set a password for the QoS administrator. To do that, OC4J needs to be stopped.

[oracle@vm101 ~]$ srvctl status oc4j
OC4J is enabled
OC4J is running on node vm102

[oracle@vm101 ~]$ srvctl stop oc4j

Now we can set the password:

[oracle@vm101 ~]$ qosctl qosadmin -setpasswd qosadmin
New password:
Confirm new password:
User qosadmin modified successfully.

Optionally, we can also add more administrative users for QoS management:

[oracle@vm101 ~]$ qosctl qosadmin -adduser mmischke
QoS administrator password:
New password:
Confirm new password:
User mmischke added successfully.

Now that the password is set, OC4J can be restarted again activating the changes:

[oracle@vm101 ~]$ srvctl start oc4j
[oracle@vm101 ~]$ srvctl status oc4j
OC4J is enabled
OC4J is running on node vm101

2. Enable QoS Management at Database level

Each database running in the cluster must be enabled for QoS. This can be done using Cloud Control. Simply navigate to the home page of the cluster database target and follow these steps.

We can check the current status of the target by clicking on the information link right beside the target name:

qos-disabled

Since the current QoS Status is Disabled, we select “Enable/Disable Quality of Service Management” in the “Availability” Menu:

qos-enable-2

This brings up the following page where we specify all the required credentials for the cluster itself and the database:

qos-enable-3

Once this is done, click “Login”. Next step is to specify a password for the APPQOSSYS database user:

qos-enable-4

Clicking “OK” finishes the process and the target information now shows up with QoS Status as “Enabled”.

qos-enabled

That’s it for the database. If you plan to create several databases, you may consider scripting this process. MOS Note 2001997.1 has more information about that.

3. Create Policy Set

The last step is to create a Policy Set. Therefore navigate to the home page of the Cluster target and select “Create Policy Set” from the “Adminstration” menu.

create-policyset-1

This will start the assistant where you first have to specify the QoS administator credentials that you set up in the first step.

create-policyset-2

Maybe this results in an error like this:

create-policyset-1-fail

This is because Cloud Control uses the short hostname for whatever reason which cannot bet resolved. I worked around that by adding the cluster hosts to /etc/hosts. After that the login was successful and the assistant continues. The existing server pools will show up. Select “Manage” for all of them:

create-policyset-3a

Go through all the following steps by clicking “Next” until you reach the “Set Policy” page. Click “Set Policy” to make the selected policy the active one.

create-policyset-7a

Again click “Next” which will bring up the “Review” page where you finally click “Submit Policy Set” to finish the process.

create-policyset-8

Now the “Dashboard” page is shown where we see the QoS Status is still “Disabled”.

create-policyset-9-finish

Click on the “Disabled” link:

create-policyset-10-finish

Click on “Enable QoS Management”:

create-policyset-11-finish

Done. That’s it.

4. Create another Policy Set and edit it

You may want to have more than one policy set to match different situations. The easiest way is to create a copy of the existing policy. Select “Edit Policy Set” from the “Administration” menu of the cluster target home page.

edit-policyset-1

On the following page click “Copy Policy”:

edit-policyset-2

Now we can change all the settings. First, set a suitable name for the new policy. Then set all the other parameters to match your needs. For my example I changed the ranking. Then click “OK”.

edit-policyset-3

Now, I copied this new policy again in order to change the importance to match the night time requirements:

edit-policyset-4

So I end up with these three policies:

edit-policyset-5

Click “Next” until you reach the “Set Policy” page. Select the policy that should be used initially and click “Set Policy”.

edit-policyset-6

The change will be reflected as shown:

edit-policyset-6a

Again click “Next” to bring up the “Review” page:

edit-policyset-7

And click “Submit Policy Set” to finally enable all the changes:

edit-policyset-8

Now you can change between your policies by simply clicking “Change Active Policy”.

5. Further Information

Database Quality of Service Management User’s Guide

How to enable QoS Management functionality in a database without using EM Cloud Control (Doc ID 2001997.1)

Oracle RAC SIG – Ensuring Your Oracle RAC Databases Meet Your Business Objectives at Runtime

Advertisements