This presentation talks about the secrets behind Oracle RAC’s horizontal scaling algorithm, Cache Fusion, and how you can ensure that your application is “Oracle RAC ready.”. It discusses do's and don'ts and how to test your application for "Oracle RAC readiness". This version was first presented in Sangam19.
3. Objectives for this Session
• Define what “Oracle RAC Ready” actually means.
• Discuss how to make your application “Oracle RAC Ready”.
• Discuss how to test your application for “Oracle RAC Ready”.
5. The TNS Connector String for High Availability
ALIAS =(DESCRIPTION =
(CONNECT_TIMEOUT=90) (RETRY_COUNT=20)(RETRY_DELAY=3)
(TRANSPORT_CONNECT_TIMEOUT=3)
(ADDRESS_LIST =
(LOAD_BALANCE=on)
( ADDRESS = (PROTOCOL = TCP)(HOST=primary-scan)(PORT=1521)))
(ADDRESS_LIST =
(LOAD_BALANCE=on)
( ADDRESS = (PROTOCOL = TCP)(HOST=secondary-scan)(PORT=1521)))
(CONNECT_DATA=(SERVICE_NAME = gold-cloud)))
Standard for All Drivers starting with Oracle Database 12.2
https://www.slideshare.net/MarkusMichalewicz/oracle-maa-best-practices-applications-considerations
6. What Needs to be Configured for
Continuous Availability?
• RAC or RAC One, Active Data Guard, GoldenGate …Server Stack
• All databases on Flex ASMFlex ASM
• Services for Location TransparencyServices
• Connections appear continuousContinuous Connections
• FAN or 18c Database for drainingDraining
• Application ContinuityInflight work continues
• Drain in a timely mannerSLA’s
https://www.oracle.com/technetwork/database/options/clustering/applicationcontinuity/continuous-service-for-apps-on-atpd-5486113.pdf
8. Objectives for this Session
• Define what “Oracle RAC Ready” actually means.
• Discuss how to make your application “Oracle RAC Ready”.
• Discuss how to test your application for “Oracle RAC Ready”.
12. The Must Dos
Avoid Pipes
DBMS_PIPE can be
used with RAC, but
application changes
required to make it
work outweigh
benefits.
Use Advanced
Queuing (AQ) instead.
Use Connection Pools
Control the number of
concurrent processes
using a well-balanced
workload across nodes.
Hence, use (FAN
enabled) Connection
Pools.
Use Scalable Sequences
Use non-ordered &
cached sequences if
sequence is used to
generate primary key.
Use Scalable
Sequences (new in 18c)
[see hidden slide]
Avoid Write Contention
Frequent transactional
changes to the same
data blocks in all
instances may result in
“write hot spots”.
Some derivation of this
occurrence is likely the
reason for a less than
expected scaling result.
NUM
INC1()
Sequence
Connection
Pool
https://www.oracle.com/technetwork/database/options/clustering/overview/racappdevbp-3124851.pdf
14. Contention can occur in any
multi-user system (even in
Single Instance databases)
Scaling out, contention can
occur between instances
(not only within an instance).
From a contention
perspective, the number of
nodes is irrelevant.
Contention – The Basics
write
write
write
write
write
write
write
write
https://www.slideshare.net/MarkusMichalewicz/oracle-rac-internals-the-cache-fusion-edition
15. Frequent transactional changes
to the same data blocks may
result in “write hot spots”
Pending redo must be written
to log before the block can be
transferred
Contention can affect related data as
much as it can affect the user data.
Right growing indexes and
index contention are common.
In 99% of OLTP performance issues,
write hot spots occur on indexes.
Contention – Considerations
Sequence
REDO
https://www.slideshare.net/MarkusMichalewicz/oracle-rac-internals-the-cache-fusion-edition
19. Smart Fusion Block Transfer
Improves Cache Fusion latency
by allowing LMS to serve dirty
blocks as soon as a REDO flush
is initiated
Contention – Some Solutions
ExaFusion Direct-to-Wire
OLTP Protocol allows the
database to directly call into
the InfiniBand HW.
3x faster Right-Growing Index
performance due to
Leaf Block Split Optimizations,
Scalable Sequences,
Commit Cache
Example 2 is likely addressed by those solutions without application changes.
22. Objectives for this Session
• Define what “Oracle RAC Ready” actually means.
• Discuss how to make your application “Oracle RAC Ready”.
• Discuss how to test your application for “Oracle RAC Ready”.
26. Thank you!
Markus Michalewicz (Markus.Michalewicz@oracle.com)
Senior Director of Database Product Management
@OracleRACpm
www.linkedin.com/in/markusmichalewicz
www.slideshare.net/MarkusMichalewicz