Today I will continue my series of blog posts about Oracle Grid Infrastructure 188.8.131.52 and the possibilities of automatic management. The previous posts can be found here, here and here. Now I will proceed and show how to setup and activate the Quality of Service Management that was introduced with 184.108.40.206.
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:
Since the current QoS Status is Disabled, we select “Enable/Disable Quality of Service Management” in the “Availability” Menu:
This brings up the following page where we specify all the required credentials for the cluster itself and the database:
Once this is done, click “Login”. Next step is to specify a password for the APPQOSSYS database user:
Clicking “OK” finishes the process and the target information now shows up with QoS Status as “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.
This will start the assistant where you first have to specify the QoS administator credentials that you set up in the first step.
Maybe this results in an error like this:
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:
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.
Again click “Next” which will bring up the “Review” page where you finally click “Submit Policy Set” to finish the process.
Now the “Dashboard” page is shown where we see the QoS Status is still “Disabled”.
Click on the “Disabled” link:
Click on “Enable QoS Management”:
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.
On the following page click “Copy Policy”:
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”.
Now, I copied this new policy again in order to change the importance to match the night time requirements:
So I end up with these three policies:
Click “Next” until you reach the “Set Policy” page. Select the policy that should be used initially and click “Set Policy”.
The change will be reflected as shown:
Again click “Next” to bring up the “Review” page:
And click “Submit Policy Set” to finally enable all the changes:
Now you can change between your policies by simply clicking “Change Active Policy”.