Need For Policy Managed Databases: Importance

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

NEED FOR POLICY MANAGED DATABASES

- As the number of nodes become large, DBA’s tasks became very complicated .
- It was not possible to add more instances dynamically to newly added servers .
- It was not possible for additional instances of database to start automatically as some
servers in the cluster became idle.
– It was not possible for a service to be available on newly added nodes dynamically.

Now, from Oracle 11g R.2 RAC all these tasks are automated using server pool , a new
feature of Oracle 11g RAC. Server Pools logically divide the cluster into small segments
that can be used for varying workloads. Now databases and services can be defined to
run in server pools. And servers in the server pools can change dynamically.

Oracle 11g R2 introduced server pools in which we could divide the cluster into smaller
server pools. Each pool could be assigned some attributes:

IMPORTANCE : 0(default) to 1000 – It is used to determine how to reconfigure the


servers in various pools when a node joins/leaves the cluster. Using importance
parameter you can ensure that low precedence workload doesn’t eat up more
resources.

MAX_SIZE: The maximum number of servers a server pool can contain. Default value
is -1 which indicates means that all the servers in the cluster can be a part of this pool.

MIN_SIZE: The minimum size of a server pool. If the number of servers contained in a
server pool is below the number you specify in this attribute, then Oracle Clusterware
automatically moves servers from other pools into this one until that number is met. The
default value is 0.

ACL: String in the following


format:owner:user:rwx,pgrp:group:rwx,other::r— Defines the owner of the server
pool and which privileges are granted to various operating system users and groups.

 r: Read only
 w: Modify attributes of the pool or delete it
 x: Assign resources to this pool
- Generic Pool: The servers in the pool are used to host Admin Managed databases.
.This is an internally managed server pool and the modification of the attributes of this
pool is not allowed.

Free Pool: All the servers which have not been assigned to any pool are part of this
pool. When the clusterware starts , initially all the servers are assigned to this pool only.
As applications start, servers move from this pool to Generic or user defined pool
dynamically.

The allocation of the hosts is going to be happening in the following order


1. Generic Pool
2. user-created pool
3. Free Pool

Oracle Clusterware continues to assign servers to server pools until the


followingconditions are met:
1. Fill all server pools in order of importance until they meet their minimum.
2. Fill all server pools in order of importance until they meet their maximum.
3. By default any left over go to FREE.

Using these mechanisms, server pools can maintain an optimal level of resources
based on current no. of servers that are available.

Simulation:

scenario:
Nodes in the cluster : host01, host02, host03

- Let’s see the current status of server pools


#crsctl status serverpool
NAME=Free
ACTIVE_SERVERS=host01 host02 host03
NAME=Generic
ACTIVE_SERVERS=

- create a serverpool pool mypool with min = 2, max = 2, imp = 1


[root@host02 host02]# srvctl add srvpool -g mypool -l 2 -u 2 -i 1

- check that two servers have been allocated to mypool from free pool

[root@host02 host02]# crsctl stat serverpool

NAME=Free
ACTIVE_SERVERS=host01
NAME=Generic
ACTIVE_SERVERS=
NAME=ora.mypool
ACTIVE_SERVERS=host02 host03

- Add another server pool mypool1 with min = 2, max = 2, imp = 1

[root@host02 host02]# srvctl add srvpool -g mypool1 -l 2 -u 2 -i 1

- check that one server has been allocated to mypool1 from free pool

[root@host02 host02]# crsctl stat serverpool

NAME=Free
ACTIVE_SERVERS=
NAME=Generic
ACTIVE_SERVERS=
NAME=ora.mypool
ACTIVE_SERVERS=host02 host03
NAME=ora.mypool1
ACTIVE_SERVERS=host01

- Increase the importance of mypool1 to 2

[root@host02 host02]# srvctl modify srvpool -g mypool1 -i 2

- Check that one server has been moved from mypool of lower importance(1) to
mypool of higher importance (2)
[root@host02 host02]# crsctl stat serverpool

NAME=Free
ACTIVE_SERVERS=
NAME=Generic
ACTIVE_SERVERS=
NAME=ora.mypool
ACTIVE_SERVERS=host03
NAME=ora.mypool1
ACTIVE_SERVERS=host01 host02

- Increase the importance of mypool to 3

[root@host02 host02]# srvctl modify srvpool -g mypool -i 3

- Check that one server has been moved from mypool1 to mypool

[root@host02 host02]# crsctl stat serverpool

NAME=Free
ACTIVE_SERVERS=
NAME=Generic
ACTIVE_SERVERS=
NAME=ora.mypool
ACTIVE_SERVERS=host02 host03
NAME=ora.mypool1
ACTIVE_SERVERS=host01

- Cleanup –

[root@host02 host02]# srvctl remove srvpool -g mypool1

[root@host02 host02]# srvctl remove srvpool -g mypool


WIth the introduction of server pools, we can have two management styles for RAC
database.

Administrator managed databases (similar to what we had prior to 11g R2)


. DBA defines which servers should the database run on
. DBA decides the servers (preferred/available nodes) on which services of the
database should run.
. DBA decides which instance of the database will run on which server.
. This database type would assign the instances to a child pool of the default pool
available Generic pool.

Although this type seems to be much simpler, this can’t be used when the number of
nodes pass a number which is difficult to manage by a DBA, for example 100. In that
case, the next type of the 11.2 database would be helpful-Policy Managed database.

Policy Managed Databases


- The database can be associated with a server pool rather than a specific set of nodes.
It will decide the minimum and maximum no. of servers needed by that resource
(database , service, third party application).
- The database will run on the servers which have been allocated to the serverpool it
has been assigned to.
- Since servers allocated to the server pool can change dynamically, this would allow
Oracle to dynamically deliver services based on the total no. of servers available to the
cluster.
. The database will started on enough servers subject to the availability of the servers.
. We need not hardcode the servers a database should run on.
. Any instance of the database can run on any node. There is no fixed mapping
between instance number and node.
. As servers are freed/added/deleted, they will be allocated to existing pools as per the
rules mentioned earlier.

For example, if a cluster consisted of eight nodes in total and supported three RAC
databases. Each database would be defined with a minimum and maximum number of
servers. Let’s assume that

DB1 is defined with a minimum of 4 and a maximum of 6 with an importance of 10,


DB2 is defined with a minimum of 2 and maximum of 3 and an importance of 7, and
DB3 is set to a minimum of 2 and maximum of 3 with an importance of 5.
Initially the 8 nodes could be configured as nodes 1-4 allocated to DB1, nodes 5-6
allocated to DB2 and nodes 7-8 allocated to DB3. If node 3 failed for some reason, the
system would allocate node 7 or 8 to DB1 because it has a higher importance than DB3
and a minimum requirement of 4 servers, even though it would cause DB3 to fall below
the minimum number of servers. If node 3 is re-enabled it would be allocated
immediately to DB3 to bring that database back to its minimum required servers.

If a 9th node were added to the cluster, it would be assigned to DB1 because of the
importance factor and the fact that DB1 has not yet hit its maximum number of servers.

Converting a database to policy managed:

You might also like