Saturday, October 10, 2026

Understanding Scalability in Oracle Database Environments

 Understanding Scalability in Oracle Database Environments

1. Scalability: Beyond Processing More Transactions

Scalability describes how efficiently a system handles workload growth as demand increases. From an Oracle Database perspective, the objective is not simply to process more transactions, but to increase throughput without a disproportionate increase in resource consumption or response time.

Consider an application that processes 5,000 transactions per second. If the workload doubles, an efficiently designed system should be able to approach twice the throughput with a proportional increase in resource consumption, provided that no other architectural constraints become dominant.

Real-world systems rarely behave this perfectly. Additional workload can introduce contention, increase coordination overhead, and expose inefficient resource utilization. As a result, the cost of processing each transaction may increase as concurrency and data volumes grow.

Several factors can contribute to this behavior:

  • Concurrency and serialization: More sessions compete for shared resources, and transactions may wait for locks or other dependencies before proceeding.
  • Data consistency overhead: Maintaining consistent data under concurrent modifications introduces coordination and synchronization costs.
  • SQL execution efficiency: Inefficient execution plans, inappropriate indexing, and unnecessary logical I/O increase the work required to return the same result.
  • Data growth: Queries and transactions may access progressively more data as tables and indexes grow.
  • Operating-system overhead: Excessive process creation, context switching, and memory pressure can consume resources without delivering additional business throughput.
  • Maintenance and availability: As database objects grow, operations such as index maintenance, statistics collection, and other administrative tasks may take longer, potentially affecting maintenance windows and service availability.

These factors explain why increasing the number of users does not always translate into a proportional increase in useful work.

2. When Does a System Stop Scaling?

A system reaches a scalability limit when one or more constrained resources prevent additional workload from producing meaningful throughput improvements.

For example, imagine an Oracle Database workload in which a large number of concurrent transactions repeatedly execute SQL statements that perform extensive table scans. As demand increases, those statements may consume more CPU and storage bandwidth, eventually limiting the throughput available to other transactions.

Other common examples include:

  • CPU saturation caused by excessive processing or inefficient SQL.
  • Storage bottlenecks caused by high I/O demand or inefficient access patterns.
  • Memory pressure that leads to operating-system paging and swapping.
  • Excessive network round trips that increase latency and consume processing capacity.
  • High session or process counts that increase scheduling and resource-management overhead.
  • Transaction contention that forces sessions to wait instead of executing concurrently.

An important distinction is that a resource can become a bottleneck before it reaches 100% utilization. For example, a serialized transaction path or a heavily contended shared resource may limit throughput even when spare CPU capacity remains available.

For this reason, scalability analysis should consider both resource utilization and the amount of useful work completed.

3. System Scalability in Modern Applications

Modern applications introduce additional challenges because their workloads are often variable, geographically distributed, and difficult to predict.

Internet-facing services and internal business applications increasingly share similar requirements: high availability, unpredictable concurrency, rapid response times, and continuous access to critical business data.

Several architectural characteristics make scalability particularly important:

  • Continuous availability: Applications may need to remain operational around the clock, leaving limited opportunities for maintenance.
  • Unpredictable demand: User populations and transaction rates can change significantly during peak periods.
  • Multitier architectures: Requests pass through application servers, connection pools, network layers, and database services, creating multiple potential bottlenecks.
  • Stateless middleware: Application tiers can scale horizontally, but the database must still handle the resulting increase in concurrent requests.
  • Short delivery cycles: Limited testing time can allow architectural weaknesses to remain undetected until production.
  • Variable query patterns: Applications may combine high-volume transactional operations with reporting and analytical queries that have very different resource requirements.

Oracle Database scalability must therefore be considered in the context of the complete application architecture. Scaling the application tier alone does not guarantee that the database tier can absorb the additional workload.

For example, increasing the number of application servers may increase the number of concurrent database sessions. If connection management, SQL efficiency, or transaction design is inadequate, the additional application capacity can intensify database contention rather than improve end-to-end throughput.

4. Workload Growth and the Limits of Hardware Scaling

Workload growth is not always gradual or predictable. Demand may increase faster than infrastructure capacity, particularly when an application becomes more widely adopted or new business services are introduced.

Hardware expansion can provide additional processing power, memory, and I/O capacity. However, the benefit depends on whether the application's architecture can use those resources effectively.

Consider an Oracle RAC environment. Adding database instances may increase available CPU capacity, but workloads involving frequent access to the same data blocks can incur additional inter-instance coordination. Similarly, adding CPU cores to a single-instance database will not eliminate a SQL execution bottleneck or a transaction dependency that requires serialized execution.

The same principle applies to storage and networking. Additional bandwidth cannot compensate indefinitely for inefficient SQL that generates unnecessary I/O, and a faster interconnect cannot remove the application-level serialization caused by transactions competing for the same resource.

The practical implication is that scalability must be evaluated at two levels:

1.        Application scalability: Can the workload execute efficiently as concurrency and data volumes increase?

2.        Infrastructure scalability: Can additional hardware resources translate into increased throughput without introducing disproportionate overhead?

A weakness at either level can limit the benefits of expansion.

5. Why Scalability Must Be Addressed During Design

Application development frequently involves competing priorities, including delivery deadlines, new features, and time-to-market requirements. Performance testing may consequently be performed with limited data volumes or concurrency levels that do not represent production conditions.

An application can perform acceptably during initial deployment while containing architectural limitations that become visible only when demand increases.

Retrofitting such a system may require changes to SQL, data models, transaction boundaries, connection management, or the overall architecture. These changes can be substantially more disruptive when the application is already serving business-critical workloads.

For Oracle Database projects, scalability should therefore be considered throughout the development lifecycle:

  • Design SQL and data structures with expected data volumes in mind.
  • Minimize unnecessary work and avoid transaction patterns that create excessive contention.
  • Establish realistic concurrency and workload models.
  • Test execution plans and resource consumption with representative data.
  • Measure throughput and response time as workload increases.
  • Identify the point at which additional demand stops producing proportional throughput gains.
  • Validate the benefits of vertical scaling or horizontal scaling before committing to infrastructure expansion.

The objective is not to eliminate every scalability limitation. It is to identify architectural constraints early enough that they can be addressed before they become production bottlenecks.

So, Scalability is a property of the entire system, not simply a measure of available CPU, memory, or storage capacity.

In Oracle Database environments, efficient SQL execution, appropriate transaction design, controlled concurrency, and balanced infrastructure all contribute to the ability to process increasing workloads.

Adding hardware can extend capacity, but it cannot automatically correct inefficient processing or eliminate serialization.

The most scalable system is not necessarily the one with the most resources. It is the one that converts available resources into useful throughput efficiently as demand grows.

That is why scalability should be an architectural requirement from the beginning—not a problem addressed only after performance starts to deteriorate.

 

Oracle Database Scalability: Why Adding More CPU Does Not Always Mean More Throughput

Can an Oracle Database handle twice the workload simply by doubling its CPU resources?

In theory, a linearly scalable system should process twice the workload with approximately twice the resources, while maintaining comparable performance characteristics.

In real Oracle Database environments, however, scalability depends on much more than CPU capacity. SQL execution efficiency, concurrency, locking, memory management, I/O behavior, and RAC interconnect overhead can all prevent additional resources from translating into proportional throughput.

Let’s look at the problem from an Oracle Database perspective.

1. SQL Efficiency: The Foundation of Scalability

Consider an OLTP workload executing thousands of transactions per second.

If SQL statements perform unnecessary logical reads, repeatedly access the same data, or use inefficient execution plans, increasing concurrency multiplies the amount of database work.

For example, returning 100 rows through an efficient index access path can require substantially less work than scanning a large table to return the same result.

As workload increases, inefficient SQL consumes more CPU cycles, buffer cache resources, and potentially physical I/O bandwidth.

This is why SQL tuning, appropriate indexing, execution-plan analysis, and efficient data-access patterns are not merely performance optimizations. They directly influence how far an Oracle Database can scale.

2. Concurrency and Contention: When More Sessions Produce Less Progress

More sessions do not necessarily mean more useful work.

In Oracle Database, concurrent sessions may compete for shared resources, contend for frequently modified blocks, or wait for locks that serialize transaction execution.

Typical areas to investigate include:

  • Row-level lock contention and hot rows.
  • Buffer busy waits and hot database blocks.
  • Latch and mutex contention.
  • Library cache contention and excessive hard parsing.
  • High rates of context switching and excessive session concurrency.

For example, if thousands of transactions repeatedly update the same account or summary row, adding CPU cores does not eliminate the serialization inherent in that access pattern.

The solution may require transaction redesign, reduced contention, better SQL, or changes to the data model—not simply additional hardware.

3. Oracle RAC: Scaling Across Instances Has a Cost

Oracle Real Application Clusters (RAC) allows multiple instances to access the same database. However, adding RAC instances does not guarantee linear scalability.

When data blocks are frequently accessed or modified across instances, Cache Fusion and Global Cache Service (GCS) coordination can introduce additional inter-instance communication.

Depending on the workload, relevant wait events may include:

  • gc current request
  • gc cr request
  • gc buffer busy acquire
  • gc buffer busy release

These events should be interpreted in context, using their frequency, time contribution, object-level activity, and execution workload. Their presence alone does not prove that the interconnect is the bottleneck.

A workload with well-distributed access patterns may scale differently from one involving hot blocks and frequent cross-instance block transfers.

The key principle: RAC adds processing capacity, but the application’s access patterns determine how efficiently that capacity can be used.

4. Logical I/O, Physical I/O, and Memory Pressure

Oracle Database scalability also depends on the amount of work required to process each transaction.

High logical I/O can consume substantial CPU even when the data is already in the buffer cache. Physical I/O can become a bottleneck when SQL statements require excessive data access or when storage latency and throughput limit progress.

Memory pressure introduces another dimension. Poor memory sizing or excessive allocation can affect the buffer cache, PGA usage, work areas, and operating-system memory availability.

When investigating scalability, I would examine:

  • Buffer gets per transaction and per execution.
  • Physical reads and writes, including their latency.
  • CPU time relative to elapsed time.
  • PGA usage and work-area execution statistics.
  • TEMP usage and disk-based sorts or hash operations.
  • Evidence of memory pressure at both database and operating-system levels.

The objective is to reduce the work required per transaction before assuming that the infrastructure needs more capacity.

5. How Do We Measure Oracle Database Scalability?

A useful scalability test should increase workload progressively and observe whether throughput increases proportionally.

For example, compare a baseline workload with a test that doubles concurrent requests.

Measure:

  • Transactions per second (TPS).
  • Average response time and p95/p99 latency.
  • DB CPU consumption and host CPU utilization.
  • Logical reads per transaction.
  • Top foreground wait events and their contribution to DB time.
  • I/O latency, throughput, and queueing.
  • RAC global cache activity, where applicable.

Suppose doubling the workload increases TPS by only 20%, while response time and DB time rise sharply.

This suggests that the system is approaching a bottleneck, but the measurements alone do not identify its cause. The next step is to determine whether the limitation comes from SQL execution, serialization, CPU saturation, I/O, memory, or RAC coordination.

Oracle AWR, ASH, execution plans, SQL Monitor where available, and operating-system metrics can help correlate the observed degradation with the underlying workload.

6. A Practical Approach to Improving Scalability

My preferred sequence is:

1.        Measure the workload: Establish a reliable baseline for throughput, latency, DB time, and resource consumption.

2.        Identify the dominant cost: Determine whether the workload is CPU-bound, I/O-bound, or constrained by concurrency and waits.

3.        Reduce unnecessary work: Tune SQL, validate execution plans, and reduce excessive logical and physical I/O.

4.        Address serialization: Investigate hot blocks, locking, and other contention that additional CPUs cannot eliminate.

5.        Validate the architecture: For RAC, examine workload distribution and global cache activity; for single-instance databases, evaluate the relevant CPU, memory, and I/O limits.

6.        Scale and retest: Add resources only after understanding the bottleneck, then measure the actual improvement under comparable conditions.

7. A Practical Engineering Principle

Scalability should be designed into the application, database, and infrastructure layers from the beginning.

That means:

  • Design transactions to minimize unnecessary serialization.
  • Keep SQL execution efficient as data volumes grow.
  • Use connection pooling and concurrency limits appropriately.
  • Avoid excessive network round trips and unnecessary data movement.
  • Size infrastructure against measured workload characteristics.
  • Test realistic data volumes and concurrency levels before production.
  • Identify bottlenecks before deciding whether to scale vertically, scale horizontally, or redesign the workload.


My takeaway: Hardware scaling can extend a system’s capacity, but good architecture determines how efficiently that capacity is used.

A scalable system is not simply one that can consume more resources. It is one that can turn additional resources into useful throughput without allowing contention, overhead, and inefficient work to grow out of control.

The real engineering challenge is not just scaling the infrastructure. It is scaling the work itself.

What has been the biggest scalability bottleneck in your environment: SQL inefficiency, concurrency, connection management, storage, or distributed-system overhead?

 

Conclusion:

Oracle Database scalability is not simply a hardware-sizing problem. It is the relationship between workload, the amount of work performed per transaction, resource contention, and the database architecture.

Additional CPU, memory, storage bandwidth, or RAC instances can increase capacity—but only when the workload can use those resources efficiently.

The real objective is not just to process more transactions. It is to increase useful throughput without allowing the cost of each transaction to grow disproportionately.

How do you usually approach an Oracle scalability problem: SQL tuning first, wait-event analysis, capacity expansion, or a combination of all three?

**************************************************************

Official references:

These sources support the technical concepts used in the post and are useful for further reading.

1. Oracle Database 26ai : Building Scalable Applications: Covers scalability, concurrency, resource exhaustion, and bind variables.

 https://docs.oracle.com/en/database/oracle/oracle-database/26/tdddg/building-scalable-applications.html

Oracle Database 19c Performance Tuning Guide, “Designing and Developing for Performance.”

https://docs.oracle.com/en/database/oracle/oracle-database/19/tgdba/designing-and-developing-for-performance.html

 

2. Microsoft Azure Well-Architected Framework : Optimizing Code and Infrastructure: Discusses connection pooling, pool sizing, and performance optimization.

 https://learn.microsoft.com/en-us/azure/well-architected/performance-efficiency/optimize-code-infrastructure

 

3. AWS Well-Architected Framework : Improving Query Performance: Explains how query optimization, indexing, and data-store design affect scalability and resource utilization.

 https://docs.aws.amazon.com/wellarchitected/latest/framework/perf_data_implement_strategies_to_improve_query_performance.html

4. AWS Architecture Blog — Architecting for Reliable Scalability: Discusses horizontal scaling, modularity, and designing applications to scale across instances.

https://aws.amazon.com/blogs/architecture/architecting-for-reliable-scalability/

 

Oracle Database 26ai : Building Scalable Applications

— Scalability fundamentals, resource consumption, and application design.

https://www.oracle.com/anz/developer/databases-developers/

Oracle Database 26ai : Real Application Clusters Administration and Deployment Guide

— RAC architecture and administration.

https://docs.oracle.com/en/database/oracle/oracle-database/26/racad/index.html

Oracle Database 26ai : Performance Tuning Guide

— Performance diagnostics, wait events, SQL tuning, and workload analysis.

https://docs.oracle.com/en/database/oracle/oracle-database/26/tdppt/get-started-performance-tuning.pdf

Oracle Database 26ai : SQL Tuning Guide

— Execution plans and SQL optimization.

 https://docs.oracle.com/en/database/oracle/oracle-database/23/tgsql/index.html


*************************Alireza Kamrani*******************************

Sunday, October 4, 2026

Data Guard considerations in RAC environment

The flow of Redo logs Transfer/Apply and commit phase in Data Guard for RAC

Investigating the reasons for Data Guard slowness in an Oracle RAC environment

What are reasons for Data Guard being slow in RAC env?

This statement is important in RAC + Data Guard, because the problem is not simply “Data Guard is slow.” The synchronous redo path can become part of the RAC commit path.

Oracle's documentation explains that with synchronous transport, LGWR can wait for the remote standby write before completing the commit. In RAC, LGWR also has to coordinate with the other RAC instances.

What is actually happening?

A simplified RAC + Data Guard commit path looks like:


 

So, if the network, standby storage, standby server, or redo transport configuration is slow, the effect can eventually appear as higher commit latency on the primary.

Oracle specifically describes this sequence: foreground waits on log file sync, LGWR performs local redo processing, sends redo to a synchronous standby, waits for the remote write, and in RAC also waits for the RAC broadcast acknowledgment.

Redo transport consists of the primary database instance background process sending redo to the standby database background process. You can evaluate whether the network is properly optimized for Oracle Data Guard redo transport. For this, a DBA can use Oracle's oratcptest utility to measure single-stream and multi-stream throughput.

https://docs.oracle.com/en/database/oracle/oracle-database/19/haovw/plan-oracle-data-guard-deployment.html#GUID-CEC2DC1E-4134-4F9C-B0F0-3D9F0D7C5D46

The Oracle utility oratcptest is a general-purpose tool for measuring network bandwidth and latency similar to iperf/qperf which can be run by any OS user.

The oratcptest utility provides options for controlling the network load such as:

  • Network message size
  • Delay time between messages
  • Parallel streams
  • Whether or not the oratcptest server should write messages on disk.
  • Simulating Data Guard SYNC transport by waiting for acknowledgment (ACK) of a packet or ASYNC transport by not waiting for the ACK.

Note: This tool, like any Oracle network streaming transport, can simulate efficient network packet transfers from the source host to target host similar to Data Guard transport. Throughput can saturate the available network bandwidth between source and target servers. Therefore, Oracle recommends that short duration tests are performed and that consideration is given for any other critical applications sharing the same network.

# java -jar oratcptest.jar -help

With asynchronous transport, the primary does not wait for the standby acknowledgment before continuing the local redo processing and, redo data is streamed to the standby in large packets asynchronously.

To tune asynchronous redo transport over the network, you need to optimize a single process network throughput.

If synchronous redo transport is configured, each redo write must be acknowledged by the primary and standby databases before proceeding to the next redo write. You can optimize standby synchronous transport by using the FASTSYNC attribute as part of the LOG_ARCHIVE_DEST setting, but higher network latency (for example, more than 5 milliseconds) impacts overall redo transport throughput. With synchronous transport, the primary must wait for the required standby acknowledgment before the corresponding commit can complete.

 

Understand Your Network Topology for Data Guard

Before troubleshooting Data Guard transport lag, understand the end-to-end infrastructure. Many performance issues attributed to Data Guard are actually caused by the underlying infrastructure.

Document at least:

🔹 Database infrastructure: RAC node count, CPU, memory, and storage I/O
🔹 Network topology: switches, firewalls, routing, and connectivity
🔹 Network capacity: bandwidth and RTT between Primary and Standby
🔹 Redo transport: peak redo generation and per-RAC-instance throughput

Two network-intensive phases deserve special attention:

-           Standby Instantiation
Optimize the degree of parallelism to maximize the throughput when copying database files.

-           Steady-State Redo Transport
Each RAC instance sends redo through its own transport stream. Therefore, single-stream network throughput is critical, not just the aggregate bandwidth.

For symmetric Primary/Standby infrastructure with a properly tuned network capable of handling peak redo generation, Oracle notes that transport lag should generally be less than 1 second.

Tip: Don't troubleshoot Data Guard in isolation. Map the complete path:

Primary → Network → Firewall/Switches → Network → Standby

Then validate that every component can support the required redo transport rate.

 

Assessing and Optimizing Network Performance in Oracle Data Guard

Oracle Data Guard transport performance is not only about bandwidth. The network must be able to sustain the peak redo generation rate of each primary RAC instance.

 

A few key points I consider when assessing a Data Guard network:

🔹 Measure peak redo generation : average AWR rates can hide short workload spikes.
🔹 Test single-stream throughput : each RAC instance ships redo through a single network stream, so per-process throughput matters.
🔹 Check latency and reliability : temporary packet loss, retransmissions, firewalls, or overloaded network devices can quickly create transport lag.
🔹 Validate socket buffers and MTU : OS socket tuning and Jumbo Frames can significantly improve throughput in some environments.
🔹 Be careful with encryption and compression : Oracle Net encryption and COMPRESSION=ENABLE can introduce CPU/throughput overhead. Compression should generally be considered when network bandwidth is the limiting factor.
🔹 Use oratcp for controlled network testing: compare throughput under different MTU, socket-buffer, encryption, and network conditions.

One important sizing principle:

Required network capacity should be based on peak redo generation, with additional headroom, not simply the average redo rate.

For example, if peak redo generation reaches 52 MB/s, designing for approximately 68 MB/s (+30%) provides additional capacity for workload fluctuations.

A healthy Data Guard network should be validated end-to-end: Primary → Network → Standby, rather than assuming that a high-speed network link automatically means sufficient redo transport performance.

 

1. LOG FILE SYNC does not automatically mean "Data Guard problem"

This is an important distinction.

log file sync is the time the foreground waits for LGWR to complete the commit operation.

It can be affected by:

  • local redo I/O
  • CPU scheduling
  • excessive commit frequency
  • RAC inter-instance coordination
  • Data Guard synchronous transport
  • network latency
  • standby redo log I/O

So don't look at:

log file sync = 15 ms, and immediately conclude: Data Guard is causing the problem!

Oracle explicitly warns that log file sync averages can be misleading when evaluating synchronous Data Guard impact.

You need to correlate it with the redo transport waits.

https://docs.oracle.com/en/database/oracle/oracle-database/26/haovw/redo-transport-troubleshooting-and-tuning.html

 

2. The important Data Guard waits

For synchronous transport, I would look at:

·         LNS wait on SENDREQ

·         LNS wait on ATTACH

·         LNS wait on DETACH

Oracle documents these as redo transport wait events. LNS wait on SENDREQ is particularly interesting because it represents time spent waiting for redo data to be written to redo transport destinations.

https://docs.oracle.com/en/database/oracle/oracle-database/26/sbydb/oracle-data-guard-redo-transport-services.html

Also examine:

·         SYNC remote write

and, depending on the version/workload:

·         redo transport related waits

·         log file parallel write

·         log file sync

The key is to determine where the latency is introduced.

 

3. SYNC/AFFIRM can directly increase commit latency

Suppose you have:

LOG_ARCHIVE_DEST_2='SERVICE=STBY SYNC AFFIRM VALID_FOR= (ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME=STBY'




The primary waits for the standby to acknowledge that redo has been received and written to persistent standby redo storage.

Therefore:

 

Oracle explicitly states that SYNC/AFFIRM provides stronger protection but introduces performance impact because of the standby redo-log I/O.

This is why standby storage latency matters to primary OLTP response time.

https://docs.oracle.com/en/database/oracle/oracle-database/26/sbydb/data-guard-concepts-and-administration.pdf

4. SYNC/NOAFFIRM is different

In Maximum Availability, you can use:

SYNC/NOAFFIRM, also known as Fast Sync.

The standby acknowledges after receiving the redo rather than waiting for the standby redo log write.

That removes the standby storage write latency from the synchronous acknowledgment path.



This can reduce primary commit latency, but there is a trade-off: in a very specific simultaneous-failure scenario, NOAFFIRM can expose some data that has been acknowledged but not yet persisted at the standby.

Ø  So don't blindly change AFFIRM to NOAFFIRM. It is a protection-vs-performance decision.

 

5. NET_TIMEOUT is extremely important

For synchronous transport, I would always review:

NET_TIMEOUT

Oracle recommends specifying NET_TIMEOUT for synchronous transport because it controls how long LGWR waits for acknowledgment before terminating the redo transport connection.

https://docs.oracle.com/en/database/oracle/oracle-database/21/sbydb/oracle-data-guard-redo-transport-services.html

 

Conceptually:



 

 

 

 

 

 

 


If this is badly configured, a network problem can cause a surprisingly long primary-side stall.

You should therefore review:

SQL> show parameter log_archive_dest;

and specifically inspect:

 

·         SYNC

·         AFFIRM / NOAFFIRM

·         NET_TIMEOUT

·         REOPEN

·         VALID_FOR

·         DB_UNIQUE_NAME

 

6. RAC makes the situation more interesting

This is the part behind Oracle's phrase:

"Avoid cluster related waits"

 

 



Imagine:

 

 

 

 

 

 



A commit can involve both:

·         Data Guard remote synchronization

and:

·         RAC inter-instance synchronization

Oracle's documentation describes LGWR waiting for the synchronous remote write and, for RAC, also waiting for the broadcast acknowledgment from the other instances.

Therefore, you can have a situation where:

Data Guard is healthy + RAC interconnect is slow = higher commit latency

or:

RAC interconnect is healthy + Standby network/storage is slow = higher commit latency or both.

 

7. Network latency is more important than just bandwidth

This is another common mistake.

People often check:

·         10 GbE

·         20 GbE

·         25 GbE

and conclude the network is fast enough.

For synchronous Data Guard, latency is critical.

Oracle's current MAA guidance recommends looking at:

  • network topology
  • network bandwidth
  • network latency
  • firewalls
  • encryption
  • socket buffers
  • MTU
  • peak redo generation rate

and states that a well-tuned network with sufficient bandwidth should normally keep transport lag very low.

https://docs.oracle.com/en/database/oracle/oracle-database/26/haovw/high-availability-overview-and-best-practices.pdf

For example:

Redo generation = 300 MB/s

Network = 10 Gb/s

looks excellent from a bandwidth perspective.

But if:  RTT = 15 ms

and the workload is extremely commit-intensive, the application can still experience significant synchronous commit latency!

 

8. Standby storage can become part of the OLTP critical path

This is probably the most important practical point.

With: SYNC + AFFIRM

your primary transaction response time is partly dependent on:

Standby -> RFS -> Standby Redo Log -> Storage -> ACK

So, if standby storage suddenly changes from:

0.5 ms to: 8 ms

you may see the effect on the primary.

That's why I would monitor standby redo log write latency, not just:

Apply Lag

Transport Lag

 

9. Transport Lag and Apply Lag are not the same

This is another common diagnostic mistake.

Transport Lag = Redo generated on primary

Transport lag represents the amount of redo generated on the primary that has not yet been received by the standby.

but not yet received by standby

while:

Apply Lag   = Redo received

but not yet applied

Oracle explicitly distinguishes these two.

Transport lag is more directly related to the ability to ship redo and therefore RPO; apply lag can additionally indicate an RTO concern.

https://docs.oracle.com/en/database/oracle/oracle-database/23/haovw/high-availability-overview-and-best-practices.pdf

 

You can therefore have:

Transport Lag = 0, Apply Lag = 30 sec

meaning:

Network/transport is keeping up, but standby apply is behind.

That's different from:

Transport Lag = 30 sec, Apply Lag = 30 sec

which points much more strongly toward a transport bottleneck.

 

10. What I would check in a RAC/Data Guard performance investigation

My checklist would be:

Primary RAC

    §    log file sync

    §  log file parallel write

    §  redo write time

    §  redo generation rate

    §  commit rate

    §  DB CPU

    §  CPU scheduling

    §  RAC interconnect latency

    §  GC-related waits

 

Data Guard transport

    §  LNS wait on SENDREQ

    §  LNS wait on ATTACH

    §  SYNC remote write

    §  transport lag

    §  redo transport throughput

    §  redo generation vs transport throughput

Network

    §  RTT latency

    §  packet loss

    §  bandwidth

    §  socket buffers

    §  MTU

    §  firewall

    §  network encryption

    §  network congestion

Standby

    §  RFS activity

    §  standby redo log I/O latency

    §  standby redo log configuration

    §  storage latency

    §  CPU

    §  I/O saturation

    §  Redo Apply rate

    §  Apply Lag

    §  Transport Lag

Configuration

    §  SYNC / ASYNC

    §  AFFIRM / NOAFFIRM

    §  NET_TIMEOUT

    §  REOPEN

    §  DATA_GUARD_SYNC_LATENCY

    §  standby redo logs

    §  real-time apply

    §  Data Guard Broker configuration

Oracle also notes that Data Guard automatically tunes redo transport, but network, storage, FRA, and redo-transport configuration can still be tuned when required.

https://docs.oracle.com/en/database/oracle/oracle-database/26/sbydb/oracle-data-guard-redo-transport-services.html

The key RAC + Data Guard relationship

I would summarize the original Oracle statement like this Figure:

 


Every additional millisecond introduced into the synchronous commit path has the potential to affect OLTP commit response time.

And that's why simply saying:

"Data Guard is synchronized and Transport Lag is 0"

does not prove that Data Guard is optimally tuned.

You need to prove that the redo transport path is not becoming the bottleneck in the RAC commit path.

  

Appendix

I’d make it more lab-oriented: show how to measure peak redo, calculate the required throughput, inspect the network, then validate socket buffers and MTU with Oracle’s oratcptest. Current guidance also uses 3× BDP (BDP = Bandwidth × RTT) as a practical upper target for TCP socket buffers on high-latency/high-bandwidth paths.

BDP tells you how much data needs to be "in flight" on the network to fully utilize a link:

For example:

  • Network = 1 Gbit/s and RTT = 20 ms

Convert bandwidth: 1 Gbit/s ÷ 8 = 125 MB/s

Then:       BDP = 125 MB/s × 0.020 s = 2.5 MB

So, the network can have approximately 2.5 MB of data in flight during one RTT.

What does 3× BDP mean?

Simply: 3 × BDP = 3 × 2.5 MB = 7.5 MB

So, you might test TCP socket buffers around 7.5 MB or higher.

The reason for using a multiple such as 3× is to provide enough TCP buffering to keep the link busy despite network timing variations, congestion, retransmissions, and TCP behavior.

 

Why is this important for Data Guard?

Imagine your Data Guard network is:

Primary RAC --à-------1 Gbit/s ----- RTT = 20 ms -------------à Standby

 

If the TCP buffers are too small, the sender may not be able to keep enough redo data in flight before waiting for acknowledgements.

You could have:

Network capacity:       125 MB/s

Peak redo generation:    80 MB/s

but still experience poor redo transport throughput because of insufficient TCP buffering.

That's particularly relevant for high-bandwidth / high-latency Data Guard links.

Important distinction

3× BDP is not "set the network bandwidth to 3×."

It means approximately:

 

TCP socket buffer ≈ 3 × (Bandwidth × RTT)

 

For example:

Bandwidth

RTT

BDP

3× BDP

1 Gbit/s

1 ms

125 KB

375 KB

1 Gbit/s

10 ms

1.25 MB

3.75 MB

1 Gbit/s

20 ms

2.5 MB

7.5 MB

10 Gbit/s

20 ms

25 MB

75 MB

10 Gbit/s

50 ms

62.5 MB

187.5 MB

 

This is why RTT becomes extremely important for Data Guard across geographically separated sites.

Oracle Data Guard: Measuring and Optimizing Redo Transport Network Performance

When investigating Data Guard transport lag, one of the first questions I ask is:

Can the network transport redo faster than the primary generates it?

A simple bandwidth test such as iperf3 is useful, but Data Guard has an important characteristic: each primary RAC instance ships redo through its own transport stream. Therefore, single-stream throughput matters, not only aggregate network bandwidth.

1- Measure the actual peak redo rate

Instead of relying only on 30/60-minute AWR averages, I prefer measuring redo generation over individual archived logs:

SELECT

    THREAD#,

    SEQUENCE#,

    BLOCKS * BLOCK_SIZE / 1024 / 1024 AS REDO_MB,

    (NEXT_TIME - FIRST_TIME) * 86400 AS SECONDS,

    (BLOCKS * BLOCK_SIZE / 1024 / 1024) /

    ((NEXT_TIME - FIRST_TIME) * 86400) AS REDO_MB_SEC

FROM V$ARCHIVED_LOG

WHERE (NEXT_TIME - FIRST_TIME) * 86400 <> 0

  AND FIRST_TIME BETWEEN

      TO_DATE('2026/10/03 08:00:00','YYYY/MM/DD HH24:MI:SS')

  AND TO_DATE('2026/10/03 12:00:00','YYYY/MM/DD HH24:MI:SS')

  AND DEST_ID = 1 ORDER BY FIRST_TIME;

 

 

For example, if the peak rate is 52 MB/s per RAC instance, I would not design the transport network for exactly 52 MB/s.

With 30% headroom:

52 × 1.3 ≈ 68 MB/s

For multiple RAC instances, evaluate the requirement per instance and for the aggregate path.

2- Check average redo write size

SELECT

    NAME,

    VALUE

FROM V$SYSSTAT

WHERE NAME IN ('redo size', 'redo writes');

Then:

Average Redo Write Size =

    REDO SIZE / REDO WRITES

This number is useful when evaluating MTU because the optimal network behavior depends on the actual redo message characteristics.

3- Calculate the TCP Bandwidth-Delay Product

For example:

Network bandwidth = 1 Gbit/s

RTT = 20 ms

BDP = 1,000,000,000 / 8 × 0.020 = 2.5 MB

Oracle recommends considering socket-buffer sizes based on BDP; current Oracle guidance indicates 3× BDP as a practical target for high-latency/high-bandwidth environments.

Check Linux:

sysctl net.ipv4.tcp_rmem

sysctl net.ipv4.tcp_wmem

sysctl net.core.rmem_max

sysctl net.core.wmem_max

Example test values:

sysctl -w net.ipv4.tcp_rmem='4096 87380 16777216'

sysctl -w net.ipv4.tcp_wmem='4096 16384 16777216'

Do not blindly copy these values into production—the correct values should be determined through testing against the actual bandwidth and RTT. Oracle also recommends making tested values persistent in /etc/sysctl.conf.

4- Test the network with Oracle oratcptest

Rather than testing only with generic network tools, use Oracle's oratcptest to evaluate TCP throughput and socket-buffer behavior.

On the standby:

java -jar oratcptest.jar -server [IP of standby host or VIP in RAC configurations] -port=<any available port number>

Then from the primary, connect to the standby and test the transport path.

Run the test client. (Change the server address and port number to match that of your server started)

$ java -jar oratcptest.jar [IP of standby host or VIP in RAC configurations]  -port=<port number> -mode=async -duration=120 -interval=20s

This process can be scheduled to run at a given frequency using the -freq option to determine if the bandwidth varies at different times of the day. For instance setting -freq=1h/24h will repeat the test every hour for 24 hours.

Run the test with different socket-buffer sizes and compare:

Socket Buffer     Throughput

-------------     ----------

1 MB              ...

4 MB              ...

8 MB              ...

16 MB             ...

32 MB             ...

The objective is to find the point were increasing the socket buffer no longer produces meaningful throughput improvement.

Oracle notes that oratcptest reports approximately half of the socket buffer allocated to the socket, so interpret the reported value accordingly.

5- Test MTU 1500 vs 9000

First establish the current MTU:

ip link show

or:

ip addr show

Then test the path:

ping -M do -s 8972 <standby-ip>

If the network is designed for Jumbo Frames, test MTU 9000 end-to-end.

For example:

ip link set dev bond0 mtu 9000

Then repeat the oratcptest measurements.

The important point is measurement, not assumption: MTU 9000 is not automatically faster. Oracle specifically recommends comparing the throughput with the existing MTU and a larger MTU such as 9000.

6- Check Data Guard configuration

Finally, check whether compression or Oracle Net encryption is affecting the transport path:

SELECT DEST_ID,

       DEST_NAME,

       STATUS,

       TARGET,

       TRANSMIT_MODE,

       COMPRESSION,

       NET_TIMEOUT

FROM V$ARCHIVE_DEST

WHERE TARGET = 'STANDBY';

For example:

LOG_ARCHIVE_DEST_2 =

'SERVICE=STBY

 ASYNC

 NOAFFIRM

 COMPRESSION=DISABLE

 

Compression can help when bandwidth is the bottleneck, particularly on low-bandwidth/high-latency links, but it also introduces CPU processing. Oracle therefore recommends evaluating it rather than enabling it automatically.

 

The practical workflow

My Data Guard network assessment is therefore:

Peak Redo Rate → RTT → BDP → Socket Buffers → Single-Stream Throughput → MTU → Encryption/Compression → Transport Lag

The final question is simple: Can each primary instance continuously ship its peak redo generation rate, with sufficient headroom, across the real Data Guard network path?

If the answer is no, eventually the network becomes the bottleneck, and transport lag is only the symptom.

 Ref:

https://docs.oracle.com/en/database/oracle/oracle-database/21/haovw/configure-and-deploy-oracle-data-guard.html

https://docs.oracle.com/en/database/oracle/oracle-database/21/sbydb/oracle-data-guard-redo-transport-services.html

https://docs.oracle.com/en/database/oracle/oracle-database/21/haovw/plan-oracle-data-guard-deployment.html

https://docs.oracle.com/en/database/oracle/oracle-database/21/haovw/configure-and-deploy-oracle-data-guard.html

 

 

 

 


Understanding Scalability in Oracle Database Environments

  Understanding Scalability in Oracle Database Environments 1. Scalability: Beyond Processing More Transactions Scalability describes ho...