Local Copy of : http://download.oracle.com/docs/cd/B19306_01/network.102/b14212/performance.htm
This chapter describes how to optimize connection performance.
This chapter contains these topics:
Under typical database configuration, Oracle Net
The amount of data provided to Oracle Net to send at any one time can be referred to as the message size. Oracle Net assumes by default that the message size will normally vary between 0 and 2048 bytes, and infrequently, will be larger than 2048. If this assumption is true, then most of the time, the data will be sent using one SDU buffer. This assumption is why the default value for the SDU size is 2048.
Consider changing the SDU size when the predominant message size is smaller or larger than 2048. The SDU size you choose should be 70 bytes larger than the predominant message size, as long as the maximum SDU size is not exceeded. If the predominant message size plus 70 bytes exceeds the maximum SDU, then the SDU should be set such that the message size is divided into the smallest number of equal parts where each part is 70 bytes less than the SDU size.
The SDU size can range from 512 bytes to 32767 bytes. If the
The actual SDU size used is negotiated between the client and the server at connect time and will be the smaller of the client and server values. As such, configuring an SDU size different from the default requires configuring the SDU on both the client and server computers, unless you are using shared servers, in which case only the client needs to be changed because the shared server defaults to the maximum value.
For example, if the majority of the messages sent and received by the application are smaller than 8K in size, taking into account about 70 bytes for overhead, setting the SDU to 8K will likely produce good results. If sufficient memory is available, using the maximum value for the SDU will minimize the number of system calls and overhead for Oracle Net Services.
To configure the client, set the SDU size in the following places:
SDU size applies to all Oracle Net protocols.
To configure the database server, set the SDU size in the following places:
Reliable network protocols like 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, as these buffer sizes influence flow control decisions.
The RECV_BUF_SIZE and SEND_BUF_SIZE parameters specify sizes of socket receive and send buffers, respectively, 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.
For best performance, the size of the send and receive buffers should be set large enough to hold all of the data that may be sent concurrently on the network connection. For a simple database connection, this typically maps to the
For example, suppose that the network link between a primary database and a standby database has a round trip time of 34 ms and a bandwidth of 15 Mbps. The bandwidth-delay product of this network link is approximately 64KB. The largest message used to transfer redo data between a primary database and a standby database is 1MB so the optimum value for the send_buf_size and recv_buf_size parameters in this scenario is therefore 1MB however a setting of at least 64KB should be sufficient to optimize use of the available bandwidth.
For most network protocols, ensure that the
Specify these parameters in the
Determining Bandwidth Delay Product
Bandwidth-delay product is the product of network bandwidth and the round trip time of data going over the network. The easiest way to determine the round trip time is to use a command such as ping from one host to another and use the response times returned by ping.
For example, if a network has a bandwidth of 100 Mbps and a round trip time of 5ms, the send and receive buffers should be at least (100X106) * (5X10-3) bits or approximately 62.5 Kilobytes.
For a better understanding of the relationships among the units and factors involved, refer to the following equation:
100,000,000 bits 1 byte 5 seconds ---------------- x ------ x --------- = 62,500 bytes 1 second 8 bits 1000
To configure the client, set the buffer space size in the following places:
Because the database server writes data to clients, setting just the SEND_BUF_SIZE parameter at the serverside 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 in sqlnet.ora file.
In the listener.ora file, you can either specify the buffer space parametersfor a particular protocol address or for a description.
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=11784) (RECV_BUF_SIZE=11784) (ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521)))
DISPATCHERS Initialization Parameter
If using shared server processes, you can override the current settings obtained from the server's
Oracle Net Services provides support for the SDP protocol for Infiniband high-speed networks.
The SDP protocol is a standard communication protocol for clustered server environments. SDP is an interface between a network interface card and the application. By using SDP, applications place most of the messaging burden upon the network interface card, freeing the CPU for other tasks. As a result, SDP decreases network latency and CPU utilization.
SDP is designed specifically for System Area Networks (SANs). A SAN is characterized by short-distance, high-performance communications between multiple server systems, such as Oracle Application Server (OracleAS) or any other third-party middle-tier client and database servers clustered into one switch.
This section describes how to set up Oracle Net support of SDP for middle tier and database server communication. It includes the following topics:
Prerequisites to Using SDP Protocol Support
Prior to configuring support for the SDP protocol, install the required hardware, set up Infiniband hardware and software from a designated vendor on both the application Web server and database server.
Infiniband hardware can be installed before or after an Oracle Database 10g Server or Oracle Database 10g Client installation that includes SDP protocol support. If the hardware is installed after an Oracle installation, then perform these steps:
To configure the database server, configure an SDP protocol address in the
The following example shows an SDP endpoint that uses port number 1521 on the computer
LISTENER= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS=(PROTOCOL=sdp)(HOST=sales-server)(PORT=1521)) (ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521)) (ADDRESS=(PROTOCOL=ipc)(KEY=extproc))))
To configure the OracleAS servers or third-party middle-tier client:
Configuring the Listener and the Oracle Database To Limit Resource Consumption By Unauthorized Users
Unauthorized access to the listener or database server can result in denial-of-service attacks, whereby an unauthorized client attempts to block authorized users' ability to access and use the system when needed. Malicious clients may attempt to flood the listener or database server with connect requests that have the sole purpose of consuming resources, such as connections, processes, or threads. To mitigate these types of attacks, configure limits that constrain the time in which resources can be held prior to authentication. Client attempts to exceed the configured limits will result in connection terminations and an audit trail containing the IP address of the client being logged.
To limit the resource consumption by unauthorized users and enable the audit trail, set time-limit values for the parameters described in Table 14-1. These parameters do not have default values.
Table 14-1 Connect-Timeout Parameters
When specifying values for these parameters, consider the following recommendations:
For example, you can set