How To Optimize A Data Guard Configuration
How To Optimize A Data Guard Configuration
GuardGeek
Configuration
Diary
by admin (https://www.thegeekdiary.com/author/sandeep_patil/)
In this post, we will see how to monitor the configuration performance of data guard along with
optimization of SQL apply and redo transport for best performances.
Redo Generation Rate: Shows the redo generation rate (in KB per second) on the primary
database.
Apply Rate: Shows the apply rate (in KB per second) on the standby database. The “Apply
Rate When Active” statistic indicates the actual apply rate averaged over the last three log
files.
Lag Time: Shows the transport lag and apply lag. Transport lag is the approximate amount
of redo (in seconds) that is not yet available on the standby database. Apply lag is the
approximate number of seconds by which the standby database is behind the primary
database
On the Performance Overview page, you can invoke a test application to generate a workload on
the primary database. This provides a way to view performance metrics when the primary
database is operating under a load.
Optimizing Redo Transport Services
Optimize redo transport with the following techniques:
The REOPEN attribute of the LOG_ARCHIVE_DEST_n parameter specifies the minimum number
of seconds before the process that is shipping the redo should try again to access a previously
failed destination.
REOPEN applies to all errors and not only connection failures. These errors include (but are not
limited to) network failures, disk errors, and quota exceptions.
Summary
This property specifies the minimum number of seconds before the archiver process tries
to access a previously failed destination.
Broker default: 300
Set for the standby database or Far Sync instance.
The setting is propagated to the REOPEN attribute of the LOG_ARCHIVE_DEST_n
initialization parameter of the
di i t
sending instance.
Summary
This property specifies the number of seconds that the log writer process (LGWR) waits for
Oracle Net Services to respond to a request.
Broker default: 30
The setting is propagated to the NET_TIMEOUT attribute of the LOG_ARCHIVE_DEST_n
initialization parameter of the sending instance.
This architecture increases the redo transfer rate and enables faster redo transmission to
standby databases for bulk batch updates on the primary database. As a result of the
improvement in transfer rates, there is an increased availability of data at the standby database
site.
Redo compression can be enabled or disabled by setting the Oracle Data Guard broker’s
RedoCompression property. The setting is propagated to the COMPRESSION attribute of the
LOG_ARCHIVE_DEST_n initialization parameter. Redo compression is disabled by default.
When you add a database to the Data Guard configuration, the Data Guard broker automatically
detects whether network compression is enabled or disabled for the standby database being
added. The property is set accordingly.
Note: Use of this feature requires the Oracle Advanced Compression option.
Summary
– This can be enabled for all redo transport methods (ASYNC and SYNC).
– The setting is propagated to the COMPRESSION attribute of the LOG ARCHIVE DEST _ __n
initialization parameter.
For example, if a critical table is accidentally dropped from the primary database, you can
prevent this action from affecting the standby database by delaying the application of the
change in the standby database.
When operating in maximum protection or maximum availability mode, Data Guard ensures
zero data loss even with the delayed apply in effect. If you define a delay for a destination that
has real-time apply enabled, the delay is ignored.
Note: You can use Flashback Database as an alternative to the Apply Delay configuration
option. Using Flashback Database is an Oracle best practice.
Broker default: 0 (meaning that apply services applies redo data as soon as possible)
1. On the Data Guard page, select your standby database and click Edit.
2. On the Edit Standby Database Properties page, click Standby Role Properties.
3. In the Apply Delay field enter the delay value (in minutes)
4. Click Apply.
Here,
APPLY_SERVERS: The number of APPLIER processes that are used to apply changes
MAX_SERVERS: The number of processes that SQL Apply uses to read and apply redo
PREPARE_SERVERS: The number of PREPARER processes that are used to prepare changes
Note: See the See the Oracle Database PL/SQL Packages and Types Reference Oracle
Database PL/SQL Packages and Types Reference for detailed for detailed information
about the DBMS_LOGSTDBY.APPLY_SET procedure.
1. Determine whether APPLIER processes are busy by issuing the following query:
2. After ensuring that there are no idle APPLIER processes, determine whether there is enough
work available for additional APPLIER processes by issuing the following query:
The second query returns two statistics that provide a cumulative total: the number of
transactions that are ready to be applied by the APPLIER processes and the number of
transactions that have already been applied. If the difference between “transactions mined” and
“transactions applied” is higher than twice the number of available APPLIER processes, an
improvement in throughput is possible if you increase the number of APPLIER processes.
Before you increase the number of APPLIER processes, consider the following requirement:
The number of transactions ready to be applied is less than the number of available
APPLIER processes.
There are idle APPLIER processes.
Perform the following queries to verify the preceding conditions:
2. Determine whether the number of transactions ready to be applied is less than the number of
APPLIER processes:
Before you increase the number of PREPARER processes, consider the requirement:
You may need to increase the value of MAX_SERVERS before increasing the value of
PREPARE_SERVERS. Use the DBMS_LOGSTDBY.APPLY_SET procedure to increase the values of
MAX_SERVERS and PREPARE_SERVERS, as shown in the following example:
SQL> EXECUTE DBMS_LOGSTDBY.APPLY_SET('MAX_SERVERS', 26);
SQL> EXECUTE DBMS_LOGSTDBY.APPLY_SET('PREPARE_SERVERS', 3);
Copyright (https://www.thegeekdiary.com/copyright-terms-and-privacy-policy/)