Oracle Database - Session Data Unit (SDU) parameter

> Database > Oracle Database

1 - About

SDU is a buffer that Oracle Net uses to place data before transmitting it across the network. Oracle Net sends the data in the buffer either when requested or when it is full.

Under typical database configuration, Oracle Net then encapsulates data into buffers with 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.

Starting with Oracle Database 11g, Oracle Net Services optimized bulk data transfer for components, such as Oracle SecureFiles LOBs and Oracle Data Guard redo transport services. The SDU size limit, as specified in the network parameter files, does not apply to these bulk data transfers.

These setting is negotiated on connect and both client and server must be willing to go the same size.

3 - Message Size

The amount of data provided to Oracle Net to send at any one time is referred to as the message size. Oracle Net assumes by default that the message size will normally vary between 0 and 8192 bytes, and infrequently, be larger than 8192 bytes. If this assumption is true, then most of the time, the data is sent using one SDU buffer.

See also Maximum_segment_size

Advertising

4 - SDU size

The SDU size can range from 512 bytes to 65535 bytes. The default SDU for the client and a dedicated server is 8192 bytes. The default SDU for a shared server is 65535 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. For shared server, only the client value must be changed because the shared server defaults to the maximum value.

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 larger 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 8KB, taking into account the 70 bytes for overhead, then setting the SDU to 8KB 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.

5 - Setting the SDU Size

5.1 - for the Database

To set the SDU size for the database server, configure the following files:

Configure the DEFAULT_SDU_SIZE parameter in the sqlnet.ora file, as follows:

DEFAULT_SDU_SIZE=65535
  • 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))"

If you have configured the listener with a list of targets in the listener.ora file, then the value for SDU in the SID_LIST element overrides the current setting in the sqlnet.ora file when using dedicated server processes.

SID_LIST_listener_name=
        (SID_LIST= 
          (SID_DESC=
           (SDU=8192)
           (SID_NAME=sales)))

The smaller value of the SDU size and the value configured for the client take precedence.

Advertising

5.2 - for the Client

To set the SDU size for the client, configure the following files:

For global configuration on the client side, configure the DEFAULT_SDU_SIZE parameter in the sqlnet.ora file, as follows:

DEFAULT_SDU_SIZE=65535

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.

db/oracle/sdu.txt · Last modified: 2017/09/06 19:29 by gerardnico