Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

42

Transcript of Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Page 1: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices
Page 2: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2016,Oracleand/oritsaffiliates.Allrightsreserved.|

OracleRealApplicationClusters(RAC)12cRel.2–OperationalBestPractices

MarkusMichalewiczSeniorDirectorofProductManagement,OracleRACDevelopmentDecember6,2017

[email protected]@OracleRACpmhttp://www.linkedin.com/in/markusmichalewiczhttp://www.slideshare.net/MarkusMichalewicz

Page 3: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

SafeHarborStatementThefollowingisintendedtooutlineourgeneralproductdirection.Itisintendedforinformationpurposesonly,andmaynotbeincorporatedintoanycontract.Itisnotacommitmenttodeliveranymaterial,code,orfunctionality,andshouldnotberelieduponinmakingpurchasingdecisions.Thedevelopment,release,andtimingofanyfeaturesorfunctionalitydescribedforOracle’sproductsremainsatthesolediscretionofOracle.

3

Page 4: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

Fact

4

Way:Automation

Goal:Simplification

BestPracticeRecommendationsGowiththeFlow

IT

Page 5: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

Self-Driving -Userdefinesservicelevels,databasemakesthemhappen

Self-Tuning -Continuousadaptiveperformancetuning

Self-Scaling -Instantlyresizecomputeandstoragewithoutdowntime

Self-Securing -Protectionfrombothexternalattacksandinternalusers

Self-Repairing -Automatedprotectionfromalldowntime

LessLabor,LowerCost,FewerErrors,MoreSecure,MoreReliable

RACisNowPartofTheWorld’sFirstAutonomousDatabase

5

Page 6: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

ProgramAgenda

FundamentalsToBeConsideredFirst

ArchitectureChoices

ApplyingOperationalBestPractices

UsingSmartFeaturesAutomatically

Summary

1

2

3

4

5

6

Page 7: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

ProgramAgenda

FundamentalsToBeConsideredFirst

ArchitectureChoices

ApplyingOperationalBestPractices

UsingSmartFeaturesAutomatically

Summary

1

2

3

4

5

7

Page 8: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.| 8

SharedStorage Network/Interconnect

Virtualization/Container Cloud

FundamentalsToBeConsideredFirst

Page 9: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.| 9

SharedStorage Network/Interconnect

Virtualization/Container Cloud

FundamentalsToBeConsideredFirst

Moreinformationonthosetopics:https://www.slideshare.net/MarkusMichalewicz/oracle-

real-application-clusters-rac-12c-rel-2-whats-next

Page 10: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

SharedStorageFundamentals

•  SharedstorageisthetoprequirementforOracleRAC.•  BlockstoragethatissupportedassharedstorageforRACbythestoragevendorandtheservervendorissupportedforRAC.https://www.slideshare.net/MarkusMichalewicz/how-to-use-oracle-rac-in-a-cloud-a-support-question

•  Exceptionsprovetherule.–  SharedFileSystemrequirecertification.–  Storagesolutionsmaybesubjectto“specialruling”.

•  Currently,No3rdPartyPublicCloudsupportssharedstorageforRAC.•  OracleASMandACFSarebyfarthepreferredstoragemanagementsolutionsforOracleRAC.

•  Caution:noOracleprovidedtoolcanfullyreliablychecktheappropriateconfigurationofsharedstoragebeforehand.

10

Page 11: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

Network/InterconnectFundamentals

•  TheinterconnectiscrucialtotheoperationofOracleRAC.–  ThinkofitasaRDMAaccesspathratherthananetwork.–  1GigEandredundancyshouldbethebareminimum.–  10GigEandredundancyarestronglyrecommended.

•  Convergednetworksandswitchesaresupported.Routingisnot.–  I.E.combiningpublic/privatenetworkcommunication.•  Inafuturerelease,communicationoninterconnectisplannedtobesecuredbydefault.

–  VLANsarealogicalseparation,notaphysicalone.•  E.g.theydonotprotectfrominterferenceonthesamephysicalnetwork.

– Whennetworkandstoragecommunicationarecombined,storagecommunicationshouldgetprioritized.

•  Caution:noOracleprovidedtoolcanfullyreliablychecktheappropriateconfigurationoftheinterconnectbeforehand.

11

Page 12: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

ProgramAgenda

FundamentalsToBeConsideredFirst

ArchitectureChoices

ApplyingOperationalBestPractices

UsingSmartFeaturesAutomatically

Summary

1

2

3

4

5

12

Page 13: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.| 13

OracleRestartNotacluster,

butbackforgood!

SeeupdatesinMOSNote1584742.1

StandaloneClusterDedicatedclusterforOLTP,DWHormixed-WLsystems.

ClusterDomainDomainServicesCluster(DSC)&MemberClustersforlargeclusterestatesandstorageconsolidation.

ExtendedClusterStandaloneClusterorDSC

maintainingtwoindependentstoragearrays(overdistance).

ArchitectureChoices

SiteA SiteB

DomainServicesCluster

Page 14: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

OracleRAC12cRel.2ClusterDomain

•  SimplifiedManagement– FleetManagementforinstallation,update,patchingandmaintenance

• ReducedLocalOverhead– MemberClustersbenefitfromtheconsolidationofcommonservicesontheDomainServicesCluster

•  ImprovedIOPerformance– Utilizingconsolidatedsharedstorage

14

CentralizedManagementforClusterEstates“toobigtomanage”otherwise

Page 15: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

OracleRAC12cRel.2ClusterDomain

•  SimplifiedManagement– FleetManagementforinstallation,update,patchingandmaintenance

• ReducedLocalOverhead– MemberClustersbenefitfromtheconsolidationofcommonservicesontheDomainServicesCluster

•  ImprovedIOPerformance– Utilizingconsolidatedsharedstorage

15

CentralizedManagementforClusterEstates“toobigtomanage”otherwise

Moreinformation:https://www.slideshare.net/MarkusMichalewicz/oracle-rac-12c-rel-2-cluster-architecture-internals-

oow17-by-anil-nair-80543101(PPT)

http://www.oracle.com/technetwork/database/database-technologies/clusterware/overview/oracle-clusterware-12cr2-wp-3659203.pdf(WP)

Page 16: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

BestPracticesApplyAcrossArchitectures

•  BParedesignedforStandaloneClusterdeployments

•  ADSCisaStandaloneCluster–  thatoffersadditionalservicestoMemberClusters.– BPforStandaloneClustersapplytoaDSC

• MemberClusterscomewithasimplifieddeployment– BasicBPforStandaloneClustersapplytoMemberClusters

•  ExtendedClustersforRACcomewithadditionalBP:–  https://www.slideshare.net/MarkusMichalewicz/oracle-extended-clusters-for-oracle-rac

16

ThesimplifiedBestPractices(BP)equation

DomainServicesCluster

Page 17: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

ProgramAgenda

FundamentalsToBeConsideredFirst

ArchitectureChoices

ApplyingOperationalBestPractices

UsingSmartFeaturesAutomatically

Summary

1

2

3

4

5

17

Page 18: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.| 18

Read&implementOracleDocumentation

andMyOracleSupport(MOS)Notes

Read&implementBlogs&ForumEntriesNotalwaysvettedbyOracle.

Run&applyClusterVerificationUtility(CVU)&OracleUniversalInstaller(OUI)

Run&followORAchk

HowToObtainandApplyBestPracticesforOracleRAC?

Page 19: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

Each“Tool”hasaDifferentPurpose

Establishthebasesystem;e.g.:hardwareandOSminimumrequirements

(fundamentals)

Checkandconfirmbaseline;e.g.checkforandapplyOS

minimumparameterrequirements;supportsdiffcomparison

Checkforrecommendedbestpracticesandimplementmanually

19

Page 20: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.| 20

ForautomatedandsimplerbestpracticesapplicationOracleAutonomousHealthFramework(AHF)

OracleAHFintegratesnextgenerationtoolsrunningas

components-24/7

Page 21: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.| 21

EstablishesBaselineandMaintainsBestPracticeConfigurationsOracleClusterVerificationUtility(CVU)

•  Useduringinstallandoperation•  ChecksO/S,GIandDBmandatory

complianceandbestpracticeswithhealthcheckoption

•  Runsasdaemonevery6hours•  ASMBestPracticesCheck•  CreatesBaselinecollections•  Adduser-specified/disable

problemchecks•  Newuser-friendlyreportformat

Page 22: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

ScheduleORAchk

?

Hour(0–23)

? ? ?

Dayofmonth(1–31)

Month(1–12)

Dayofweek(0–6)(0to6areSundaytoSaturday)

example:orachk-set'AUTORUN_SCHEDULE=8,20**2,5'willschedulerunsonTuesdayandFridayat08:00&20:00

AUTORUN_SCHEDULE=

2222

Page 23: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

ViewORAchkReport

•  Healthscore•  SummaryofORAchkrun

•  Tableofcontent•  Controlsforreportfeatures•  Findings•  Recommendations

23

Page 24: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

ViewORAchkFindings

•  Checkstatus•  TypeofCheck•  CheckMessage

• Wherethecheckwasrun

•  Linktoexpanddetails

24

Page 25: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

•  Whattodotosolvetheproblem

•  LinkstorelevantKnowledgedocs•  Whererecommendationapplies

•  Whereproblemdoesn’tapply

•  Exampleofdatatherecommendationisbasedon

ActonRecommendations

25

Page 26: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

ProgramAgenda

FundamentalsToBeConsideredFirst

ArchitectureChoices

ApplyingOperationalBestPractices

UsingSmartFeaturesAutomatically

Summary

1

2

3

4

5

26

Page 27: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

SmartFencing

27

Page 28: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.| 28

•  Pre-12.2,nodeevictionfollowsarather“ignorant”pattern–  Exampleina2-nodecluster:Thenodewiththelowestnodenumbersurvives.

•  Customersmustnotbasetheirapplicationlogiconwhichnodesurvivesthesplitbrain.–  Asthismay(!)changeinfuturereleases

NodeEvictionBasicshttp://www.slideshare.net/MarkusMichalewicz/oracle-clusterware-node-management-and-voting-disks

✔1 2

Page 29: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.| 29

•  NodeWeightingisanewfeaturethatconsiderstheworkloadhostedintheclusterduringfencing

•  Theideaistoletthemajorityofworksurvive,ifeverythingelseisequal–  Example:Ina2-nodecluster,thenodehostingthe

majorityofservices(atfencingtime)ismeanttosurvive

NodeWeightinginOracleRAC12cRelease2Idea:Everythingequal,letthemajorityofworksurvive

✔1 2

Page 30: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

Athreenodeclusterwillbenefitfrom“NodeWeighting”,ifthreeequallysizedsub-clustersare

builtassresultofthefailure,sincetwodifferentlysizedsub-clustersarenot

equal.

30

Secondaryfailureconsiderationcaninfluencewhichnodesurvives.

Secondaryfailureconsiderationwillbeenhancedsuccessively.

Afallbackschemeisappliedifconsiderationsdonotleadtoanactionableoutcome.

Let’sDefine“Equal”

Publicnetworkcardfailure. “Conflict”.

Page 31: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

CSS_CRITICALcanbesetonvariouslevels/componentstomarkthemas

“critical”sothattheclusterwilltrytopreservethemincaseofafailure.

31

CSS_CRITICALwillbehonoredifnoothertechnicalreasonprohibitssurvivalofthenodewhichhasatleastonecriticalcomponentatthe

timeoffailure.

AfallbackschemeisappliedifCSS_CRITICALsettingsdonotleadto

anactionableoutcome.

CSS_CRITICAL–FencingwithManualOverride

crsctlsetservercss_critical{YES|NO}

+serverrestart

srvctlmodifydatabase-help|grepcritical

…-css_critical{YES|NO}

DefinewhetherthedatabaseorserviceisCSScritical

✔NodeevictiondespiteWL;WLwillfailover.

“Conflict”.

Page 32: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

RecoveryBuddies

32

Page 33: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.| 33

•  RecoveryBuddies•  Trackblockchangesonbuddyinstance

•  Quicklyidentifyblocksrequiringrecoveryduringreconfiguration

•  Allowrapidprocessingoftransactionsafterfailures

NearZeroReconfigurationTimewithRecoveryBuddiesA.k.a.BuddyInstances

Page 34: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.| 34

•  BuddyInstancemappingissimple(random)–  e.g.I1àI2,I2àI3,I3àI4,I4àI1

•  Recoverybuddiesareassignedduringstartup•  RMS0oneachrecoverybuddyinstancemaintainsanin-memoryareaforredologchange

•  Anin-memoryareaisusedduringrecovery–  Eliminatestheneedtophysicallyreadtheredo

NearZeroReconfigurationTimewithRecoveryBuddiesHowitworksunderthehood

InstanceI1

InstanceI2

InstanceI3

InstanceI4

RecoveryBuddyI3

RecoveryBuddyI4

RecoveryBuddyI1

MyCluster

RecoveryBuddyI2

Page 35: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

HowRecoveryBuddiesHelpReducingRecoveryTime

WithoutRecoveryBuddies WithRecoveryBuddies

35

Detect

Evict

ElectRecovery

ReadRedo

ApplyRecovery

Detect

Evict

ElectRecovery

ReadRedo

ApplyRecovery

Upto4x

faster

Page 36: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

DatabaseHangManager

36

Page 37: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.| 37

•  Alwayson,asenabledbydefault•  Reliablydetectsdatabasehangs•  Automaticallyresolveshangs

•  ConsidersQoSpoliciesforhangresolution•  Logsalldetectedhangs&theirresolutions

IntroductiontoHangManagerHowitworks Session

DIAG0

EVALUATE

DETECT

ANALYZE

Hung?

VERIFY

Victim

QoSPolicy

Page 38: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.| 38

•  HangManagerauto-tunesitselfbyperiodicallycollectinginstance-andcluster-widehangstatistics

•  Metricslikeclusterhealth/instancehealthistrackedoveramovingaverage

•  Thismovingaverageisconsideredduringresolution

•  HolderswaitingonSQL*Netbreak/resetarefasttracked

HangManagerOptimizationswithOracleRAC12c(Rel.2)Tuningunderthehood

Page 39: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.| 39

•  Earlywarningexposedvia(V$view)

•  Sensitivitycanbesethigher–  Ifthedefaultlevelistooconservative

•  HangManagerconsidersQoSpoliciesanddataduringthevalidationprocess

DBMS_HANG_MANAGER.SensitivityAnewSQLinterfacetosetHangManagersensitivity

HangSensitivityLevel

Description Note

NORMAL HangManagerusesitsdefaultinternaloperatingparameterstotrytomeettypicalrequirementsforanyenvironments.

Default

HIGH HangManagerismorealerttosessionswaitinginachainthanwhensensitivityisinNORMALlevel.

Page 40: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.|

ProgramAgenda

FundamentalsToBeConsideredFirst

ArchitectureChoices

ApplyingOperationalBestPractices

UsingSmartFeaturesAutomatically

Summary

1

2

3

4

5

40

Page 41: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.| 41

StandaloneCluster ClusterDomain

Virtualizedenvironments Cloud

Summary

DomainServicesCluster

Page 42: Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices

Copyright©2017,Oracleand/oritsaffiliates.Allrightsreserved.| 42