14.2 Configuring Session Data Unit
Under typical database configuration, Oracle Net encapsulates data into buffers the size of the Session Data Unit (SDU) before sending the data across the network.
Oracle Net sends each buffer when it is filled, flushed, or when an application tries to read data. Adjusting the size of the SDU buffers relative to the amount of data provided to Oracle Net to send at any one time can improve performance, network utilization, and memory consumption. When large amounts of data are being transmitted, increasing the SDU size can improve performance and network throughput. SDU size can be adjusted lower or higher to achieve higher throughput for a specific deployment.
The amount of data provided to Oracle Net to send at any one time is referred to as the message size.
The SDU size can range from 512
bytes to 2
MB. The wide range of sizes allows the network administrator to tune the SDU size for optimal network performance for a given deployment. A high SDU size value requires more memory.
The default SDU size for the client is 8192
bytes and the server is 65536
bytes.
The actual SDU size used is negotiated between the client and the server at connect time and is the smaller of the client and server values. 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.
You should consider changing the SDU size when the predominant message size is smaller or larger than 8192
. The SDU size should be 70
bytes more than the predominant message size. 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. To change the default, change the DEFAULT_SDU_SIZE
parameter in the sqlnet.ora
file.
For example, if the majority of the messages sent and received by the application are smaller than 8
KB, taking into account the 70
bytes for overhead, then setting the SDU to 8
KB will likely produce good results. If sufficient memory is available, then using the maximum value for the SDU minimizes the number of system calls and overhead for Oracle Net Services.
Parent topic: Optimizing Performance
14.2.1 Setting the SDU Size for the Database
To set the SDU size for the database server, configure the following files:
-
sqlnet.ora
Configure the DEFAULT_SDU_SIZE parameter in the
sqlnet.ora
file, such as the following:DEFAULT_SDU_SIZE=32767
-
Initialization parameter file
If using shared server processes, then set the SDU size in the DISPATCHERS parameter in the initialization parameter file, as follows:
DISPATCHERS="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp))(SDU=8192))"
-
listener.ora
If the listener was configured with a list of targets in the
listener.ora
file, then the value for SDU in the SID_LIST parameter overrides the current setting in thesqlnet.ora
file when using dedicated server processes.
Parent topic: Configuring Session Data Unit
14.2.2 Setting the SDU Size for the Client
To set the SDU size for the client, configure the following files:
-
sqlnet.ora
For global configuration on the client side, configure the DEFAULT_SDU_SIZE parameter in the
sqlnet.ora
file, such as the following:DEFAULT_SDU_SIZE=32767
-
tnsnames.ora
For a particular connect descriptor, you can specify the SDU parameter in the DESCRIPTION parameter.
sales.us.example.com= (DESCRIPTION= (
SDU=11280)
(ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521)) (CONNECT_DATA= (SERVICE_NAME=sales.us.example.com)) )
The SDU size applies to all Oracle Net protocols for the particular connect descriptor.
Parent topic: Configuring Session Data Unit