Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
-
Upload
tiagoazevedo -
Category
Documents
-
view
241 -
download
0
Transcript of Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
1/36
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
2/36
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
3/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Safe Harbor StatementThe following is intended to outline our general product direction. It is inteninformation purposes only, and may not be incorporated into any contract.commitment to deliver any material, code, or functionality, and should not in making purchasing decisions. The development, release, and timing of anfunctionality described for Oracle’s products remains at the sole discretion
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
4/36
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
5/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Three Alternative Architectures – The Same Idea A
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
6/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Three Alternative Architectures – The Same Idea A
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
7/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Program Agenda
1
2
3
4
5
Cache Fusion Overview
(Dynamic Re-) Mastering
Handling Contentions
RAC Meets Multitenant
RAC Meets In-Memory
Oracle Confidential – Inte
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
8/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Program Agenda
1
2
3
4
5
Cache Fusion Overview
(Dynamic Re-) Mastering
Handling Contentions
RAC Meets Multitenant
RAC Meets In-Memory
Oracle Confidential – Inte
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
9/36Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
• Requester
• Listener
• Service
• Holder
• Master
• Session
Oracle RAC Combines it All & Adds Services
I
ot
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
10/36Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
• In an Oracle environment, list
establish connections with an i
• In an Oracle RAC environmenof listeners are used (for this p
1. SCAN and SCAN Listener
2. Local Listeners per node
• Services are used to load bal
• Local listeners will establish on instances where the servi
• Once a session is establishedinstance, the sessions stays u
Listeners and Services Direct Work to an Instance
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
11/36Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
• Local Cache Hit
• Access time: nanoseconds
• Remote Cache Hit
• Access time: microseconds
• Data is on disk
• Flash cache acce
• Disk controller ca
• Spinning disk acc
Getting Access to Data
Whether local or remote, cache hits are alwaysfaster than reading from spinning disks
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
12/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Case 1 (all local)
• All entities in one instance
• Data holding instance
• Session “holding” instance
• Mastering Instance
Case 2 (local / remote)
• Some entities in one instance
•Data holding instance
• Session “holding” instance
• Two way communication
Case 3 (all distributed
• All entities are dispers
• Three way communicato obtain a given block o
• Message operatioimprovements sin
Maximum Three Way Communication
write write
Message
Block
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
13/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Dynamic Retrieval of Data
+ +
2
3
1
• In order to fulfill a given requesOracle RAC can decide to:
• Assemble data spread across inst
• Perform a (full) disk read for (part
• Use assembly and (full) disk reads
• The decision which access pathdependent on various factors (enetwork utilization)
• Respective parameters are monit
• The access path can changeaccordingly and dynamically.
Once data has been shipped to an insthe cache for further (local) access
communicated as required (via
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
14/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Program Agenda
1
2
3
4
5
Cache Fusion Overview
(Dynamic Re-) Mastering
Handling Contentions
RAC Meets Multitenant
RAC Meets In-Memory
Oracle Confidential – Inte
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
15/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
• In Oracle RAC, every object is mastered (aspart of Global Cache Services / GCS) by aninstance.
• The Global Resource Directory (GRD) isused to “keep track” of mastering.
• Illustration above is symbolic for this matter.
• If a session requests write accessto a block that is not mastered bythe instance hosting the session,the master instance needs to becontacted (via message).
• Based on user acceRe-Mastering (DRM)changing the masterinstance to another.
• Relocating the maswhere data is requesmessaging.
Mastering and Dynamic Re-Mastering
germanyOracle GI | HUB
Oracle RAC
argentinaOracle GI | HUB
Oracle RAC
brazilOracle GI | HUB
Oracle RAC
germany Oracle GI | HUB
Oracle RAC
argentinaOracle GI | HUB
Oracle RAC
brazil Oracle GI | HUB
Oracle RAC
write
germany Oracle GI | HUB
Oracle RAC
argenOrac
Ora
germany Oracle GI | HUB
Oracle RAC
argenOrac
Ora
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
16/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
• DRM is used internally and exte
•
Externally means access patterninfluence the mastering of user d
• Internally DRM is used for the manof UNDO data across instances for e
• DRM activity is also performed upinstances leaving or joining the clus
• Do not turn DRM off (_gc_polic
• Optimize _gc_policy_minimum at a convenient moment under n
• Consider using smaller SGA size
• See MOS note 1619155.1 – “Best PRecommendations for RAC databaslarger than 300GB” as applicable
• “dbms_cacheutil” can be used to mrelease affinity under well understo
Dynamic Re-Mastering (DRM) – Recommendation
germany Oracle GI | HUB
Oracle RAC
argentinaOracle GI | HUB
Oracle RAC
brazil Oracle GI | HUB
Oracle RAC
write
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
17/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
• The Cache Fusion Accelerator (C
• OS kernel (Linux & Solaris only
• which can respond directly tocertain lock requests via RDSv3
• The lock state is saved in memoby the database and the kernel.
• CFA saves user/kernel context sCPU cycles in LMS, and “speeds u
• CFA will be activated on Engine
time, including the Oracle Databa
• CFA contributes to a better, line
• CFA is one of a long list of impro
New in 12.1.0.2: Cache Fusion Accelerator
germanyOracle GI
Oracle RAC
argentinaOracle GI
Oracle RAC
brazilOracle GI
Oracle RAC
write
LMS process Accelerator
Lock grant
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
18/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
New in 12.1.0.2: Cache Fusion Accelerator
germanyOracle GI
Oracle RAC
argentinaOracle GI
Oracle RAC
brazilOracle GI
Oracle RAC
write
LMS process Accelerator
• The Cache Fusion Accelerator (C
• OS kernel (Linux & Solaris only
• which can respond directly tocertain lock requests via RDSv3
• The lock state is saved in memoby the database and the kernel.
• CFA saves user/kernel context sCPU cycles in LMS, and “speeds u
• CFA will be activated on Engine
time, including the Oracle Databa
• CFA contributes to a better, line
• CFA is one of a long list of impro
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
19/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Program Agenda
1
2
3
4
5
Cache Fusion Overview
(Dynamic Re-) Mastering
Handling Contentions
RAC Meets Multitenant
RAC Meets In-Memory
Oracle Confidential – Inte
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
20/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
writewrit
• Contention can occur in any multi-user system (even in SI databases)
• User data as well as “metadata” (e.g.an index) can be subject to contention
• You can still guide users to only oneinstance in an Oracle RAC environment.
• As soon as you scale out, contentioncan occur between instances (not onlywithin an instance).
• From a contention setup is basically thenodes setup.
• The difference is inbased communicatioconsidering the mas
How To Handle Contention – Basicswrite
writewrite
write
writewrite
writewrite
Note: for scalability, only write/write contention needs to be considered
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
21/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
• Frequent transactional changes to thesame data blocks in all instances mayresult in “write hot spots”.
• Block with pending changes maybe “pinged” by other instances.
• Pending redo must be written to logbefore the block can be transferred
• Latency for a deferred block transferbecomes dependent on delay for log IO
• Contention can affemuch as it can affect
• Right growing indeindex contention are
• In 99% of OLTwrite hot spots
How To Handle Contention – Considerationswrite
writewrite
write
writewrite
writewrite
REDO
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
22/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
• Avoid frequent transactional changesto the same data blocks in all instancesusing partitioning and services.
• Logically partition data so that sub-data is handled in one instance only.Guide users via services accordingly.
• Place redo logs on fast storageif performance critical; e.g. SSDs
•Implemented in 11.2.2.4 of Exadata and OracleDatabase Appliance by default (Smart Logs andSSDs, respectively)
•Separate disks for logs from other IO busy disks
• Use either for b
• Global hash
• Locally parti
• Drop unused in
How To Handle Contention – General Solutionswrite
writewrite
write
REDO
writewrite
writewrite
Get the best out of Oracle Partitioning - A practical guide and reference
https://www.slideshare.net/secret/nHJV1CjWWOlGOl
https://www.slideshare.net/secret/nHJV1CjWWOlGOlhttps://www.slideshare.net/secret/nHJV1CjWWOlGOl
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
23/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
• UCP supports “Connection Affinity”:
• Transaction-Based Affinity
• Web Session Affinity
http://docs.oracle.com/database/121/JJUCP/rac.htm#JJUCP8197
• Connection Pools limit the numberof connections to the database – example:
• Oracle Universal Connection Pool (UCP)
• Use “Database Resident ConnectionPooling” when no. of active sessionsmuch smaller then no. of open session.
• Fast Application – enabled conneLoad Balancing inthe Workload Reper-service basis
How To Handle Contention – Use Connection Poolwrite
writewrite
writewrite
writeConnection PoolConnection Pool Conn
busy
http://docs.oracle.com/database/121/JJUCP/rac.htmhttp://docs.oracle.com/database/121/JJUCP/rac.htmhttp://docs.oracle.com/database/121/JJUCP/rac.htm
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
24/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Program Agenda
1
2
3
4
5
Cache Fusion Overview
(Dynamic Re-) Mastering
Handling Contentions
RAC Meets Multitenant
RAC Meets In-Memory
Oracle Confidential – Inte
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
25/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
•Pluggable Databases (PDBs) represent themselves as services in anOracle RAC Multitenant Database, ensuring extremely fast failover.
• PDBs can be used to conveniently align users to instances withall the benefits, providing higher consolidation benefit and agility.
• Oracle RAC Multitenant Databases h
• Future improvements will ensure gre
• Multithreaded Redo Log writer alre
Oracle Multitenant and Oracle RAC – a Symbiosis
germany
Oracle GI | HUB
Oracle RAC
argentina
cons_1
REDO
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
26/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
•Pluggable Databases (PDBs) represent themselves as services in anOracle RAC Multitenant Database, ensuring extremely fast failover.
• PDBs can be used to conveniently align users to instances withall the benefits, providing higher consolidation benefit and agility.
Oracle Multitenant and Oracle RAC – a Symbiosis
germany
Oracle GI | HUB
Oracle RAC
argentina
cons_1
REDO
• Oracle RAC Multitenant Databases help
• Future improvements will ensure great
• Multithreaded Redo Log writer alread
• Per-PDB/service optimized GCS operat
More information, see: Oracle Multitenant meets Oracle RAC -http://www.slideshare.net/MarkusMichalewicz/oracle-
multitenant-meets-oracle-rac-ioug-2014-version
http://www.slideshare.net/MarkusMichalewicz/oracle-multitenant-meets-oracle-rac-ioug-2014-versionhttp://www.slideshare.net/MarkusMichalewicz/oracle-multitenant-meets-oracle-rac-ioug-2014-versionhttp://www.slideshare.net/MarkusMichalewicz/oracle-multitenant-meets-oracle-rac-ioug-2014-versionhttp://www.slideshare.net/MarkusMichalewicz/oracle-multitenant-meets-oracle-rac-ioug-2014-versionhttp://www.slideshare.net/MarkusMichalewicz/oracle-multitenant-meets-oracle-rac-ioug-2014-versionhttp://www.slideshare.net/MarkusMichalewicz/oracle-multitenant-meets-oracle-rac-ioug-2014-versionhttp://www.slideshare.net/MarkusMichalewicz/oracle-multitenant-meets-oracle-rac-ioug-2014-versionhttp://www.slideshare.net/MarkusMichalewicz/oracle-multitenant-meets-oracle-rac-ioug-2014-versionhttp://www.slideshare.net/MarkusMichalewicz/oracle-multitenant-meets-oracle-rac-ioug-2014-versionhttp://www.slideshare.net/MarkusMichalewicz/oracle-multitenant-meets-oracle-rac-ioug-2014-versionhttp://www.slideshare.net/MarkusMichalewicz/oracle-multitenant-meets-oracle-rac-ioug-2014-versionhttp://www.slideshare.net/MarkusMichalewicz/oracle-multitenant-meets-oracle-rac-ioug-2014-versionhttp://www.slideshare.net/MarkusMichalewicz/oracle-multitenant-meets-oracle-rac-ioug-2014-versionhttp://www.slideshare.net/MarkusMichalewicz/oracle-multitenant-meets-oracle-rac-ioug-2014-versionhttp://www.slideshare.net/MarkusMichalewicz/oracle-multitenant-meets-oracle-rac-ioug-2014-versionhttp://www.slideshare.net/MarkusMichalewicz/oracle-multitenant-meets-oracle-rac-ioug-2014-versionhttp://www.slideshare.net/MarkusMichalewicz/oracle-multitenant-meets-oracle-rac-ioug-2014-versionhttp://www.slideshare.net/MarkusMichalewicz/oracle-multitenant-meets-oracle-rac-ioug-2014-versionhttp://www.slideshare.net/MarkusMichalewicz/oracle-multitenant-meets-oracle-rac-ioug-2014-version
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
27/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Program Agenda
1
2
3
4
5
Cache Fusion Overview
(Dynamic Re-) Mastering
Handling Contentions
RAC Meets Multitenant
RAC Meets In-Memory
Oracle Confidential – Inte
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
28/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Oracle In-Memory and Oracle RAC
Breakthrough:Dual Format
Database
GenerateReportsInstantly
ColumnStore
ReplacesAnalyticIndexes
In-Memory
Column Store
Full HA &Integration
withIndustry
Standards
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
29/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Oracle In-Memory and Oracle RAC – A Dream-Team
In-Memory
Column Store
Addresses
Addresses
Breakthrough:Dual Format
Database
ColumnStore
ReplacesAnalyticIndexes
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
30/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
“Full support for RAC scale-means Oracle Database In-can be used on our largestWarehouse, enabling morereal-time analytics.”
– Sudhi Vijayakumar, Senior Oracle Yahoo Inc.
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
31/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Oracle Database In-Memory: Unique Fault Toleran
•
Similar to storage
• Duplicate in-memcolumns on anoth
• Enabled per ta
• Application tran
• Downtime eliminausing duplicate a
Only Available on Engineered Systems
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
32/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
“Downtime is extremely cosbusiness. Oracle’s In-Memarchitecture takes the righto balancing real-time speecontinuous availability.”
– Jens-Christian PokolmAnalyst IT-DB Architecture & EngiPostbank Systems AG
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
33/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
• In-Memory compresses data,optimizing the use of memory.
• Memory allocated for In-Memoryis subject to simplified lock mgmt.
• In-Memory Speed and Capacity ofLow Cost Disk
• PCI Flash works m
• Shared solutionsRAC external sync
• Coming soon on integrated shared
Optimized Used of Memory in Every Layer
NormalBuffer Cache
In-MemoryFormat
NormalBuffer Cache
In-MemoryFormat
• Compressed• Lock mgmt.
simplified
germany
Oracle GI | HUB
Oracle RAC
argen
Orac
Ora
?
C
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
34/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
• Database and Middleware streams available
•
Videos – Feature different groups and presenters
– Cover a broad range of topics and products
• FREE OF CHARGE Oracle RAC PM / Dev contributions:
– Oracle Flex Cluster: Optimized Resource Management for the Cloud - Ian Cookson
– Oracle Grid Infrastructure 12c Bundled Agents – Shankar Iyer
– ACFS Product Overview and Use Cases - Ara Shakian
– The Oracle Real Application Clusters (RAC) Family of Solutions - A User Guide – Markus Micha
– Next Generation Oracle Automatic Storage Management - Jim Williams
– Implementing DBaaS with Oracle RAC 12c and Quality of Service Management - Mark Scardin
– Oracle RAC Practical Performance Management and Tuning – Markus Michalewicz
Oracle Learning Streams: http://education.oracle.com/st
http://education.oracle.com/streams/http://education.oracle.com/streams/
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
35/36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
-
8/19/2019 Understanding Oracle RAC 12.1.0.2 Internals the Cache Fusion Edition
36/36