This action might not be possible to undo. Are you sure you want to continue?
Oracle Tips by Burleson Consulting Nov 18, 2003, updated June 17, 2007
Oracle databases are often shared across geographical areas, so it's imperative that the Oracle professional understand how database performance is affected by network communications. The Transparent Network Substrate (TNS), provided by Oracle, allows distributed communications between databases. The TNS serves as an insulator between Oracle¶s logical data request and the physical communications between the remote servers. As such, the network administrator is able to control much of the network performance tuning. The Oracle administrator, then, has little control over the network settings that can affect overall database performance. The performance of distributed transactions can be improved using some important settings that I'll illustrate below. These include parameters within the sqlnet.ora, tnsnames.ora, and protocol.ora files. These parameters can be used to change the configuration and size of TCP packets, and adjusting these parameters can have a profound impact on the underlying network transport layer to improve the throughput of all Oracle transactions. As I noted, Oracle*Net does not allow the Oracle professional the ability to tune the underlying network layer, and the majority of network traffic cannot be tuned from within the Oracle environment. Remember, Oracle Net is a layer in the OSI model that resides above the network-specific protocol stack. The frequency and size of network packets, however, can be controlled by the Oracle DBA. Oracle has a wealth of tools to change packet frequency and size. A simple example involves changing the refresh interval for a snapshot to ship larger amounts at less frequent intervals. Tuning for throughput vs response time The DBA is faced with two approaches to network tuning, optimizing for either fast individual response time vs. optimizing packet shipment for maximum throughput:
Optimal network throughput: Oracle suggests setting recv_buf_size and send_buf_size sqlnet.ora parameters equal to 3 times the Bandwidth Delay Product (BDP). Also, set tcp.nodelay=yes. Optimal network response time: For optimal response time for individual transactions, see the notes below for getting fast, small packets.
Oracle*Net connections between servers can be tuned using several parameters. Keep in mind, however, that network tuning is outside the scope of Oracle, and a qualified network administrator should be consulted for tuning the network. The frequency and size of packet shipping across the network can be affected by using settings contained in the following parameter files:
The sqlnet.ora server file²The automatic_ipc parameter The sqlnet.ora client file²The break_poll_skip parameter
Let's examine them in detail and see how they can be adjusted to improve Oracle Net throughput. Oracle suggests setting recv_buf_size and send_buf_size sqlnet.nodelay parameter These tuning parameters will affect only the performance of the Oracle Net layer.ora file²The tcp.ora file If you are on 10g and beyond and you are tuning your network to maximize throughput (as opposed to tuning for fast response time). The protocol. and Oracle Net does not transmit the packet until the buffer is full.nodelay parameter in the protocol.ora file. The parameter can be used on both the client and server.y y The tnsnames. at least 3x the value of your bandwidth delay product (BDP).nodelay to stop buffer flushing delays. that network traffic can increase due to smaller and more frequent packet transmission.ora file can be specified to indicate no data buffering for all TCP/IP implementations. however. See these important notes on setting send_buf_size and recv_buf_size. As the name implies. The automatic_ipc parameter of the sqlnet. Setting tcp. can remedy this problem. and these tips for finding your Oracle BDP value.ora parameters equal to 3 times the Bandwidth Delay Product (BDP).ora file determine the size (in bytes) of the socket receive and send buffers for a SQL*Net connection. Adding a protocol. The tcp. Keep in mind. Oracle Net checks to see if a local database is defined by the same alias. thereby speeding local connections to the database. Therefore.nodelay = yes Specifying this parameter causes TCP buffering to be skipped so that every request is sent immediately. This is most common when large amounts of data are streamed from one end to another.ora file The automatic_ipc parameter bypasses the network layer. To prevent network contention. causing slowdowns in the network. and specifying a tcp. by default. When automatic_ipc=on. the values for recv_buf_size and send_buf_size should be set to the maximum amount of data that might be sent. waits until the buffer is filled before transmitting data.nodelay parameter should be used only if TCP timeouts are encountered. If so. The tcp. The protocol.nodelay can cause a huge improvement in performance when there is high-volume traffic between database servers. network layers are bypassed as the connection is translated . The recv_buf_size and send_buf_size in the sqlnet.ora and listener.ora file Oracle Net. requests aren't always sent immediately to their destinations.ora files²The SDU and TDU parameters The protocol.ora statement is: tcp. the recv_buf_size and send_buf_size parameters in the sqlnet.
you should set SDU and TDU equal to the MTU for your network. On standard token ring networks. Oracle recommends that SDU be set equal to MTU. set this parameter to off. and the maximum value is 32. The sending side tnsnames. On standard Ethernet networks.ora file increase the performance of propagation on your system.ora and listener. all Oracle Net clients can improve performance. the receiving side sqlnet. the SEND_BUF_SIZE and RECV_BUF_SIZE parameters in the listener.514 bytes. Note: In Oracle 10g and beyond. For Streams replication and for using Oracle in a WAN environment. The receiving side listener.767 bytes. Oracle recommends that you increase the SDU to 32k. you may want to set SDU and TDU to smaller values because of the frequent resends that occur over modem lines. Oracle internal testing of Oracle Data Guard on a WAN has demonstrated that the maximum setting of 32K (32768) performs best on a WAN. Also. The SDU and TDU parameters in the tnsnames.ora file must include the DEFAULT_SDU_SIZE parameter. MTU is a fixed value that depends on the actual network implementation used. the default MTU size is set to 1. For Streams. The TDU is the default packet size used within Oracle Net to group data together. If local connections are not needed or required. The default value for both SDU and TDU is 2.ora files. Ideally. the Oracle docs note: y y y y To take advantage of an increased SDU for Streams propagation. If your users are connecting via modem lines. This is useful on database servers. If the Multi-Threaded Server (MTS) is used. SDU specifies the size of the packets to send over the network. The following guidelines apply to SDU and TDU: y The SDU should never be set greater than TDU because you'll waste network resources by shipping wasted space in each packet. . On fast network connections (T1 or T3 lines). The automatic_ipc parameter should be used only on the database server when an Oracle Net connection must be made to the local database.directly to the local IPC connections. The TDU parameter should ideally be a multiple of the SDU parameter. but it's absolutely useless for Oracle Net clients. The primary gain in performance when setting the SDU is a result of the reduced number of calls to packet the data.202. with this setting. SDU should not surpass the size of the maximum transmission unit (MTU).ora file connect string must also include the SDU modification for the particular service. Oracle recommends an SDU value of 32k (32767).048.ora file must indicate the SDU change for the system identifier (SID). the default MTU size is 4. you must also set the mts_dispatchers with the proper MTU TDU configuration.ora file The session data unit (SDU) and transport date unit (TDU) parameters are located in the tnsnames.
Here's an example of this parameter in the listener. Oracle-l notes this on tcp. You'll end up with a larger number of smaller packets on your WAN. where the listener spawns thousands of connections per hour. send those babies now!".. The complete antithesis of what the SDU/TDU settings are trying to do for you.. The SDU and TDU settings are a direct function of the connection speed between the hosts. experiment with smaller values of SDU and TDU.In addition to setting the SDU parameter.ora file: LISTENER = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = marvin) (PORT = 1521) (QUEUESIZE = 32) ) ) A disadvantage of this parameter is that it pre-allocates resources for anticipated requests. not better. you're saying "to xxx with optimizing the data payload . and if it's latency that's your problem. and there are some restrictions of the MTS queue size.SEND_BUF_SIZE and SQLNET." . The number of expected simultaneous connections should be equal to the size of the queuesize parameter. Performance While most of the network packet traffic is tuned at the network level. set SDU=TDU=MTU. For slower modem lines. This parameter is used only for very high-volume databases. Effectively.RECV_BUF_SIZE Oracle Net parameters to increase the size of the network TCP send and receive I/O buffers. Also. The queuesize parameter in the listener. network throughput can often be substantially improved by using the SQLNET.ora file The number of requests the listener can store while Oracle is working to establish a connection is determined by the undocumented queuesize parameter.nodelay and it's relationship to the SDU and TDU parameters: "Setting tcp. this will make matters worse. proper settings for Oracle Net parameters can have a great impact on the performance of distributed systems. therefore using more system memory and resources. For fast T1 lines.nodelay disables the Nagle algorithm in the tcp stack that tries to efficiently balance the data load of a packet with the delay in dispatching it. It's the job of the Oracle professional to fully understand and optimize these important parameters. note that some versions of UNIX do not allow queues greater than five. You may want to consider using MTS and pre-spawned Oracle connections if you have high-volume connections into a dedicated listener.
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue reading from where you left off, or restart the preview.