ocs examiner - amazon s3 · 2018-02-18 · oracle 12.1 enterprise edition active data guard with...
TRANSCRIPT
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
Squeezing the Max out of 12c Disaster Recovery
Yossi Nixon, Chief Database ArchitectFebruary 2018
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
2
Speaker
Yossi Nixon
Chief Database Architect
Oracle DBA since 1998
Specializes in Data Guard, RAC, performance tuning.
@YossiNixon
www.linkedin.com/in/ynixon
oracledba.blogspot.com
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
Data Guard Overview
Enhancements in Oracle 12c and 18c
Benchmark and Lessons Learned
The Risk-Distance Conundrum
Axxana’s Phoenix Technology
Putting it all together
Agenda
4
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
Data Guard Overview
Primary RemoteStandby
ASYNC
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
5
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
6
Data Guard Terms
Redo Compression
11g
SYSDG Role
12cFlashback Database on Data Guard
10g
Fast Start Failover
FSFO10g
Online Standby
Database File Rename
12c
Switchover / Failover
Snapshot Standby
11g
Cascaded Redo
9iRMANDuplicate
from Active Database
11g
Automatic Gap
Resolution9iActive
Data Guard
11g
Read-Only Physical Standby
8i
Far Sync12c
Standby Redo Logs
10g
Real-time apply
10g
Managed Recovery
8i
Fast Sync12c
Data Guard Broker
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
Active Data Guard Far Sync
Far Sync
Primary RemoteStandby
ASYNC - Alternate
7
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
Redo
Far Sync
ASYNC
9
Very promising for long distance replication if data loss is not acceptable
Up to 60% performance gain (DML only workloads) with 25ms network latency
Lightweight and easy to deploy (virtual machine)
If latency <5ms most likely you don’t need Far Sync
Far Sync Summary
25ms
SYNCPrimary Standby
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
Far Sync Syntax
SQL > ALTER DATABASE CREATE FAR SYNC INSTANCE
CONTROLFILE AS ‘/tmp/farsync.ctl’;
SQL > create pfile=‘/tmp/initfs.ora' from spfile;
SQL > ALTER DATABASE ADD STANDBY LOGFILE THREAD 2
SIZE 52428800;
SQL > create spfile from pfile=‘/tmp/initfs.ora';
DGMGRL> ADD FAR_SYNC fs AS CONNECT IDENTIFIER IS fs;
DGMGRL> EDIT DATABASE pdb SET PROPERTY RedoRoutes = '(LOCAL
: fs SYNC ALT =(sdb ASYNC FALLBACK))';
10
https://oracledba.blogspot.com/2017/08/creating-far-sync-instance-step-by-step.html
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
Lab Environment Setup
Oracle 12.1 Enterprise EditionActive Data Guard with Far Sync, ASM, Requested tailored patches for Far Sync, Oracle Linux 7.2
Server environmentPrimary & Standby – 2 x Lenovo X3550 M5 (2 x Xeon E5-2620 V3 2.4Ghz, 32GB memory, 4 SSDs)
Far Sync – Two configurations
i7/16GB/dual SSD
Quad Xeon/32GB/4 SSDs
Neutralized network latency issues10GbE connectivity, All systems are collocated
1 to 16 instancesUp to 8 instances on each primary/secondary server, Up to 16 instances on Far Sync server
Primary
Standby
Far SyncHub
11
Standby
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
Setup Observations
Local Far Sync
Primary StandbyRemote Far Sync
ASYNC - AlternateAlternate
opposite direction
Maximum Availability
no multiplex
RMAN deletion policy
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
13
✅Memory Consumption
✅ Networking
✅ Latency reduction through Fast Sync
✅ CPU Consumption
✅ Far Sync IO patterns
Lessons Learned
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
14
Configuration
Used the recommended SGA allocation (300MB SGA)
The Far Sync instance requires a very small SGA footprint (much less than production)
No database files
No media recovery
Consider allocating memory for storage cache
Memory Consumption
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
15
Configuration
Jumbo frames make a huge difference (MTU 9000)
Bonding two 10GbE ports
Network Traffic is Consistent with Log File Write throughput
Bytes written = Bytes received by Far Sync Instance = Bytes Sent by Far Sync Instance
To maximize throughput tune: MAX_CONNECTIONS, LOG_ARCHIVE_MAX_PROCESSES and TCP Send/Receive Buffer Sizes
Transport compression will reduce traffic… but takes its toll on CPU cycles…
Networking
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
16
Standby acknowledges the primary as soon as it receives redo in memory, Without waiting for disk I/O to a standby redo log file
Main goal is shortening the total round-trip time between primary and standby
We didn’t see significant benefit from Fast Sync (NOAFFIRM), since our SSDs are already fast enough.
Latency Reduction – Fast Sync
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
17
Followed Oracle’s recommendationReducing the CPU_COUNT during testing had no effect on the
performance of the Far sync instance
Virtual Keeper of Time Process(es) (VKTM) are high CPU consumer
One process per Database and ASM instances
Several “solutions” have been recommended to reduce its priority
✅ Significant improvement achieved when Far Sync runs multiple instances!
Transport compression takes its toll on CPU cycles…
CPU Consumption
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
Redo entries stored in Standby Redo Logs and Archives
Far Sync doesn’t take advantage of log_buffer memory to reduce I/O
IOs may be reduced through smart caching techniques…
Reduce Redo Log members
18
Far Sync IO Patterns
StandbyRedoLogs
Archives
1 2
3 4
Cache
Far Sync
RemoteStandbyPrimary
Rea
d
Wri
te
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
Without cache, reads and writes follow a very regular and similar pattern (2 writes and 2 reads for each entry received). Write throughput peaks at < 1000MB/sec
Far Sync IO Patterns – No Cache
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
With “write through” cache, all reads can be satisfied from the cache. Write throughput peaks at 1200MB/sec (20% improvement vs no cache)
Far Sync IO Patterns – Writethrough
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
During “normal operation”, Far Sync reads the Standby Redo Log twice
1. To send the data to the remote Standby
2. To create the archived redo log
Archives are only written
Recommendation – Create two volumes1. For Standby Redo Log, use “Writethrough” caching
2. For archives, use “No Cache”
During backlog, the cache saves only “one” readArchive creation reads from cache
But data sent to the remote standby is read from the archives
To Cache or not to Cache?
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
Assumption:
As a rule, backlog can be satisfied from standby redo logs
Cache should be large enough to hold all standby redo logs:
E.g., 10 groups, each of 4GB => 40GB cache
How much cache?
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
Archiving process stresses the IO subsystem
When dealing with multiple instances, try to avoid concurrent archival processes, to achieve smoother IO patterns
Archiving process “interference”
Redo I/O
Redo I/O
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
24
Using Data Guard Broker is strongly recommended, especially when using Far Sync
No “easy” way to collect database statistics, since Far Sync is not a database!
When using Far Sync, use the latest patchsets
Rolling Forward a Physical Standby Database Using the RECOVER FROM SERVICE is cool (First introduced in Oracle 12.1)
Additional Observations (cont.)
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
Multi-Instance Redo Apply
Data Guard Creation with dbca
Fast Failover - Data Guard take over session draining
Password file is managed and transported via the Redo mechanism
Supports AWR on Active DG for the standby
Multiple Observers
Alternate prioritization
Block Comparison tool in DGMGRL
Oracle 12.2 Main New Features
25
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
In Memory Column store works with multi-instance redo apply
Multi-instance redo apply support with Block Change Tracking (BCT).
Global Temporary Table support from Standby.
DML operations on Standby – Redirection to Primary without ACID compromise.
Preserve buffer cache during role-change.
No logging enhancement - Performance mode and Availability mode.
Oracle 18c New Features
26
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
27
Distance Between Primary and Far Sync
Distance-Risk Conundrum
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
28
Axxana – Transparent Layered Protection
Physical Protection
Multiple Network Connectivity
WAN, LAN, Wi-Fi, 4G
Battery Powered
Data Safe
PhoenixOSSmart DR
Far SyncVirtual
Machine
Managedby theUser
Transparently Managed
byAxxana
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
29
Active Data Guard Far Sync with Axxana
Primary Remote Standby
ASYNC over 10GbE
Zero Distance
SYNCRecovery over
Cellular/1GbE/10GbE
Axxana ProtectedFar Sync
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
Short Video
Video Source: http://www.axxana.com/wp-content/uploads/2016/07/x.mp4
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
32
Winning Combination
AxxanaBlack Box
PhoenixOS
OracleActive Data
GuardFar Sync
✅ Zero Data Loss at any distance
✅ No latency (round-trip time) Compromise
✅ True Protection against Link Failure
✅ Application Consistency Guarantee
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
See for yourself…
Video Source: https://youtu.be/ROqI5oR6g8s
© All Rights Reserved. Axxana 2015
Title
© All Rights Reserved. Axxana 2007-2018 RMOUG Training Days 2018 #TD18 #TD2018Squeezing the Max out of 12c Disaster Recovery
Yossi NixonTwitter: @YossiNixonLinkedin: https://www.linkedin.com/in/ynixon/Blog: https://oracledba.blogspot.comEmail: [email protected] / [email protected]: Oracle DBA's in Israel