Plan an Oracle Data Guard Deployment
Analyze your specific requirements, including both the technical and operational aspects of your IT systems and business processes, understand the availability impact for the Oracle Data Guard architecture options, and consider the impact of your application and network.
Oracle Data Guard Architectures
The Gold MAA reference architecture provides you with four architecture patterns, using Oracle Active Data Guard to eliminate single point of failure. The patterns vary from a single remote active standby with Fast Start Failover and HA Obeserver, to including far sync instances, multiple standbys, and reader farms.
When planning your Gold MAA Reference Architecture, see High Availability Reference Architectures for an overview of each Gold architecture pattern, and choose the elements to incorporate based on your requirements.
Application Considerations for Oracle Data Guard Deployments
As part of planning your Oracle Data Guard deployment, consider the resources required and application availability requirements in a fail over scenario.
Deciding Between Full Site Failover or Seamless Connection Failover
The first step is to evaluate which failover option best meets your business and application requirements when your primary database or primary site is inaccessible or lost due to a disaster.
The following table describes various conditions for each outage type and recommends a failover option in each scenario.
| Outage Type | Condition | Recommended Failover Option |
|---|---|---|
| Primary Site Failure (including all application servers) | Primary site contains all existing application servers (or mid-tier servers) that were connected to the failed primary database. | Full site failover is required |
| Primary Site Failure (with some application servers surviving) | Some or all application servers are not impacted and the surviving application servers can reconnect to new primary database in a secondary disaster recovery site. Application performance and throughput is still acceptable with different network latency between application servers and new primary database in a secondary disaster recovery site. Typically analytical or reporting applications can tolerate higher network latency between client and database without any noticeable performance impact, while OLTP applications performance may suffer more significantly if there is an increase in network latency between the application server and database. |
Seamless connection failover is recommended to minimize downtime and enable automatic application and database failover. |
| Complete Primary Database or Primary Server Failure | Application servers are not impacted and users can reconnect to new primary database in a secondary disaster recovery site. Application performance and throughput is still acceptable with different network latency between application servers and new primary database in a secondary disaster recovery site. Typically analytical or reporting applications can tolerate higher network latency between client and database without any noticeable performance impact, while OLTP applications performance may suffer more significantly if there is an increase in network latency between the application server and database. |
If performance is acceptable, seamless connection failover is recommended to minimize downtime and enable automatic application and database failover. Otherwise, full site failover is required. |
Full Site Failover Best Practices
A full site failover means that the complete site fails over to another site with a new set of application tiers and a new primary database.
Complete site failure results in both the application and database tiers becoming unavailable. To maintain availability, application users must be redirected to a secondary site that hosts a redundant application tier and a synchronized copy of the production database.
Consider the two figures below. The first figure shows the network routes before failover. Client or application requests enter the Primary site at the client tier, and are routed to the application server and database server tiers on the primary site.

Description of the illustration habpt005.gif
The second figure, below, illustrates the network routes after a complete site failover. Client or application requests enter the Secondary site at the client tier and follow the same path on the secondary site that they followed on the primary site.

Description of the illustration habpt014.gif
MAA best practice is to maintain a running application tier at the standby site to avoid incurring start-up time, and to use Oracle Data Guard to maintain a synchronized copy of the production database. Upon site failure, a WAN traffic manager is used to perform a DNS failover (either manually or automatically) to redirect all users to the application tier at standby site while a Data Guard failover transitions the standby database to the primary production role.
Use Oracle Active Data Guard Fast-Start Failover to automate the database failover. Application server and non-database failovers can be automated and coordinated by using Oracle Site Guard. Oracle Site Guard orchestrates and automates any operations, such as starting up application servers on the secondary site, resynchronizing non-database meta data as Data Guard fails over automatically.
For more information about Oracle Site Guard, see the Oracle Site Guard Administrator’s Guide.
Configuring Seamless Connection Failover
Automating seamless client failover in an Oracle Data Guard configuration includes relocating database services to the new primary database as part of a Data Guard failover, notifying clients that a failure has occurred to break them out of TCP timeout, and redirecting clients to the new primary database.
In the following figure, a database request is interrupted by an outage or timeout (1), so the session reconnects to the Oracle RAC cluster (2) (or standby) (2), the database request replays automatically on the alternate node (3), and the result from the database request is returned to the user (4).

Description of the illustration seamless_failover.png
To achieve seamless connection failover, refer to Configuring Continuous Availability for Applications.
Assessing and Optimizing Network Performance
Oracle Data Guard sends redo from the primary database to standby databases. If a primary instance generates redo faster than it can be sent and received, transport lag grows. A primary database failure during a transport lag can increase potential data loss during a failover operation. Assess network reliability as well as capacity at peak redo generation rates.
Network assessment consists of evaluating
-
Network reliability
-
Network bandwidth to accommodate peak redo generation rates Note: Each instance of the primary database instance generates its own redo and ships redo to the standby database in a single network stream. Therefore, maximizing single process network throughput for each node is critical for redo transport.
The common areas for reduced network throughput resulting in transport lags include:
- Network firewalls or network encryption
Network firewalls and network (not Oracle Net) encryption can reduce overall throughput significantly. Verify throughput with iperf and tune accordingly.
At times reducing the encryption level can increase throughput significantly. A balance is required to meet security needs with your performance and data loss requirements. - Redo transport compression
When database initialization parameter hasLOG_ARCHIVE_DEST_NattributeCOMPRESSION=ENABLE, Oracle background processes compress the redo before sending, and uncompress upon receiving the redo. This reduces the overall throughput. Additionally, when Transparent Data Encryption is enabled in the database, compression is generally discouraged since encrypted data does not compress efficiently. Compression is only recommended if network bandwidth is insufficient between the primary and standby destinations and a meaningful compression ratio can be achieved. - Oracle Net encryption
Oracle Net Advanced Security Option (ASO) encryption can have a meaningful impact on redo transport as the encryption is done by the single sending process while the single receiving process decrypts upon receipt. Under heavy load, with multiple standbys or with limited network bandwidth, the CPU cost of encryption can limit throughput as the processes spend time decrypting and encrypting instead of sending/receiving. It is recommended to only use network encryption when required and to use less intrusive and equally secure options such as TLS (preferred 3.0 or higher), with ASO.
- Untuned network for redo transport
- Increasing maximum TCP socket buffer size can improve single process throughput. Test with different socket buffer sizes (described below) to see what value yields positive results, and ensure throughput is greater than the peak redo throughput.
- Compare performance with various MTU settings.
If average redo write size is less than 1500 bytes, then jumbo frames may be beneficial to redo transport
Also note that for SYNC transport, Oracle’s average redo write size (for example, Oracle message send) increases significantly as determined by v$sysstats or AWR statistics “redo size / redo writes”.
When sending redo across geographical regions, experiments have shown that using MTU=9000 can also be beneficial in some network topologies. Conduct performance tests with iperf and compare the results with default MTU and jumbo frames settings.
Gather Topology Information
Understanding the topology of the Oracle Data Guard configuration, and its relevance to Data Guard performance, helps eliminate infrastructure weaknesses that are often incorrectly attributed to the Data Guard architecture.
Oracle recommends that you outline the following high-level architecture information.
- Describe the primary and standby database system (number of nodes in Oracle RAC cluster, CPUs and memory per database node, storage I/O system)
- Describe network topology connecting the primary and standby systems
- Network switches and firewalls in between primary and standby
- Network bandwidth and latency
- For Oracle Cloud Infrastructure (OCI) or multi-cloud configurations
- Describe the network path between endpoints including but not limited to VCNx, Network Security Groups (NSGs), peering gateways, subnets, listener ports etc.
The ASYNC transport lag should be zero or near zero for standby databases with symmetric hardware and a well-tuned network configuration that can support peak redo generation rates.
Understanding Network Usage of Data Guard
The phases of the Data Guard life cycle which use the network most heavily are:
- Instantiation - During this phase of standby database creation, files can be copied using parallelism from any host. Determining the degree of parallelism which maximizes throughput between nodes helps to optimize the standby instantiation process.
- Redo Transport (Steady State)- Under normal Data Guard operation the primary database ships redo to the standby which is then applied. Each RAC instance of a primary database ships redo in a single stream from the host on which it is running. Understanding the requirements of each primary database instance and ensuring a single process can achieve the throughput requirements is critical to a standby database staying current with the primary database.
Understanding Targets and Goals for Instantiation
Instantiation for large databases can take hours, or in extreme cases days. To plan and optimize instantiation first determine the goal for instantiation time. Then follow the process defined below to maximize per process throughput and identify the optimal degree of parallelism between the primary and standby nodes.
Understanding Throughput Requirements and Average Redo Write Size for Redo Transport
Note: In cases where the primary database exists, a baseline for the required network bandwidth can be established. If there is no existing primary database, skip this step and future references to the data during this process.
Required network bandwidth of a given Data Guard configuration is determined by the redo generate rate of the primary database, and specifically each instance of the primary database. While the Automatic Workload Repository (AWR) tool can be used to determine the redo generation rate, the rate provided by AWR is an average between the snapshots (often 30-60 minutes) and does not give a clear view of the peak rate required by redo transport.
View dba_hist_sysmetric_history which is collects data every 60 seconds by default provides a much finer-grained view of the redo generation rate.
To find the peak rate per instance:
set linesize 155
SELECT
instance_number,
TO_CHAR(MIN(begin_time), 'YYYY-MM-DD HH24:MI:SS') AS oldest_time,
TO_CHAR(MAX(end_time), 'YYYY-MM-DD HH24:MI:SS') AS newest_time,
ROUND(MAX(value) / 1000000, 2) AS peak_rate_mb_per_sec,
ROUND(MAX(value) * 8 / 1000000, 2) AS peak_rate_mbit_per_sec
FROM dba_hist_sysmetric_history
WHERE metric_name = 'Redo Generated Per Sec'
GROUP BY dbid, instance_number
ORDER BY dbid, instance_number;
Sample output:
INSTANCE_NUMBER OLDEST_TIME NEWEST_TIME PEAK_RATE_MB_PER_SEC PEAK_RATE_MBIT_PER_SEC
--------------- ------------------- ------------------- -------------------- ----------------------
1 2026-10-17 23:59:41 2026-10-26 12:05:22 662.29 5298.31
2 2026-10-17 23:59:27 2026-10-26 12:05:13 357.52 2860.17
The query output above shows the over the last 9 days (the retention of AWR statistics in this database), the instances peak redo generation rates were 662 MB/s and 357 MB/s respectively.
To find the top 10 rates in a day for each instance:
col METRIC_UNIT format A17
set pagesize 30 linesize 165
BREAK ON instance_number SKIP 1;
WITH redo_history AS (
SELECT instance_number,
TRUNC(begin_time) AS sample_day,
begin_time,
end_time,
intsize,
metric_unit,
value,
ROW_NUMBER() OVER (
PARTITION BY dbid, instance_number, TRUNC(begin_time)
ORDER BY value DESC, begin_time, end_time
) AS rank_in_day
FROM dba_hist_sysmetric_history
WHERE metric_name = 'Redo Generated Per Sec'
)
SELECT instance_number,
TO_CHAR(sample_day, 'YYYY-MM-DD') AS sample_day,
TO_CHAR(begin_time, 'HH24') || ':00' AS peak_hr,
TO_CHAR(begin_time, 'HH24:MI:SS') AS begin,
TO_CHAR(end_time, 'HH24:MI:SS') AS end,
ROUND(value / 1000000, 2) AS mb_per_sec,
ROUND(value * 8 / 1000000, 2) AS mbit_per_sec
FROM redo_history
WHERE rank_in_day = 1
ORDER BY instance_number, mbit_per_sec desc;
Sample output:
INSTANCE_NUMBER SAMPLE_DAY PEAK_ BEGIN END MB_PER_SEC MBIT_PER_SEC
--------------- ---------- ----- -------- -------- ---------- ------------
1 2026-10-22 18:00 18:05:02 18:06:01 662.29 5298.31
2026-10-21 07:00 07:38:42 07:39:41 639.31 5114.49
2026-10-20 14:00 14:09:41 14:10:42 568.38 4547.05
2026-10-23 12:00 12:09:46 12:10:46 358.45 2867.56
2026-10-26 08:00 08:46:06 08:47:06 352.93 2823.42
2026-10-19 18:00 18:41:41 18:42:42 47.28 378.25
2026-10-24 00:00 00:07:46 00:08:47 15.3 122.37
2026-10-25 00:00 00:08:46 00:09:47 9.36 74.86
2026-10-18 00:00 00:13:41 00:14:42 6.8 54.38
2026-10-17 23:00 23:59:41 00:00:42 1.02 8.14
2 2026-10-23 12:00 12:24:38 12:25:38 357.52 2860.17
2026-10-26 09:00 09:39:48 09:40:47 356.4 2851.21
2026-10-21 06:00 06:32:27 06:33:27 355.17 2841.35
2026-10-19 18:00 18:47:28 18:48:27 49.95 399.59
2026-10-20 00:00 00:06:28 00:07:27 40.99 327.94
2026-10-24 00:00 00:06:37 00:07:38 29.95 239.61
2026-10-25 00:00 00:07:37 00:08:37 17.01 136.07
2026-10-22 00:00 00:17:28 00:18:28 6.8 54.39
2026-10-18 00:00 00:14:28 00:15:27 6.64 53.1
2026-10-17 23:00 23:59:27 00:00:27 .43 3.43
This output indicates the peak generation rates for each instance per day and the time that rate was reached.
Note: To find the peak redo rate, choose times during the highest level of processing, such as peak OLTP periods, End of Quarter batch processing or End of Year batch processing.
In this short example the highest rate was about 662MB/s. Ideally the network will support the maximum rate plus 30% or ~860MB/s for this application.
Verify Average Redo Write Size
Note For On-Premises configurations only. For Oracle Cloud, MTU size is preconfigured and optimized for the OCI network and cannot be modified.
Using v$sysstats or looking at your AWR reports for various workload and peak intervals, record the average redo write size based on
Average Redo Write Size = “REDO SIZE” / “REDO WRITES”
Use this average redo write size in your iperf experiments. If the average redo write size > 1500 bytes, experiment with various MTU settings.
Measure Current Network Throughput
Use iperf3 TCP tests to measure achievable throughput between primary and standby hosts. iperf3 reports interval bitrate, final sender and receiver bitrate, and TCP retransmissions. Use one stream for the redo transport comparison and parallel streams to assess aggregate copy capacity. iperf3 does not simulate Oracle Data Guard SYNC acknowledgments, redo compression, or Oracle Net encryption; validate those effects with Data Guard measurements.
Note These tests can saturate the link. Keep them short and coordinate with owners of other applications that share the network.
Prepare the hosts
- Install iperf3 on the primary and standby hosts using an approved package source. Confirm that both hosts run compatible iperf3 versions.
- Run iperf3 –version and iperf3 –help on both hosts.
- Choose an available port and run the server on the receiving standby host.
# iperf3 --version
# iperf3 -s -B <standby-VIP> -p <port>
Measure one connection
From the primary host, run a two-minute single-stream TCP test to the standby VIP. Keep the endpoints, port, duration, reporting interval, and output units the same when comparing settings. If the host has multiple network paths, bind the client with -B <primary-transport-IP>.
iperf3 -c <standby-VIP> -p <port> -t 120 -i 20 -f m
iperf3 output for one stream (values are examples, not measured results)
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-20.00 sec 270 MBytes 113 Mbits/sec 0 1.20 MBytes
[ 5] 20.00-40.00 sec 269 MBytes 113 Mbits/sec 0 1.20 MBytes
[ 5] 0.00-120.00 sec 1.58 GBytes 113 Mbits/sec 0 sender
[ 5] 0.00-120.04 sec 1.57 GBytes 112 Mbits/sec receiver
The illustrative single-stream output above is about 113 Mbits/sec at the receiver. The prior 13.466 MB/s value uses approximately 1 MiB per MB, which converts to about 113 Mbits/sec. iperf3 has no built-in -freq equivalent; schedule repeated short tests with the approved host scheduler when time-of-day variation matters.
Measure parallel connections
Repeat the TCP test with two parallel streams (-P 2). Increase the stream count by two until aggregate receiver bitrate stops improving for three consecutive values. Record the stream count that gives the best aggregate result. Parallel iperf3 streams approximate network concurrency; they do not reproduce separate Data Guard processes.
iperf3 -c <standby-transport-IP> -p <port> -t 120 -i 20 -f m -P 2
iperf3 output for two streams ([SUM] is the aggregate)
[SUM] 0.00-120.00 sec 3.21 GBytes 230 Mbits/sec 0 sender
[SUM] 0.00-120.05 sec 3.20 GBytes 229 Mbits/sec receiver
The two-stream output is about 230 Mbits/sec aggregate at the receiver.
Test the reverse direction with -R.
For a reverse test with the same client and server, run: iperf3 -c <standby-transport-IP> -p <port> -t 120 -i 20 -f m -R. The server then sends to the client. Record both directions separately.
Repeat the tests increasing the parallelism to identify the lowest parallelism at which peak throughput is reached. Then repeat for each relevant primary-to-standby node path and add the per-node results for an instantiation estimate.
Optimizing Redo Transport with One and Many Processes
If throughput from the prior single and multiple process tests meet the targets, no additional tuning is required. If higher throughput is required, setting the maximum TCP socket buffers size to a larger value is the primary method to potentially increase throughput.
Setting TCP Socket Buffer Size
The TCP socket buffers are system memory buffers which temporarily store incoming and outgoing data. Outgoing data is stored on the write buffers while incoming data is stored on the read buffers. Read and write socket buffers are allocated separately. When a buffer, generally the read buffer, fills up (often do to the application not pulling data out of the buffer fast enough), a message is sent to the sender to slow down or stop sending data. Allocating a larger buffer often improves redo transport by giving the application time to pull data off the wire without stopping the sender.
Tuning TCP socket buffer size is the primary approach to improving ASYNC transport and can improve SYNC transport as well in some cases. Note: With larger socket buffer sizes, TCP selective acknowledgment (SACK) is strongly recommended. Often times this is enabled by default but refer to your operating system documentation for details on confirming or enabling TCP selective acknowledgment.
To set TCP Socket Buffer Size do the following tasks.
Task 1: Determine Optimal Maximum Socket Buffer Size
Find the optimal maximum socket buffer size for a single process on the target network link by running a series of tests.
Note: Bandwidth Delay Product is the product of the network link capacity of a channel and the round time, or latency. The minimum recommended value for socket buffer sizes is 3*BDP, especially for a high-latency, high-bandwidth network. Use iperf to tune the socket buffer sizes.
Task 2: Set Maximum Socket Buffer Size Temporarily
On the primary and standby systems follow these steps to set the maximum socket buffer size for requests. This will be done in memory and will not persist if the server is restarted for any reason.
Do the following steps as root.
- First find the current size of the kernel parameters net.ipv4.tcp_rmem and net.ipv4.tcp_wmem. The values returned are the minimum, default and maximum size for socket buffers which TCP dynamically allocates. If a process requires more than the default given when a socket is created, more buffers will be dynamically allocated up to the maximum value.
# cat /proc/sys/net/ipv4/tcp_rmem 4096 87380 6291456 # cat /proc/sys/net/ipv4/tcp_wmem 4096 16384 4194304 - Change the values to 16MB or whatever 3*BDP was calculated to be
# sysctl -w net.ipv4.tcp_rmem='4096 87380 16777216'; # sysctl -w net.ipv4.tcp_wmem='4096 16384 16777216';
Note: Increasing these values can increase system memory usage of any network socket on the system.
Note: Changes made with sysctl are not permanent. Update the /etc/sysctl.conf file to persist these changes through machine restarts. There will be a step to change the configuration file at the end of this process once the proper setting is determined.
OCI Exadata Cloud (ExaDB-D and ExaDB C@C) defaults for Data Guard configurations are:
net.ipv4.tcp_rmem='4096 87380 33554432'
net.ipv4.tcp_wmem='4096 16384 33554432'
Task 3: Repeat the single and parallel tests
Repeat the previous two tests with higher values for tcp_rmem and tcp_wmem if more throughput is needed. Understand that these higher values are available for other sockets as well but will be dynamically allocated only if needed. The table shows sample data tracking the different throughput results for different socket buffer sizes.
| tcp_rmem maximum | tcp_wmem maximum | Single Process Throughput | Single Node Multi-Process Maximum Aggregate Throughput | Single Node Multi-Process Parallelism |
|---|---|---|---|---|
| 6291456 | 4194304 | 13.5 MB/s | 203 MB/s | 16 |
| 8388608 | 8388608 | 48 MB/s | 523 MB/s | 14 |
| 16777216 | 16777216 | 73 MB/s | 700 MB/s | 14 |
| 33554432 | 33554432 | 132 MB/s | 823 MB/s | 14 |
Task 4: Set Parameters Permanently
Changes using sysctl modify the values in memory which do not persist through a reboot of the host. Once the optimal size for socket buffers is determined, set the kernel parameters so they persist through server restarts by editing the /etc/sysctl.conf file.
This must be done on all nodes of the primary and standby systems.
To make these changes persistent, edit the /etc/sysctl.conf either modifying the existing values or adding these values to the file if they are absent.
net.ipv4.tcp_rmem='4096 87380 16777216'
net.ipv4.tcp_wmem='4096 16384 16777216'
**Task 5: Evaluate Larger MTU (On-Premises Only) **
Determine the network interfaces that are used by the Data Guard transport.
If Average Redo Write Size > current MTU setting (for example, typically the default 1500), evaluate if jumbo frames (for example, MTU=9000) can reduce the network RTT for these large network packets and improve overall redo throughput.
Shown here is an example of changing the MTU for Data Guard transport network interface for testing purposes on Linux.
ifconfig bondeth0 mtu 9000 up
Repeat the same testing methodology as described above with the higher MTU size to see if greater throughput is achieved.
If performance gains are noticed, work with system and network engineers to change MTU size for DG transport for both primary and standby databases.
Using This Data
The throughput numbers can be used to determine throughput to aid in Redo Transport and Instantiation situations.
Redo Transport
If the single process throughput does not exceed the single instance redo generation rate for a primary database, the standby will not stay current with the primary during these times. Further evaluation and network tuning by the network engineering team may be required in these cases.
Instantiation
Once the maximum aggregate throughput of all nodes is understood, a rough estimate for instantiation can be developed. As an example, if there is a 100 TB database on a 2-node RAC to be instantiated and each node can achieve 300 MB/s it should take about 50 hours to copy the data files. Additional work to instantiate will add some percentage to that number (~30%).
300 MB/s * 60 seconds/minute * 60 minutes/hour * 2 nodes = ~2 TB/hr aggregate for both nodes
100TB / 2TB/hr = ~50 hours
The steps to instantiate a database using large database optimizations such as using multiple nodes is described in < KB110772 Creating a Physical Standby database using RMAN restore database from service >
For instantiation of Hybrid Data Guard using Oracle Cloud Infrastructure refer to : < part VIII: Oracle Data Guard Hybrid Cloud Configuration >
For Migrations to OCI refer to: https://www.oracle.com/database/zero-downtime-migration/
Determining Oracle Data Guard Protection Mode
Oracle Data Guard can run in three different protection modes, which cater to different performance, availability, and data loss requirements. Use this guide to determine which protection mode fits your business requirements and your potential environmental constraints.
Maximum Protection mode guarantees that no data loss will occur if the primary database fails, even in the case of multiple failures (for example, the network between the primary and standby fails, and then at a later time, the primary fails). This policy is enforced by never signaling commit success for a primary database transaction until at least one synchronous Data Guard standby has acknowledged that redo has been hardened to disk. Without such an acknowledgment the primary database will stall and eventually shut down rather than allow unprotected transactions to commit.
To maintain availability in cases where the primary database is operational but the standby database is not, the best practice is to always have a minimum oftwo synchronous standby databases in a Maximum Protection configuration. Primary database availability is not impacted if it receives acknowledgment from at least one synchronous standby database.
Choose this protection mode if zero data loss is more important than database availability. Workload impact analysis is recommended to measure whether any overhead is acceptable when enabling SYNC transport.
Maximum Availability mode guarantees that no data loss will occur in cases where the primary database experiences the first failure to impact the configuration. Unlike the Maximum Protection mode, Maximum Availability will wait a maximum of NET_TIMEOUT seconds for an acknowledgment from any of the standby databases, after which it will signal commit success to the application and move to the next transaction. Primary database availability (thus the name of the mode) is not impacted by an inability to communicate with the standby (for example, due to standby or network outages). Data Guard will continue to ping the standby and automatically re-establish connection and resynchronize the standby database when possible, but during the period when primary and standby have diverged there will be data loss should a second failure impact the primary database.
For this reason, it is a best practice to monitor protection level, which is simplest using Enterprise Manager Grid Control, and quickly resolve any disruption in communication between the primary and standby before a second failure can occur. This is the most common zero data loss database protection mode.
Choose this protection mode if zero data loss is very important but you want the primary database to continue to be available even with the unlikely case that all standby databases are not reachable. You can complement this solution by integrating multiple standby databases or using Far Sync instances to implement a zero data loss standby solution across a WAN. Workload impact analysis is recommended to measure whether any overhead is acceptable when enabling SYNC transport.
Maximum Performance mode is the default Data Guard mode, and it provides the highest level of data protection that is possible without affecting the performance or the availability of the primary database. This is accomplished by allowing a transaction to commit as soon as the redo data needed to recover that transaction is written to the local online redo log at the primary database (the same behavior as if there were no standby database). Data Guard transmits redo concurrently to 1) the standby database directly from the primary log buffer and 2) to the local online redo log write asynchronously enabling a very low potential data loss if the primary site is lost. There is never any wait for standby acknowledgment but the potential data loss for this data protection mode can still be near zero..
Similar to Maximum Availability mode, it is a best practice to monitor the protection level using Enterprise Manager Grid Control, and quickly resolve any disruption in communication between primary and standby before a second failure can occur.
Choose this mode if minimum data loss is acceptable and zero performance impact on the primary is required.
Offloading Queries to a Read-Only Standby Database
Offloading queries and reporting workloads to read-only standby databases can free up your primary database system resources, giving you the ability to add more users, workloads, or even databases.
When you leverage both primary and standby database resources, your business and your applications benefit with higher total system usage, and potentially higher application throughput.
Offload appropriate workloads by following these steps.
- Identify which application modules are read-only or read-mostly.
- Evaluate whether you have application services or modules that are read-only.
- Small and short read-only queries are good candidates to offload to the standby database.
- Short DMLs, especially those that are response-time sensitive, should not be offloaded to the standby.
- Large reports or analytic reports are good candidates to offload.
- Reports that are primarily reads, and that may have an infrequent DML, typically at the start or end of a report, may be good candidates to offload. To enable DML Redirection, see ADG_REDIRECT_DML.
- Gather information about the expected application performance, throughput, response time, or elapsed time service levels for each offload candidate.
- Once you have determined which queries and reports are good candidates to offload, find out the required expected and maximum response time or elapsed time for each of them. For example some large analytic reports must complete within a 2 hour time span.
- For short queries, determine the expected response time and throughput expectations.
- These requirements are sometimes referred to as application performance Service Level Agreements, which you need for the next step.
- Test the performance of each candidate on the standby, and determine whether it meets your requirements.
- Even though the primary and standby databases have essentially identical data, they are independent databases, independent machines, independent configurations, and have different workloads. For example, an Active Data Guard read-only standby database has a redo apply workload plus the queries that are offloaded, while the primary database may have OLTP, batch, and query workloads.
- Reported elapsed times, query response time, and workload performance may vary between the primary and standby due to these system, configuration, and workload differences.
- Tuning requires that you understand system resources, SQL plans, and individual query CPU and wait profile. The tuning recommendations are applicable for both primary and standby databases. See Diagnosing and Tuning Database Performance .
- Offload a subset of the queries that meet your performance requirements, freeing up resources on the primary database for additional processing capacity.
- Once you have determined which queries and reports can be offloaded, and the performance of those activities are acceptable, then slowly offload some of the workload and monitor it.
- Do not oversubscribe and offload too much workload to the standby such that redo apply cannot keep pace after tuning. If the standby falls behind. then you lose that standby as a viable role transition target, and in most cases a standby that lags cannot be used to offload queries.
What if a specific query does not meet your requirements?
- Consult with a performance engineer and follow the recommendations in Database Performance Tuning Guide.
-
A particular query response time or throughput or report elapsed time is not guaranteed to be the same on the standby system as it was on the primary. Analyze the system resources, SQL plans, overall CPU work time and wait times.
For example, you may see
standby query scn advance waitis contributing to a much longer elapsed time in one of your short queries. This wait increase is attributed to Active Data Guard redo apply. If a query sees a certain row in a data block and needs to roll it back because the transaction has not committed as of the query System Commit Number (SCN), it needs to apply corresponding undo to get a consistent read for that query. If the redo for the corresponding undo change has not been applied by redo apply yet, the query needs to wait. The presence of such wait is itself not an issue, and typically may be a couple of milliseconds, but it will vary by workload and may be higher in Real Application Cluster database systems.