Oracle8(TM) Server Tuning Release 8.0 A54638-01 |
|
This chapter introduces networking issues which affect tuning. Topics in this chapter include
Networks entail overhead which adds a certain amount of delay to processing. To optimize performance, you must ensure that your network throughput is fast, and that you reduce the number of messages that must be sent over the network.
It can be difficult to measure the amount of delay which the network adds to performance. There are three useful dynamic performance views in this regard: V$SESSION_EVENT, V$SESSION_WAIT, and V$SESSTAT.
In V$SESSION_EVENT, the AVERAGE_WAIT column indicates the amount of time that Oracle waits between messages. You can use this statistic as a yardstick to evaluate the effectiveness of the network.
V$SESSION_WAIT contains an EVENT column which lists the events for which active sessions are waiting. The "sqlnet message from client" wait event indicates that the shared or foreground process is waiting on a message from a client. If this wait event has occurred, the DBA can check to see whether the message has been sent by the user or received by Oracle.
You can investigate hangups by looking at V$SESSION_WAIT to see what it is that sessions are waiting for. If a client has sent a message, you can determine whether Oracle is responding to it, or is still waiting for it.
In V$SESSTAT you can see the number of bytes that have been received from the client, the number of bytes sent to the client, and the number of calls the client has made.
This section describes several techniques for enhancing performance and solving network problems.
See Also: The Net8 Administrator's Guide contains a complete discussion of each of these topics.
Reduce network calls by using array interfaces. Instead of fetching one row at a time, it is more efficient to fetch 10 rows with a single network round trip.
See Also: Programmer's Guide to the Oracle Pro*C/C++ Precompiler Release 3.0 and Programmer's Guide to the Oracle Pro*COBOL Precompiler Release 2.0 for more information on array interfaces.
Prestarting processes can improve connect time with a dedicated server. This is particularly true of heavily loaded systems not using multi-threaded servers, where connect time is slow. If prestarted processes are enabled, the listener can hand off the connection to an existing process with no wait time whenever a connection request arrives. Connection requests do not have to wait for new processes to be started.
Before sending data across the network, SQL Net buffers data into the Session Data Unit (SDU). It sends the data stored in this buffer when the buffer is full or when an application tries to read the data. When large amounts of data are being retrieved, and when packet size is consistently the same, it may speed retrieval to adjust the default SDU size.
Optimal SDU size depends on the normal packet size. Use a sniffer to find out the frame size, or set tracing on to its highest level to check the number of packets sent and received, and to see if they are fragmented. Tune your system to limit the amount of fragmentation.
Use Oracle Network Manager to configure a change to the default SDU size on both the client and the server; SDU size should generally be the same on both.
See Also: Net8 Administrator's Guide
The network listener active on the database server monitors and responds to connection requests. You can increase the listening queue for a listening process in order to dynamically handle larger numbers of concurrent requests.
When a session is established, Net8 packages and sends data between server and client using packets. Use 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.
Although Net8 supports many networking protocols, TCP tends to have the best scalability.
See Also: Your platform-specific Oracle documentation
Shared server processes, such as multi-threaded server dispatchers, tend to provide better performance than dedicated server processes. Dedicated server processes are committed to one session only, and exist for the duration of that session. In contrast, a shared server process enables many clients to connect to the same server without the need for a dedicated server process for each client. A dispatcher handles multiple incoming session requests to the shared server.
In Net8 you can use the Connection Manager to conserve system resources by multiplexing: funneling many client sessions through a single transport connection to a server destination. In this way you can increase the number of sessions that a process can handle.
Connection Manager enables you to control client access to dedicated servers. In addition, it provides multiple protocol support so that a client and server with different networking protocols can communicate with each other.