• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content




My presentation that I gave for AIOUG's annual conference Sangam this year(2012) where I talked about 11.2 RAC concept, Server Pools and QOS(Quality of Service).

My presentation that I gave for AIOUG's annual conference Sangam this year(2012) where I talked about 11.2 RAC concept, Server Pools and QOS(Quality of Service).



Total Views
Views on SlideShare
Embed Views



2 Embeds 26

http://www.linkedin.com 23
https://www.linkedin.com 3



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.


11 of 1 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    SANGAM_2012_Server_Pools_QOS SANGAM_2012_Server_Pools_QOS Presentation Transcript

    • AIOUG-Sangam 2012Server Pools: For Intelligent Resource Management Aman Sharma Aman Sharma (Sangam 2012) 1
    • Who Am I? Aman Sharma About 10+ years using Oracle Database Oracle ACE Frequent Contributor to OTN Database forum(Aman….) Oracle Certified Sun Certified System Administrator @amansharma81 Oracle Blog : http://blog.aristadba.com * Email: amansharma@aristadba.com
    • Presentation Agenda Oracle RAC(pre 11.2), Quick Recap Server Pools Quality of Service Management Q&A Aman Sharma (Sangam 2012) 3
    • Oracle RAC of Pre 11.2 Release: Recap Support for mixed workload environments Services are used for the logical division of the cluster 1:1 mapping exists between the service and the instance Services are mapped to the instances in Preferred and Available mode Manual way of management clust01 Aman Sharma (Sangam 2012) 4
    • Shortcomings of The Traditional Model o Needs to be pre-defined by the DBA explicitly based on the expected workload o Doesn’t consider the dynamic resource allocation requirements , if needed o A hard coupling exists between the service and the instances eliminating resource sharing o Relocation of nodes needs to be done manually o Workloads must be carefully thought and provisioned over the nodes o Can not scale very well in large clusters (for example where #nodes>8) Aman Sharma (Sangam 2012) 5
    • Some Less Heard Statements….• RAC is not just to manage a database and its instances• Any type of resource can be managed over an Oracle RAC cluster• A resource type can be an application, a database, listener or even a process• Sharing resources is a better approach than running workloads in a silo (limiting them on specific nodes)• Its not always a good thing to do it all by yourself Aman Sharma (Sangam 2012) 6
    • Server Pools Aman Sharma (Sangam 2012) 7
    • Server Pools: An Introduction Feature starting from 11.2 Offers the traditional facility of logical division of cluster Nodes are allocated to the pools Resources are hosted over the pools Resource can be an application, a database, a process Policy-managed interface Resource allocation is based on priority continued…. Aman Sharma (Sangam 2012) 8
    • Server Pools: An Introduction contd. No fixed or manually done coupling between an instance and the resource Offers uniform and automatic resource allocation Can be created/managed by both GUI & CLI interfaces Support for traditional way (pre 11.2) to manage resources Can have configuration of Parent-child pools eg OLTP pool serving HR pool and Inventory Pool Easy! Aman Sharma (Sangam 2012) 9
    • Server Pools: Diving Deeper Two pools get created with the installation automatically • Generic pool • Free pool [grid@host01 bin]$ srvctl config serverpool Server pool name: Free Importance: 0, Min: 0, Max: -1 Candidate server names: Server pool name: Generic Importance: 0, Min: 0, Max: -1 Candidate server names: host01,host02,host03 Aman Sharma (Sangam 2012) 10
    • Server Pools: Diving Deeper contd…. Generic server pool – Built-in, gets created with the installation – All attributes are read-only only – Contains nodes either from an upgraded cluster or for an Admin- managed database – Allows the control to be with the DBA for resource management (as of pre 11.2 release) Free server pool – Built-in, gets created with the installation – All attributes are read only except for IMP and ACL – Is the default pool to which the nodes are assigned after a fresh clusterware installation – Nodes from Free pool are allocated to the other pools whenever required Aman Sharma (Sangam 2012) 11
    • Server Pools : 3-node RAC (11201) [grid@host01 bin]$ srvctl config serverpool -g Free Server pool name: Free Importance: 0, Min: 0, Max: -1 Candidate server names: [grid@host01 bin]$ srvctl config serverpool -g Generic PRKO-3160 : Server pool Generic is internally managed as part of administrator- managed database configuration and therefore cannot be queried directly via srvpool object. Aman Sharma (Sangam 2012) 12
    • Server Pool: Attributes The complete list is long! 3 attributes are most important-MIN_SIZE, MAX_SIZE, IMPORTANCE • MIN_SIZE : minimum number of nodes for the server pool, 0(default) • MAX_SIZE : maximum number of nodes for the server pool, -1(default) • IMPORTANCE : defines the priority of the server pool using number from 0- 1000, higher the number, higher the importance [grid@host01 ~]$ crsctl status serverpool -p NAME=Free IMPORTANCE=0 MIN_SIZE=0 MAX_SIZE=-1 SERVER_NAMES= PARENT_POOLS= EXCLUSIVE_POOLS= ACL=owner:grid:rwx,pgrp:oinstall:rwx,other::r-x NAME=Generic IMPORTANCE=0 MIN_SIZE=0 MAX_SIZE=-1 SERVER_NAMES=host01 host02 host03 PARENT_POOLS= EXCLUSIVE_POOLS= ACL=owner:grid:r-x,pgrp:oinstall:r- x,other::r-x NAME=ora.orcladm IMPORTANCE=1 MIN_SIZE=0 MAX_SIZE=-1 SERVER_NAMES=host01 host02 host03 PARENT_POOLS=Generic EXCLUSIVE_POOLS= ACL=owner:oracle:rwx,pgrp:oinstall:rwx,other::r-- Aman Sharma (Sangam 2012) 13
    • Server Pools: How Nodes Are Added The allocation is based on IMP (Importance) The order followed is, • Generic • DBA defined pool • Free Nodes after a new installation are added to Free pool Initially pools are filled to meet their MIN_SIZE Pools with highest IMP would be filled to their MAX_SIZE Unassigned nodes remain with the Free pool Nodes assigned to Parent pools are exclusive to them Nodes can be shared by Child Pools provided that the attribute Exclusive_Pools is not set Aman Sharma (Sangam 2012) 14
    • FREE Pool OLTP_SP DSS_SP BKP_SPMIN_SIZE=1,Max_SIZE=3 MIN_SIZE=1,Max_SIZE=1 MIN_SIZE=1,Max_SIZE=1 IMP=3 IMP=2 IMP=1 Aman Sharma (Sangam 2012) 15
    • Server Pool: Parent & Child Pool Creating a Parent Pool[grid@host01 ~]$ crsctl add serverpool sp1 -attr "MIN_SIZE=1, MAX_SIZE=1, IMPORTANCE=2" [grid@host01 Disk1]$ crsctl status serverpool NAME=Free ACTIVE_SERVERS=host01 host03 NAME=Generic ACTIVE_SERVERS= NAME=sp1 ACTIVE_SERVERS=host02 Creating a Child Pool[grid@host01 Disk1]$ crsctl add serverpool sp_child1 -attr "PARENT_POOLS=sp1, MIN_SIZE=1, MAX_SIZE=1, IMPORTANCE=2"[grid@host01 Disk1]$ crsctl status serverpoolNAME=Free ACTIVE_SERVERS=host01 host03NAME=Generic ACTIVE_SERVERS=NAME=sp1 ACTIVE_SERVERS=host02 NAME=sp_child1 ACTIVE_SERVERS=host02 Aman Sharma (Sangam 2012) 16
    • Server Pool: Handling of Node Crashes  Controlled by MIN_SIZE and IMP attributes  Nodes within Parent pools are non-shareable  Nodes in the child pools may be shareable  If pool has #nodes <MIN_SIZE, node relocation may happen from the other pools  The grantor-pool must have MIN_SIZE< requestor-pool  If IMP of grantor pool< requestor-pool – Relocation would happen even if #nodes <MIN_SIZE after relocation  If IMP of grantor pool >= requestor-pool – Relocation would happen only if #nodes>MIN_SIZE Aman Sharma (Sangam 2012) 17
    • Server Pools: New Database Types  Two new Types  Admin managed  Policy managed  Admin Managed Database – Traditional type of database management – Uses the Preferred/Available configuration – Creates an internally managed Child pool under the Generic pool – Allows manual allocation of the instances to the nodes by the DBA – Requires nodes to be pinned – Good for cluster with lesser numbered nodes continued…. Aman Sharma (Sangam 2012) 18
    • Server Pools: New Database Types contd. • Policy managed database – From 11.2 onwards, automatic – Allows dynamic resource allocation within the server pools – Resource allocation is based on IMP – No hard-coupling between a resource & instance – Requires nodes to be unpinned – Allows Services to run as Singleton/Uniform – Is good for cluster with large number of nodes Policy managed database can NOT run on the same node that already hosts an Admin managed database! Aman Sharma (Sangam 2012) 19
    • [grid@host01 Disk1]$ srvctl config database -d orcladmDatabase unique name: orcladmDatabase name: orcladmOracle home: /u01/app/oracle/product/11.2.0/dbhome_1Oracle user: oracleSpfile: +FRA/orcladm/spfileorcladm.oraDomain:Start options: openStop options: immediateDatabase role: PRIMARYManagement policy: AUTOMATICServer pools: orcladmDatabase instances: orcladm1,orcladm2Disk Groups: FRAServices:Database is administrator managedAdmin managed database can be converted to Policy managed butnot the vice-versa! Aman Sharma (Sangam 2012) 20
    • Server Pools: Creation & Management Enterprise Manager DBCA(For database pools) SRVCTL CRSCTL [grid@host01 ~]$ crsctl add serverpool DWH -attr "MIN_SIZE=1, MAX_SIZE=1, IMPORTANCE=1" [grid@host01 ~]$ crsctl add serverpool OLTP -attr "MIN_SIZE=1, MAX_SIZE=1, IMPORTANCE=2" Aman Sharma (Sangam 2012) 21
    • Server Pools: Creation/Management by EM Aman Sharma (Sangam 2012) 22
    • Server Pools : Services Creation & Types  Services can be created for both Admin & Policy managed database types  Using either SRVCTL or EM  Services do NOT span across server pools  For Admin-managed, services follow Preferred/Available model $srvctl add service -d ORCLDB -s HR -r ORCLDB1 -a ORCLDB2  For Policy-managed, services use two new modes, – Singleton service – Uniform service $srvctl add service -d ORCL -s INVENTORY -g SP1 -c SINGLETON $srvctl add service -d ORCL -s PRODUCTION -g SP2 -c UNIFORM Aman Sharma (Sangam 2012) 23
    • Server Pools: Service Modes for PolicyManaged database Singleton mode – Service runs on just ONE node within the server pool – Clusterware chooses the node automatically – Upon node-crash, service fails over to any other node within the same server pool Uniform mode – Service runs on all the nodes within the server pool – A more preferred way as many small sized machines can be used to host the resources Aman Sharma (Sangam 2012) 24
    • Server Pools: At a Glance• Allow a DBA to logically divide a cluster• Allow to have the workload segregated across the pools rather than the nodes• Can provide a more dynamic way of resource management as resources are not tied up with the nodes permanently• Pool reconfigurations happen automatically(when a node leaves or joins the cluster, automatically) Aman Sharma (Sangam 2012) 25
    • Is it Enough? Aman Sharma (Sangam 2012) 26
    •  Companies run mixed applications on clusters with varying workloads Workload predictions can’t be forecasted with absolute certainty For business related workloads, to meet SLA’s, at times, varying system resources may be anticipated, for example more CPU power or memory Server pools can only manage the resource reallocations related to the nodes joining or leaving the cluster Real time analysis is required to cater request-based workloads Performance bottlenecks detection should be in real-time by some intelligent system and get resolved e.g. by reallocating the resources Aman Sharma (Sangam 2012) 27
    • Quality of Service Management Aman Sharma (Sangam 2012) 28
    • Quality of Service(QoS) Management  An automatic, policy-based mechanism  Introduced first with 11gR2, for Exadata exclusively  With, limited functionality is available for non-exadata environments as well (only monitoring)  Monitors and adjusts the resource needs for optimal performance  Identifies performance bottlenecks and can advise the DBA to relocate the resources based on it  Responds to the changes in the system configurations and demands  Can NOT tune applications or databases  Improves response time by measuring, – Time spent in using the resource – Time waited to use the resource Aman Sharma (Sangam 2012) 29
    • QoS, RAC, Server-pools & Services  QOS works along with • Oracle RAC • Clusterware • Cluster Health Monitor  Services run in a cluster over the server pools  QoS Monitors the nodes of the pools for the CPU wait time  If the workloads are not acceptable as per the defined policy, QoS can recommend • To adjust the size of the server pools • To alter resource plans, if configured any • To adjust CPU resource allocated to the nodes hosting instances in the pool using Instance-caging  CHM provides QoS real-time memory usage information  If QoS finds that a node is memory starved, it may take corrective actions- for example, it may stop the services on that node  Once the crisis is over, the services are auto-started and new connections can spawn Aman Sharma (Sangam 2012) 30
    • QoS: Building Blocks  Performance Class- Collection of (similar) work requests • Performance class rank  Highest, High, Medium, Low , Lowest  Performance Objectives • Average response time per database call  Performance Metrics- To identify bottlenecks • Performance metric  Where time is spent • Resource metric  Time spent to either use or wait for a resource  Performance Satisfaction Metric • +100% to -100%  Performance Policy- • Combination of Performance Objectives + Performance Class Rank(at least one Performance Class) • Only one policy at one time  Policy Set • Contains Server Pools, Performance Classes , Performance Policy • XML file Aman Sharma (Sangam 2012) 31
    • QoS: DashboardSource: http://docs.oracle.com/cd/E11882_01/server.112/e24611/apqos_admin.htm#CHDFGABD Aman Sharma (Sangam 2012) 32
    • QoS: Performance Overview Source: http://docs.oracle.com/cd/E11882_01/server.112/e24611/apqos_admin.htm#CHDFGABD Aman Sharma (Sangam 2012) 33
    • QoS: Checklist Policy Managed Database hosted over server pools Database release >= Server Pools  Must be explicitly created  Must be marked as “managed” in the Performance Policy  Generic pool hosted db or Admin managed db can’t be used Only OLTP type workload Support Services  Type should be Uniform  For Singleton, server pool must have MAX_SIZE=1  Must be managed by the Clusterware Aman Sharma (Sangam 2012) 34
    • Summary QoS and Server Pools, together, enable a DBA to meet performance goals more effectively Provide an automatic and real-time monitoring system Help in detecting and eliminating performance bottlenecks in real-time Performance SLA’s are more achievable Workload changes won’t destabilize the systemAnd Easy to set up and use so give it a try! Aman Sharma (Sangam 2012) 35
    • References and further reading…. Server Pools & Policy Managed db – http://www.oracle.com/us/rac/index.html QoS – http://www.oracle.com/technetwork/products/cl ustering/overview/qosmanageent-508184.html Oracle documentation – http://tahiti.oracle.com Demos – http://otn.oracle/obe Aman Sharma (Sangam 2012) 36
    • Thank You Aman Sharma (Sangam 2012) 37