| Lesson 6
| The protocol.ora file, part 2
| Describe the use of the TCP.NODELAY option.
Describe the use of the TCP.NODELAY option in Oracle Network Services
In the context of Oracle Network Services, TCP.NODELAY is a crucial option that controls the Nagle's algorithm for a specific connection. Nagle's algorithm is designed to reduce the number of small packets sent over the network by buffering unacknowledged send calls until a full packet of outgoing data is ready. While this is generally beneficial for efficient network usage, it can sometimes result in perceivable latency in certain network interactions, especially those where real-time responses are essential.
The TCP.NODELAY option is used to disable Nagle's algorithm. When this option is set to true (or enabled), data is sent immediately over the network as soon as it is available, without waiting for the buffer to fill or for an acknowledgment of previously sent data. This approach is particularly useful in a database context, where the added latency of Nagle's algorithm can affect the performance of transaction-heavy applications.
For Oracle Network Services, setting TCP.NODELAY can improve the response time for small, frequent requests between the client and the server, which is a common pattern in database interactions. This option becomes even more critical in distributed databases or client-server architectures where network latency can significantly affect overall system performance.
To configure the TCP.NODELAY option in Oracle, you need to set it in the sqlnet.ora file, which is located in the Oracle home directory under the network/admin subdirectory. The parameter to set is called TCP.NODELAY, and to enable it, you would set TCP.NODELAY=YES.
Keep in mind that while disabling Nagle's algorithm can improve performance for small, frequent requests, it can lead to less efficient use of bandwidth for larger, bulk transfers of data. Therefore, the use of the TCP.NODELAY option should be considered carefully, taking into account the specific network patterns of the Oracle database in question.
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:
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.
- 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.
- Prespawned Dedicated Servers: Prestarted dedicated server processes are no longer supported. Instead,
configure shared server to improve scalability and system resource usage.
- 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