12c/11g feature : Serverpools in Action

Current Configuration

Create 2 new Serverpools  srvctl add serverpool  -serverpool TOP_PRIORITY  -min 1 -max 2 -i 10srvctl add serverpool  -serverpool STANDARD_PRIORITY  -min 1 -max 2 -i 5

[root@gract1 Desktop]# olsnodes -s 
gract1    Active
gract2    Inactive
gract3    Active

#   crsctl get node role status -all
Node 'gract1' active role is 'hub'
Node 'gract3' active role is 'hub'
--> In our flex cluster node gract2 isn't available yet 

------ RAC Database Info ---------
Database name: dw Server pools: STANDARD_PRIORITY 
Instance dw_2 is running on node gract3

Database name: ERP Server pools: TOP_PRIORITY 
Instance ERP_3 is running on node gract1
--> ERP database is using TOP_PRIORITY pool   -> only one instance was running 
     DW database is using  STANDARD_PRIORITY  -> only one instance was running  

------ Serverpool Info Config ---------
NAME=Free                          IMPORTANCE=0        MIN_SIZE=0          MAX_SIZE=-1         SERVER_CATEGORY=                    
NAME=ora.TOP_PRIORITY              IMPORTANCE=10       MIN_SIZE=1          MAX_SIZE=2          SERVER_CATEGORY=ora.hub.category    
NAME=ora.STANDARD_PRIORITY         IMPORTANCE=5        MIN_SIZE=1          MAX_SIZE=2          SERVER_CATEGORY=ora.hub.category    

------ Serverpool Info ---------
Server pool name: Free             Active servers count: 0            Active server names:                

Server pool name: TOP_PRIORITY     Active servers count: 1            Active server names: gract1         
           NAME=gract1 STATE=ONLINE 
Server pool name: STANDARD_PRIORITYActive servers count: 1            Active server names: gract3         
           NAME=gract3 STATE=ONLINE

Use Case #1: A new server gract2 joins our serverpools

Action : restart crs stack on gract2
[root@gract2 ~]# crsctl start crs
CRS-4123: Oracle High Availability Services has been started.
------ Server Info ---------
NAME=gract1                        ACTIVE_POOLS=ora.TOP_PRIORITY      ACTIVE_CSS_ROLE=hub
NAME=gract2                        ACTIVE_POOLS=ora.TOP_PRIORITY      ACTIVE_CSS_ROLE=hub
NAME=gract3                        ACTIVE_POOLS=ora.STANDARD_PRIORITY ACTIVE_CSS_ROLE=hub

------ RAC Database Info ---------
Database name: dw Server pools: STANDARD_PRIORITY
Instance dw_2 is running on node gract3

Database name: ERP Server pools: TOP_PRIORITY
Instance ERP_1 is running on node gract2
Instance ERP_3 is running on node gract1

------ Serverpool Info Config ---------
NAME=Free                          IMPORTANCE=0        MIN_SIZE=0          MAX_SIZE=-1         SERVER_CATEGORY=
NAME=ora.TOP_PRIORITY              IMPORTANCE=10       MIN_SIZE=1          MAX_SIZE=2          SERVER_CATEGORY=ora.hub.category
NAME=ora.STANDARD_PRIORITY         IMPORTANCE=5        MIN_SIZE=1          MAX_SIZE=2          SERVER_CATEGORY=ora.hub.category

------ Serverpool Info ---------
Server pool name: Free             Active servers count: 0            Active server names:

Server pool name: TOP_PRIORITY     Active servers count: 2            Active server names: gract1,gract2
NAME=gract1 STATE=ONLINE           NAME=gract2 STATE=ONLINE
Server pool name: STANDARD_PRIORITY Active servers count: 1            Active server names: gract3
NAME=gract3 STATE=ONLINE

Pool status

  • all MIN_SIZE parameter are satisfied – for both pools MAX_SIZE parameter isn’t reached
  • server gract2 joins TOP_PRIORITY pool as this pool has a higher priority than STANDARD_PRIORITY
  • as ERP database is assigned to TOP_PRIORITY an new instance ERP_1 is now runnung in gract2

 

Use Case #2 : DW database instance is not heavily used – run ERP instance on server for DW database too

 
Action : Distributed ERP database on both pools
         Attach database ERP to  STANDARD_PRIORITY and TOP_PRIORITY pool
         Increase MAX_SIZE prameter to 3 for TOP_PRIORITY pool
 
[root@gract2 ~]# srvctl modify  database -d ERP -g  STANDARD_PRIORITY,TOP_PRIORITY
[root@gract1 ~]# srvctl modify  serverpool  -serverpool  ora.TOP_PRIORITY -min 1  -max 3 -fa 
[grid@gract1 ~/PM]$ get_pool.sh
------ Server Info ---------
NAME=gract1                        ACTIVE_POOLS=ora.TOP_PRIORITY      ACTIVE_CSS_ROLE=hub                 
NAME=gract2                        ACTIVE_POOLS=ora.TOP_PRIORITY      ACTIVE_CSS_ROLE=hub                 
NAME=gract3                        ACTIVE_POOLS=ora.STANDARD_PRIORITY ACTIVE_CSS_ROLE=hub                 

------ RAC Database Info ---------
Database name: dw Server pools: STANDARD_PRIORITY 
Instance dw_2 is running on node gract3

Database name: ERP Server pools: STANDARD_PRIORITY,TOP_PRIORITY 
Instance ERP_1 is running on node gract2
Instance ERP_2 is running on node gract3
Instance ERP_3 is running on node gract1

------ Serverpool Info Config ---------
NAME=Free                            IMPORTANCE=0        MIN_SIZE=0          MAX_SIZE=-1         SERVER_CATEGORY=                      
NAME=ora.TOP_PRIORITY                IMPORTANCE=10       MIN_SIZE=1          MAX_SIZE=3          SERVER_CATEGORY=ora.hub.category      
NAME=ora.STANDARD_PRIORITY           IMPORTANCE=5        MIN_SIZE=1          MAX_SIZE=1          SERVER_CATEGORY=ora.hub.category      

------ Serverpool Info ---------
Server pool name: Free             Active servers count: 0            Active server names:                

Server pool name: TOP_PRIORITY     Active servers count: 2            Active server names: gract1,gract2  
           NAME=gract1 STATE=ONLINE           NAME=gract2 STATE=ONLINE 
Server pool name: STANDARD_PRIORITYActive servers count: 1            Active server names: gract3         
           NAME=gract3 STATE=ONLINE

Pool status

  • Note ERP database is attached to STANDARD_PRIORITY and TOP_PRIORITY pool
  • ERP database runs on both pools and all three servers
  • ERP database runs now 3 instances whereas DW still runs only with 1 instance

Use case #3: DW instance needs more resources – add a server to STANDARD_PRIORITY pool

Action : Increase  MIN_SIZE to 2 on  STANDARD_PRIORITY pool to run DW database with 2 instances
         srvctl modify  serverpool  -serverpool  ora.STANDARD_PRIORITY  -min 2
------ Server Info ---------
NAME=gract1                        ACTIVE_POOLS=ora.TOP_PRIORITY      ACTIVE_CSS_ROLE=hub                 
NAME=gract2                        ACTIVE_POOLS=ora.STANDARD_PRIORITY ACTIVE_CSS_ROLE=hub                 
NAME=gract3                        ACTIVE_POOLS=ora.STANDARD_PRIORITY ACTIVE_CSS_ROLE=hub                 

------ RAC Database Info ---------
Database name: dw Server pools: STANDARD_PRIORITY 
Instance dw_1 is running on node gract2
Instance dw_2 is running on node gract3

Database name: ERP Server pools: STANDARD_PRIORITY,TOP_PRIORITY 
Instance ERP_1 is running on node gract2
Instance ERP_3 is running on node gract1
Database ERP is not running on node gract3

------ Serverpool Info Config ---------
NAME=Free                            IMPORTANCE=0        MIN_SIZE=0          MAX_SIZE=-1         SERVER_CATEGORY=                      
NAME=ora.TOP_PRIORITY                IMPORTANCE=10       MIN_SIZE=1          MAX_SIZE=2          SERVER_CATEGORY=ora.hub.category      
NAME=ora.STANDARD_PRIORITY           IMPORTANCE=5        MIN_SIZE=2          MAX_SIZE=2          SERVER_CATEGORY=ora.hub.category      

------ Serverpool Info ---------
Server pool name: Free             Active servers count: 0            Active server names:                

Server pool name: TOP_PRIORITY     Active servers count: 1            Active server names: gract1         
           NAME=gract1 STATE=ONLINE 
Server pool name: STANDARD_PRIORITYActive servers count: 2            Active server names: gract2,gract3  
           NAME=gract2 STATE=ONLINE           NAME=gract3 STATE=ONLINE

Pool status

  • server gract2 moved from  TOP_PRIORITY to  STANDARD_PRIORITY to satisfy MIN_SIZE=2 property
  • as DW database is attached to pool STANDARD_PRIORITY poll  a new instance for DW database is started on gract2
  • ERP database runs only with 2 instances as MAX_SIZE is set to 2

 

Use case #4: Even distribute database ERP and DW on all servers

Action : Attach both database to both pools 
[root@gract1 ~]#  srvctl modify  database -d ERP -g  STANDARD_PRIORITY,TOP_PRIORITY
[root@gract1 ~]#  srvctl modify  database -d DW -g  STANDARD_PRIORITY,TOP_PRIORITY
------ RAC Database Info ---------
Database name: dw Server pools: STANDARD_PRIORITY,TOP_PRIORITY 
Instance dw_1 is running on node gract2
Instance dw_2 is running on node gract3
Database dw is not running on node gract1

Database name: ERP Server pools: STANDARD_PRIORITY,TOP_PRIORITY 
Instance ERP_1 is running on node gract2
Instance ERP_3 is running on node gract1
Database ERP is not running on node gract3

------ Serverpool Info Config ---------
NAME=Free                            IMPORTANCE=0        MIN_SIZE=0          MAX_SIZE=-1         SERVER_CATEGORY=                      
NAME=ora.TOP_PRIORITY                IMPORTANCE=10       MIN_SIZE=1          MAX_SIZE=2          SERVER_CATEGORY=ora.hub.category      
NAME=ora.STANDARD_PRIORITY           IMPORTANCE=5        MIN_SIZE=2          MAX_SIZE=2          SERVER_CATEGORY=ora.hub.category      

------ Serverpool Info ---------
Server pool name: Free             Active servers count: 0            Active server names:                

Server pool name: TOP_PRIORITY     Active servers count: 1            Active server names: gract1         
           NAME=gract1 STATE=ONLINE 
Server pool name: STANDARD_PRIORITYActive servers count: 2            Active server names: gract2,gract3  
           NAME=gract2 STATE=ONLINE           NAME=gract3 STATE=ONLINE 

Pool Status:
 Due to MAXSIZE=2 set for both pools only 2 instance for each database were running 

Fix : set MAX_SIZE=3 for both pools
[root@gract1 ~]#  srvctl modify  serverpool  -serverpool  ora.TOP_PRIORITY  -max 3
[root@gract1 ~]#  srvctl modify  serverpool  -serverpool  STANDARD_PRIORITY -max 3

Note: In above case the instance wasn't started automatically I need to start the instances using srvctl 
[grid@gract1 ~/PM]$ srvctl start database -d erp
[grid@gract1 ~/PM]$ srvctl start database -d dw 
------ RAC Database Info ---------
Database name: dw Server pools: STANDARD_PRIORITY,TOP_PRIORITY 
Instance dw_1 is running on node gract2
Instance dw_2 is running on node gract3
Instance dw_3 is running on node gract1

Database name: ERP Server pools: STANDARD_PRIORITY,TOP_PRIORITY 
Instance ERP_1 is running on node gract2
Instance ERP_2 is running on node gract3
Instance ERP_3 is running on node gract1

------ Serverpool Info Config ---------
NAME=Free                            IMPORTANCE=0        MIN_SIZE=0          MAX_SIZE=-1         SERVER_CATEGORY=                      
NAME=ora.TOP_PRIORITY                IMPORTANCE=10       MIN_SIZE=1          MAX_SIZE=3          SERVER_CATEGORY=ora.hub.category      
NAME=ora.STANDARD_PRIORITY           IMPORTANCE=5        MIN_SIZE=2          MAX_SIZE=3          SERVER_CATEGORY=ora.hub.category      

------ Serverpool Info ---------
Server pool name: Free             Active servers count: 0            Active server names:                

Server pool name: TOP_PRIORITY     Active servers count: 1            Active server names: gract1         
           NAME=gract1 STATE=ONLINE 
Server pool name: STANDARD_PRIORITYActive servers count: 2            Active server names: gract2,gract3  
           NAME=gract2 STATE=ONLINE           NAME=gract3 STATE=ONLINE

Pool status

  • all instances are no running on all servers ( = 6 instances )
  • both databases ERP and DW are attached to both severpools

Use case #5: Year END processing – only ERP database sould run

Action: Change back DW database to use STANDARD_PRIORITY pool only
        Change MIN_SIZE to 3  and MAX_SIZE to 3 for ora.TOP_PRIORITY pool

[root@gract1 ~]#  srvctl modify  database -d DW -g  STANDARD_PRIORITY
PRCD-1230 : Failed to modify database dw to use server pool STANDARD_PRIORITY
PRCR-1071 : Failed to register or update resource ora.dw.db
CRS-2736: The operation requires stopping resource 'ora.dw.db' on server 'gract1'
CRS-2736: The operation requires stopping resource 'ora.dw.db' on server 'gract1'
CRS-2744: Unable to modify resource 'ora.dw.db' as this will affect running resources, but the force option was not specified
[root@gract1 ~]#  srvctl modify  database -d DW -g  STANDARD_PRIORITY -f

[root@gract1 ~]#   srvctl modify  serverpool  -serverpool  ora.TOP_PRIORITY -min 3  -max 3
PRCS-1011 : Failed to modify server pool TOP_PRIORITY
CRS-2736: The operation requires stopping resource 'ora.dw.db' on server 'gract3'
CRS-2736: The operation requires stopping resource 'ora.dw.db' on server 'gract2'
CRS-2738: Unable to modify server pool 'ora.TOP_PRIORITY' as this will affect running resources, but the force option was not specified
[root@gract1 ~]#  srvctl modify  serverpool  -serverpool  ora.TOP_PRIORITY -min 3  -max 3 -f
------ Server Info ---------
NAME=gract1                        ACTIVE_POOLS=ora.TOP_PRIORITY      ACTIVE_CSS_ROLE=hub
NAME=gract2                        ACTIVE_POOLS=ora.TOP_PRIORITY      ACTIVE_CSS_ROLE=hub
NAME=gract3                        ACTIVE_POOLS=ora.TOP_PRIORITY      ACTIVE_CSS_ROLE=hub

------ RAC Database Info ---------
Database name: dw Server pools: STANDARD_PRIORITY
Database is not running.

Database name: ERP Server pools: STANDARD_PRIORITY,TOP_PRIORITY
Instance ERP_1 is running on node gract2
Instance ERP_2 is running on node gract3
Instance ERP_3 is running on node gract1

------ Serverpool Info Config ---------
NAME=Free                            IMPORTANCE=0        MIN_SIZE=0          MAX_SIZE=-1         SERVER_CATEGORY=
NAME=ora.TOP_PRIORITY                IMPORTANCE=10       MIN_SIZE=3          MAX_SIZE=3          SERVER_CATEGORY=ora.hub.category
NAME=ora.STANDARD_PRIORITY           IMPORTANCE=5        MIN_SIZE=2          MAX_SIZE=3          SERVER_CATEGORY=ora.hub.category

------ Serverpool Info ---------
Server pool name: Free             Active servers count: 0            Active server names:

Server pool name: TOP_PRIORITY     Active servers count: 3            Active server names: gract1,gract2,gract3
NAME=gract1 STATE=ONLINE           NAME=gract2 STATE=ONLINE           NAME=gract3 STATE=ONLINE
Server pool name: STANDARD_PRIORITYActive servers count: 0            Active server names:

Pool status

  • all 3 servers are assigned to TOP_PRIORITY pool  – no sever is assigned to STANDARD_PRIORITY pool
  • as database DW is only attached to STANDARD_PRIORITY no instance for DW database is running

Leave a Reply

Your email address will not be published. Required fields are marked *