oracle redo 最佳实践
怎么确定redo 大小?
Configure Online Redo Logs Appropriately
Redo log switching has a significant impact on redo transport and apply performance. Follow these best practices for sizing the online redo logs on the primary and standby databases.
Following these guidelines for online redo logs.
All online redo log groups should have identically sized logs (to the byte).
Online redo logs should reside on high performing disks (DATA disk groups).
Create a minimum of three online redo log groups per thread of redo on Oracle RAC instances.
Create online redo log groups on shared disks in an Oracle RAC environment.
Multiplex online redo logs (multiple members per log group) unless they are placed on high redundancy disk groups.
Size online redo logs to switch no more than 12 times per hour (every ~5 minutes). In most cases a log switch every 15 to 20 minutes is optimal even during peak workloads.
Sizing Redo Logs
SQL> SELECT thread#,sequence#,blocksblock_size/1024/1024 MB,(next_time-first_time)86400 sec,
blocksblock_size/1024/1024)/((next_time-first_time)86400) "MB/s"
FROM v$archived_log WHERE ((next_time-first_time)*86400<>0) and first_time
between to_date('2015/01/15 08:00:00','YYYY/MM/DD HH24:MI:SS')
and to_date('2015/01/15 11:00:00','YYYY/MM/DD HH24:MI:SS') and dest_id=1 order by first_time;
THREAD# SEQUENCE# MB SEC MB/s
2 2291 29366.1963 831 35.338383
1 2565 29365.6553 781 37.6000708
2 2292 29359.3403 537 54.672887
1 2566 29407.8296 813 36.1719921
2 2293 29389.7012 678 43.3476418
2 2294 29325.2217 1236 23.7259075
1 2567 11407.3379 2658 4.29169973
2 2295 29452.4648 477 61.7452093
2 2296 29359.4458 954 30.7751004
2 2297 29311.3638 586 50.0193921
1 2568 3867.44092 5510 .701894903
Recommended Redo Log Size
Peak Redo Rate Recommended Redo Log Size
<= 1 MB/s 1 GB
<= 5 MB/s 4 GB
<= 25 MB/s 16 GB
<= 50 MB/s 32 GB
50 MB/s 64 GB
Use Standby Redo Log Groups
Configure the standby redo log groups on all primary and standby databases for improved availability and performance.
For each redo log thread--a thread is associated with an Oracle RAC database instance--the number of standby redo log groups must be greater than or equal to (>=) the number of online redo log groups.
Consider the following additional guidelines when creating standby redo log groups.
All online redo logs and standby redo log groups should have identically sized logs (to the byte). Standby redo logs are not used if they are not the same size as the online redo logs.
All standby redo log groups should have identically sized logs (to the byte) on both the primary and standby databases.
Standby redo logs should reside on high performing disks (DATA disk group).
Standby redo logs should be multiplexed (multiple members per log group) unless placed on high redundancy disk groups. Multiplexing standby redo logs is optional in all cases because Data Guard can fetch any missing redo.
In an Oracle RAC environment, create standby redo logs on a shared disk.
In an Oracle RAC environment, assign a thread to each standby redo log group.
High Availability Overview and Best Practices
https://docs.oracle.com/en/database/oracle/oracle-database/21/high-availability.html