Network Topology   «Prev  Next»

Lesson 6 The protocol.ora file, part 2
Objective Describe the use of the TCP.NODELAY option.

Describe the use of the TCP.NODELAY option in Oracle Network Services

In Oracle 19c Network Services, the `TCP.NODELAY` option is used to control the use of Nagle’s algorithm for TCP connections between the Oracle client and server.
🔹 Purpose of `TCP.NODELAY`
  • The Nagle algorithm attempts to reduce the number of small packets sent over the network by combining a series of small outgoing messages and sending them all at once.
  • While this reduces network overhead in many cases, it can introduce latency, especially in interactive applications that rely on fast communication between client and server (e.g., OLTP systems).

Setting `TCP.NODELAY=YES` disables Nagle’s algorithm, allowing small packets to be sent immediately without waiting for the accumulation of more data. This improves response time at the cost of slightly higher network overhead.
🔹 Configuration
You can configure this option in the `sqlnet.ora` file:
SQLNET.SEND_BUF_SIZE=65536
SQLNET.RECV_BUF_SIZE=65536
TCP.NODELAY=YES

Or in the `listener.ora` or `tnsnames.ora` when specifying protocol-specific parameters.
When to Use
  • Use TCP.NODELAY=YES when:
    • Your application is latency-sensitive.
    • You are dealing with frequent small transactions (e.g., OLTP).
    • Low-latency communication is more critical than bandwidth efficiency.
  • Avoid using it if:
    • Your application sends large data batches, where Nagle's algorithm would help reduce overhead.
    • You’re concerned about network congestion due to many small packets.

🔹 Example Use Case In a high-frequency trading system or a web-based Oracle application where responsiveness is paramount, setting `TCP.NODELAY=YES` reduces delays caused by packet buffering and ensures quicker acknowledgment of user actions.

Diagram showing the effect of enabling vs. disabling Nagle’s algorithm in Oracle Network Services.
enabling vs. disabling Nagle’s algorithm in Oracle Network Services.
Enabling versus disabling Nagle’s algorithm in Oracle Network Services.

Use of TCP.NODELAY Option

When a session is established, Network Services packages the transmission and sends data between server and client using packets. In a standard Net configuration, Net will wait a predetermined amount of time in order to collect as much information as possible before sending the packet across the network. This strategy is fine for most operations where large data packets are being sent. However, in cases where the sending program is sending small data cursors with very small packets, the default delay will add up and cause significant Oracle degradation. This situation is commonly seen in customized extensions written in COBOL or C, where the program does not collect the data into an array before sending the packet across the network. The delay can be turned off with the TCP.NODELAY option, which causes packets to be flushed on to the network more frequently. If you are streaming large amounts of data, there is no buffering and hence no delay. The TCP.NODELAY parameter is placed in the protocol.ora file, and its exact syntax is:
tcp.nodelay=yes

While the Oracle default assumes that all network traffic has been optimized and collected into large packets, TCP.NODELAY will ensure that packets are shipped immediately. This may result in increased network traffic with larger numbers of smaller packets.
The next lesson examines the sqlnet.ora file.
Deprecated Components
  1. Net8 OPEN: Net8 OPEN, which provided an application program interface (API) that enabled programmers to develop both database and non-database applications, is no longer supported.
  2. Prespawned Dedicated Servers: Prestarted dedicated server processes are no longer supported. Instead, configure shared server to improve scalability and system resource usage.
  3. protocol.ora File: The protocol.ora file is no longer supported. Parameters in the protocol.ora file have been merged into the sqlnet.ora file. These parameters enable you to configure access control to the database, as well as no delays in TCP/IP buffer flushing. These parameters include: 1) TCP.NODELAY, 2) TCP.EXCLUDED_NODES, 3) TCP.INVITED_NODES, 4) TCP.VALIDNODE_CHECKING

OracleNet Components - Quiz

Before moving on to the next lesson, click the Quiz link below to check your knowledge of Net components with a short multiple-choice quiz.
OracleNet Components - Quiz

SEMrush Software