Você está na página 1de 76

RAC server Pools

What's new in Oracle 12c?

ANJU GARG
Otnyathra 2017 Anju Garg
About me
Oracle Ace
More than 14 years of experience in IT Industry
Oracle Certified Specialist and Expert
Independent Corporate Trainer (Oracle DBA), Author, Speaker
Member - AIOUG, IOUG, UKOUG
Oracle blog : http://oracleinaction.com/
Email : anjugarg66@gmail.com

Otnyathra 2017 Anju Garg 2


Agenda
Resource Management In A Cluster
Administrator Managed configuration
Policy Managed configuration
Policy Based Cluster Management in Oracle 11g
Server Pools
Server Assignment
New Server Assignment
Reallocation of servers
Benefits
Limitations in Oracle 11g
Enhancements in Oracle 12c
Server Categorization
Extended Policy framework
Conclusion
References
Q &A

Otnyathra 2017 Anju Garg 3


Resource Management In A Cluster

Otnyathra 2017 Anju Garg 4


Resource Management In A Cluster
Administrator Managed configuration
Policy Managed configuration

Otnyathra 2017 Anju Garg Resource Management In A Cluster 5


Administrator Managed configuration
Only management strategy available in releases earlier than 11g R2
Administrator statically assigns clusterware resources to specific servers in
the cluster.
Oracle Clusterware is responsible for placing the resources on the specified
servers
Hard coupling between the resources and the servers eliminates resource
sharing .
An inflexible, manual management configuration best suited for smaller
clusters or rather static systems
Cannot scale very well in large clusters having more than 8 nodes.

Otnyathra 2017 Anju Garg Resource Management In A Cluster 6


Policy Managed configuration
Introduced in Oracle Clusterware 11g release 2
The cluster can be logically partitioned into groups of servers called server
pools.
Administrator assigns clusterware resources to Server pools whose size can
change dynamically.
Oracle Clusterware is responsible for placing the resources on the servers
belonging to the specified server pool(s).
Flexible management eliminates the need for static definitions physically
assigning resources to particular nodes in the cluster.
Best suited for larger clusters and scales very well in large clusters having
more than 8 nodes.

Otnyathra 2017 Anju Garg Resource Management In A Cluster 7


Policy Based Cluster Management in Oracle 11g

Otnyathra 2017 Anju Garg 8


Server Pools
Foundation of policy based cluster management
Logical groups of servers hosting the resources managed by Oracle
Clusterware.
Server pools can expand or shrink as requirements change by modifying the
MIN_SIZE and MAX_SIZE attributes of the server pool.
Different IMPORTANCE can be assigned to server pools
Critical workloads can be mapped to server pools of higher IMPORTANCE.
Based on available compute resources in the cluster, Oracle Clusterware will
allocate servers to server pools in order of their IMPORTANCE
Ensures that business critical workload get the compute resources necessary
to satisfy performance or availability service level agreements.

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 9
Server Pool Types
Built-in pools : Created automatically with the installation of the cluster
Generic Server Pool:
Internally managed server pool
All attributes are read-only
Hosts Admininstrator-managed resources.
Free Server Pool:
Internally managed server pool
IMPORTANCE attribute can be edited by the user
Contains servers that are not assigned to any other server pools.
User-created Server Pool
Created by user
MIN_SIZE, MAX_SIZE and IMPORTANCE attribute can be edited
by the user

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 10
Server Assignment
New Server Assignment
Reallocation of servers

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 11
Server Assignment
New Server Assignment

New servers are assigned to server pools in the following order:


Generic server pool
User-created server pool
Fill all server pools in order of importance until they meet their
minimum (MIN_SIZE).
Fill all server pools in order of importance until they meet their
maximum (MAX_SIZE).
Free server pool
Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 12
Illustration-I
New Server Assignment

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g
Illustration-I
New Server Assignment
Environment
Consider a cluster having 9 servers.
Three server pools - FrontOffice Pool, BackOffice pool and Line of Business
(LOB) pool have been defined as shown.
Currently , all the server pools are empty.

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 14
Illustration-I
New Server Assignment
Since FrontOffice Pool has highest IMPORTANCE (=4), and it is below its
MIN_SIZE (=2) , first two servers are assigned to it so that it meets its
MIN_SIZE (=2)

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 15
Illustration-I
New Server Assignment
BackOffice pool which is next in IMPORTANCE (=3) is allocated next
server so that it meets its MIN_SIZE (=1).

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 16
Illustration-I
New Server Assignment
Front office pool is allocated next server so that it meets its MAX_SIZE
(=3).

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 17
Illustration-I
New Server Assignment
Nest two servers are assigned to BackOffice pool so that it meets its
MAX_SIZE (=3).

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 18
Illustration-I
New Server Assignment
LOB pool which is next in IMPORTANCE(=2) is allocated two servers so
that it meets its MAX_SIZE (=2).

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 19
Illustration-I
New Server Assignment
One left over server goes to Free Pool

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 20
Illustration-I
New Server Assignment
Recap
As servers join the cluster, they are assigned to server pools in the
following order:
Generic server pool
User-created server pool
Fill all server pools in order of importance until they meet their
minimum (MIN_SIZE).
Fill all server pools in order of importance until they meet their
maximum (MAX_SIZE).
Free server pool

21
Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g
Server Assignment
Reallocation of servers
If server(s) leave the cluster, a server reallocation between pools may take
place.
If there are servers in the Free Pool
If a server pool falls below its MAX_SIZE value, a free server is moved
from the Free Pool to the affected server pool.
Else (No free servers)
Only if a server pool falls below its MIN_SIZE, a server reallocation will
take place as follows:
Determine the server pool having least IMPORTANCE
If the least IMPORTANT server pool exceeds its MIN_SIZE
Move server to deficient pool
Else (least IMPORTANT server pool <= MIN_SIZE)
If IMPORTANCE of least IMPORTANT server pool < deficient
pool
Move server to deficient pool even if it causes the donor
pool to fall below its MIN_SIZE
Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 22
Illustration-II
Reallocation Of Servers

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g
Illustration-II
Reallocation Of Servers
Environment

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 24
Illustration-II
Reallocation Of Servers
One server leaves FrontOffice Pool so that the pool falls below its
MAX_SIZE value (=3).

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 25
Illustration-II
Reallocation Of Servers
Since a server is available in Free Pool, that server is moved to FrontOffice
Pool

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 26
Illustration-II
Reallocation Of Servers
FrontOffice Pool meets its MAX_SIZE (=3)

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 27
Illustration-II
Reallocation Of Servers
What will happen if front office pool loses another server?

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 28
Illustration-II
Reallocation Of Servers
NOTHING - Since no free servers are available and FrontOffice pool still
has 2 servers (=MIN_SIZE).

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 29
Illustration-II
Reallocation Of Servers
What will happen if FrontOffice pool loses another server?

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 30
Illustration-II
Reallocation Of Servers
If FrontOffice pool loses another server, it is left with only one server and
falls below its MIN_SIZE limit of 2 servers.
A server should be sourced from one of the other pools.
Which pool will become the donor in this case?

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 31
Illustration-II
Reallocation Of Servers
Both the BackOffice and LOB pools exceed their MIN_SIZE but LOB pool is
the least IMPORTANT
Hence, a server is moved from LOB pool to FrontOffice pool

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 32
Illustration-II
Reallocation Of Servers
FrontOffice pool has 2 servers now (=MIN_SIZE).

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 33
Illustration-II
Reallocation Of Servers
What happens if any of FrontOffice or BackOffice Pools fall below their
MIN_SIZE?

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 34
Illustration-II
Reallocation Of Servers
If any of FrontOffice or BackOffice Pools fall below their MIN_SIZE, they
will get the only remaining server in the LOB pool since LOB pool
Exceeds its MIN_SIZE
Has Lowest IMPORTANCE

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 35
Illustration-II
Reallocation Of Servers
What happens if LOB pool is empty,
If FrontOffice pool falls below MIN_SIZE
It can grab server(s) from BackOffice pool so as to meet its
MIN_SIZE even if it requires emptying the BackOffice pool.
If BackOffice pool falls below MIN_SIZE
It can get at most one server to meet its MIN_SIZE (=1) from
FrontOffice pool only if FrontOffice pool exceeds its MIN_SIZE

Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g 36
Illustration-II
Reallocation Of Servers
Recap
If servers leave the cluster for any reason, a server reallocation may take
place as follows:
If a server pool falls below its MAX_SIZE value, a free server, if available,
is moved to the affected server pool.
If there are no free servers, then server from least IMPORTANT pool may
move to the deficient pool only if it has fallen below its MIN_SIZE value.
If the least IMPORTANT server pool exceeds its MIN_SIZE
Donate server to deficient pool
Else (least IMPORTANT server pool <= MIN_SIZE)
Donate server only if deficient pool is more IMPORTANT

37
Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g
Benefits

Fast resource failover: When the number of nodes in the cluster changes,
servers are reallocated online based on defined policy to satisfy workload
capacity requirements.
Dynamic capacity assignment : Server Pools can expand or shrink as
requirements change.
Guaranteed allocation of resources : Critical work will be allocated
required resources preferentially as defined by the policy.
Isolation of resources: Since server pools do not share resources,
dedicated servers can be provided in a cluster for applications and
databases
Useful for future planning: Once resource requirements has been defined
for expected workload, additional capacity, whenever available will be
used instantaneously.

38
Otnyathra 2017 Anju Garg Resource Management In A Cluster
Limitations in Oracle 11g
All servers were assumed to be homogeneous with regard to their CPU
count, physical memory and other characteristics.
Placement of servers in server pools could not be governed by server
attributes.
Sub-optimal performance of applications executing on inadequate
servers
Administrator needed to manually map workload to servers having
appropriate attributes
A burden to the administrator
Error prone
Does not consider the fact that server requirements of applications may
be different at different times of the day, week, or month.

39
Otnyathra 2017 Anju Garg Policy Based Cluster Management In Oracle 11g
Enhancements in Oracle 12c

Otnyathra 2017 Anju Garg


Whats New In Oracle 12c ?
With Oracle clusterware 12c, policy based cluster management is enhanced in
three important ways.
Server Categorization
Extended Policy framework
Unification of policy based cluster management with QOS
Management

Enhancements In Oracle 12c 41


Otnyathra 2017 Anju Garg
Server Categorization
Enables supporting clusters with heterogeneous servers.
Servers can be differentiated based on their attributes which can further
govern placement of servers in the server pools.
Workflow:
Every server has a set of server configuration attributes associated
with it
Servers are further organized into particular categories based on
Role of the node (Hub / Leaf),
Server attributes and
Various conditions
Server categories are associated with server pools so that now server
pools are defined based on server attributes rather than the names of
the servers
Provides an efficient, automated mechanism to allocate compute
resources to server pools based on pre-defined server attributes.

Enhancements In Oracle 12c 42


Otnyathra 2017 Anju Garg
Server Categorization
Server Attributes

As Oracle Clusterware stack is started on a server, these attributes are


automatically discovered and stored persistently for each server until
stack is restarted on the server
Enable Oracle Grid Infrastructure 12c to understand heterogeneous
servers in the cluster
Enhancements In Oracle 12c 43
Otnyathra 2017 Anju Garg
Server Categorization
Server Categories
A new clusterware object
Enables you to organize servers into particular categories.
Two internal categories are created by default
- ora.hub.category : Categorizes Hub Nodes
- ora.leaf.category : Categorizes Leaf Nodes
New user defined server categories can be created
Various attributes of server category are:

A server can belong to multiple categories at the same time.

Enhancements In Oracle 12c 44


Otnyathra 2017 Anju Garg
Server Categorization
Apply Server Categories To Server Pools

Associate Server Pools with Server Categories so that Server pools are
defined based on server attributes such as number of CPUs, CPU speed,
Memory etc. rather than the names of the servers.
Applications can be assigned to the server pools so that they will run on
the servers belonging to a server category.
If a server pool loses a server, free servers of the associated category, if
available, will be moved to the server pool.
If free servers of desired category are not available, servers will be moved
from another lesser IMPORTANT server pool associated with the same
category .
Provides an automated and efficient way to manage environments having
varying workload requirements and servers of different capacities .

Enhancements In Oracle 12c 45


Otnyathra 2017 Anju Garg
Illustration-III
Server categorization

Otnyathra 2017 Anju Garg Enhancements In Oracle 12c


Illustration-III: Server Categorization
Consider a Flex cluster having 3 hub nodes and 2 leaf nodes.
View server attributes
Servers host01, host02 and host03 are Hub Nodes and physical
memory associated with them is greater than 2000 MB
Servers host04 and host05 are Leaf Nodes and physical memory
associated with them is less than 2000 MB

Enhancements In Oracle 12c 47


Otnyathra 2017 Anju Garg
Illustration-III: Server Categorization
View default server categories

Enhancements In Oracle 12c 48


Otnyathra 2017 Anju Garg
Illustration-III: Server Categorization
List servers in the two default categories

Enhancements In Oracle 12c 49


Otnyathra 2017 Anju Garg
Illustration-III : Server Categorization
Create new user defined server categories
Small : Leaf Node and Memory < 2000
Big : Hub Node and Memory >= 2000

Enhancements In Oracle 12c 50


Otnyathra 2017 Anju Garg
Illustration-III : Server Categorization
View user defined new categories

Resource Management In A Cluster 51


Otnyathra 2017 Anju Garg
Illustration-III : Server Categorization
List servers in user defined server categories

Enhancements In Oracle 12c 52


Otnyathra 2017 Anju Garg
Illustration-III : Server Categorization
List categories for servers

Enhancements In Oracle 12c 53


Otnyathra 2017 Anju Garg
Illustration-III : Server Categorization
Create server pools and associate them with big / small server categories
as follows:

Server pool Category


Bigpool Big
Smallpool Small
Testpool Small
Backuppool Big

Enhancements In Oracle 12c 54


Otnyathra 2017 Anju Garg
Illustration-III : Server Categorization
View server pools and associated categories:

Enhancements In Oracle 12c 55


Otnyathra 2017 Anju Garg
Illustration-III : Server Categorization
Recap
Server categorization enables organization of servers into particular
categories by using various server attributes.
A Server pool can be associated with a category so that servers belonging
to the category are eligible to be members of the pool .
Server pools are defined based on server attributes rather than the
names of the servers
Provides an efficient, automated mechanism to manage clusters made up
of heterogeneous nodes.

Enhancements In Oracle 12c 56


Otnyathra 2017 Anju Garg
Extended Policy Framework
Why ?
In Oracle clusterware earlier than 12c, the server pools could be
configured such that each of the applications is assigned to run in its own
server pool.
This configuration, however, does not consider the fact that server time
requirement of some applications might be different at different times of
the day, week, or month.
Server time requirement can vary due to
An anticipated / unanticipated increase in demand for one or more
applications in the cluster.
Planned maintenance operation (a server needs to be taken down for
maintenance)
End-of-month or end-of-year changes in demand
Though server pool properties can be changed to meet such
requirements, it is very cumbersome to do by issuing one command at a
time.

Enhancements In Oracle 12c 57


Otnyathra 2017 Anju Garg
Extended Policy Framework
Overview
Extended Policy Framework in Oracle clusterware 12c provides the
infrastructure to handle the fluctuating requirements for server time
automatically by means of policies.
Create policies corresponding to different business needs such that each
policy contains exactly one definition for each server pool defined in the
system.
These policies collectively represent the cluster configuration policy set.
Different policies need to be activated at different times in accordance
with business needs.
When a policy is activated at a relevant time, configuration of server pools
is changed according to server pool definitions in the policy.
Thus server time allocated to various applications changes automatically
in accordance with changing business needs
Moreover these policies can even be changed dynamically.
A centralized policy-based approach allows you to dynamically allocate
and reallocate resources to various applications in the cluster as the
demand changes.

Enhancements In Oracle 12c 58


Otnyathra 2017 Anju Garg
Illustration-IV
Extended Policy Framework

Otnyathra 2017 Anju Garg Enhancements In Oracle 12c


Illustration-IV: Extended Policy Framework
Environment
User defined server pools: Bigpool, Smallpool, Testpool and Backuppool
Our requirement is as follows:
Night

Enhancements In Oracle 12c 60


Otnyathra 2017 Anju Garg
Illustration-IV: Extended Policy Framework

Add Day and Night Policies

Set the SERVER_POOL_NAMES policy set attribute to define the scope


of the server pools that are controlled by the policy set.

Enhancements In Oracle 12c 61


Otnyathra 2017 Anju Garg
Illustration-IV: Extended Policy Framework
Set Server Pool Attributes In Day Policy

Enhancements In Oracle 12c 62


Otnyathra 2017 Anju Garg
Illustration-IV: Extended Policy Framework
Set Server Pool Attributes In Night Policy

Otnyathra 2017 Anju Garg Enhancements In Oracle 12c 63


Illustration-IV: Extended Policy Framework
View Day Policy

Enhancements In Oracle 12c 64


Otnyathra 2017 Anju Garg
Illustration-IV: Extended Policy Framework
View Night Policy

Enhancements In Oracle 12c 65


Otnyathra 2017 Anju Garg
Illustration-IV: Extended Policy Framework
Activate day policy

Enhancements In Oracle 12c 66


Otnyathra 2017 Anju Garg
Illustration-IV: Extended Policy Framework
Verify that as per the day policy,
Smallpool has been assigned both the small nodes (host04,host05)
Bigpool has been assigned three big nodes (host01,host02,host03)
Testpool and Backuppool have not been assigned any servers

Enhancements In Oracle 12c 67


Otnyathra 2017 Anju Garg
Illustration-IV: Extended Policy Framework
Activate night policy

Enhancements In Oracle 12c 68


Otnyathra 2017 Anju Garg
Illustration-IV: Extended Policy Framework
Verify that as per the night policy
Backuppool has been assigned one big node (host01)
Bigpool has been assigned two big nodes (host02,host03)
Smallpool has been assigned one small node (host05)
Testpool has been assigned one small node (host04)

Enhancements In Oracle 12c 69


Otnyathra 2017 Anju Garg
Illustration-IV: Extended Policy Framework
Modify the configuration of night policy so that backuppool has 2 big
servers and bigpool has 1 big server.
Reactivate the night policy

Enhancements In Oracle 12c 70


Otnyathra 2017 Anju Garg
Illustration-IV: Extended Policy Framework
As per the modified night policy, one big server (host02) has been taken
away from bigpool and has been assigned to backuppool so that bigpool is
left with only one server and backuppool has 2 servers as desired.

Enhancements In Oracle 12c 71


Otnyathra 2017 Anju Garg
Illustration-IV: Extended Policy Framework
Recap
Extended policy framework enables policies to be configured to change
pools in accordance with business needs or application demand
Different policies need to be activated at different times in accordance with
business needs.
When a policy is activated, configuration of server pools is changed
according to server pool definitions in the policy, so that server time
allocated to various applications changes in accordance with changing
business needs
These policies can be changed dynamically.

Enhancements In Oracle 12c 72


Otnyathra 2017 Anju Garg
Summary
Oracle Clusterware 11g release 2 (11.2) laid the foundation of policy based
cluster management by introducing server pools .
Limitations of Policy based management in Oracle clusterware 11g R2 :
As there was no way to distinguish between types of servers, placement
of servers in server pools could not be governed by server attributes.
This configuration does not consider the fact that server requirements of
applications may be different at different times of the day, week, or
month.
Enhancements to Policy based management in Oracle clusterware 12c:
Server Categorization: Servers can be differentiated based on their
attributes which can further govern placement of servers in server pools.
Extended Policy framework: Policies can be configured to change server
pool attributes in accordance with business needs or application
demand, so that pools provide the right service at the right time. The
administrators can maintain a library of policies and switch between
them as required.

Otnyathra 2017 Anju Garg 73


References
https://docs.oracle.com/database/121/CWADD/pbmgmt.htm#CWADD91116
http://www.oracle.com/technetwork/database/options/clustering/learnmore/policy-managed-
deployments12c-twp-2338881.pdf

Otnyathra 2017 Anju Garg 74


75
Otnyathra 2017 Anju Garg
ANJU GARG
Email:anjugarg66@gmail.com
Blog:http://oracleinaction.com

76
Otnyathra 2017 Anju Garg

Você também pode gostar