14.4 Configuring I/O Buffer Space

Reliable network protocols, such as TCP/IP, buffer data into send and receive buffers while sending and receiving to or from lower and upper layer protocols. The sizes of these buffers affect network performance by influencing flow control decisions.

The RECV_BUF_SIZE and SEND_BUF_SIZE parameters specify sizes of socket buffers associated with an Oracle Net connection. To ensure the continuous flow of data and better utilization of network bandwidth, specify the I/O buffer space limit for receive and send operations of sessions with the RECV_BUF_SIZE and SEND_BUF_SIZE parameters. The RECV_BUF_SIZE and SEND_BUF_SIZE parameter values do not have to match, but should be set according to your environment.

For best performance, the size of the send and receive buffers should be set large enough to hold all the data that may be sent concurrently on the network connection. For optimal network performance, these buffers should be set to at least the bandwidth-delay product.

Use these parameters with caution as they affect network and system performance. The default values for these parameters are operating system specific. The following are the defaults for the Linux operating system:

  • SEND_BUF_SIZE: 131,072 bytes (128k)

  • RECV_BUF_SIZE: 174,700 bytes

These parameters are supported for TCP, TCP/IP with TLS, and SDPs. Additional protocols may support these parameters on certain operating systems. The recommended values for these parameters are specified in the installation guide. Refer to operating system specific documentation for additional information.

Note:

  • The actual value of the SEND_BUF_SIZE and RECV_BUF_SIZE parameters may be less than the value specified because of limitations in the host operating system or due to memory constraints.

  • It is important to consider the total number of concurrent connections that your system must support and the available memory resources. The total amount of memory consumed by these connections depends on the number of concurrent connections and the size of their respective buffers.

14.4.1 Configuring I/O Buffer Size on the Server

Because the database server writes data to clients, setting the SEND_BUF_SIZE parameter on the server-side is typically adequate. If the database server is receiving large requests, then also set the RECV_BUF_SIZE parameter.To configure the database server, set the buffer space size in the listener.ora and sqlnet.ora files.

In the listener.ora file, specify the buffer space parameters for a particular protocol address or for a description. The following is an example of the settings:

LISTENER=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521)
(SEND_BUF_SIZE=11784)
(RECV_BUF_SIZE=11784))
(ADDRESS=(PROTOCOL=ipc)(KEY=extproc)
(SEND_BUF_SIZE=11784)
(RECV_BUF_SIZE=11784)))
LISTENER2=
(DESCRIPTION=
(SEND_BUF_SIZE=8192)
(RECV_BUF_SIZE=16384)
(ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521)))

Although the preceding example has multiple addresses, the ADDRESS_LIST parameter was not used. This is because the ADDRESS_LIST parameter is not mandatory.

The following is an example of the settings in the sqlnet.ora file:

RECV_BUF_SIZE=65536
SEND_BUF_SIZE=65536

14.4.1.1 Setting the Buffer Size Parameter for Shared Server Processes

If using shared server processes, then you can override the current settings obtained from the server sqlnet.ora file by setting the buffer space parameters in the DISPATCHERS initialization parameter as follows:

DISPATCHERS="(ADDRESS=(PROTOCOL=tcp)(SEND_BUF_SIZE=65536))"

14.4.2 Configuring I/O Buffer Space on the Client

To configure the client, set the buffer space size in the following locations in the specified file:

  • Setting only the RECV_BUF_SIZE parameter is typically adequate. If the client is sending large requests, then also set the SEND_BUF_SIZE parameter. These parameters are set in the client's sqlnet.ora file.

  • For a particular connect descriptor, you can override the current settings in the client sqlnet.ora file. You can specify the buffer space parameters for a particular protocol address or description in the tnsnames.ora file similar to the following:

    sales.us.example.com=
     (DESCRIPTION= 
       (ADDRESS_LIST=
         (ADDRESS=(PROTOCOL=tcp)(HOST=sales1-server)(PORT=1521)
            (SEND_BUF_SIZE=11784)
            (RECV_BUF_SIZE=11784))
         (ADDRESS=(PROTOCOL=tcp)(HOST=sales2-server)(PORT=1521)
            (SEND_BUF_SIZE=11784)
            (RECV_BUF_SIZE=11784))
       (CONNECT_DATA=
         (SERVICE_NAME=sales.us.example.com)))
    hr.us.example.com=
     (DESCRIPTION= 
       (SEND_BUF_SIZE=8192)
       (RECV_BUF_SIZE=8192)
         (ADDRESS=(PROTOCOL=tcp)(HOST=hr1-server)(PORT=1521))
       (CONNECT_DATA=
         (SERVICE_NAME=hr.us.example.com)))