Tech Note 0024

UDP Tuning

Tuning UDP/IP for maximum MTP performance

MTP/IP software uses the UDP/IP packet format to provide network and operating system compatibility.  Some legacy operating systems place very restrictive limits on the performance of UDP/IP protocols.  In particular, the UDP/IP buffer size determines how much data the operating system will store while waiting for other network and disk operations to complete.  If this buffer is not adequate, then performance will be reduced.

Only a few of the systems currently supported by MTP/IP experience this problem.  Windows XP+ and macOS 10.6+ do not have this problem.

A buffer size of at least 1 megabyte is necessary, particularly for operation on gigabit or faster networks.  MTP/IP will utilize buffers up to 2 megabytes each for sending and receiving, if the operating system allows it.  The instructions below require administrative access and will raise each UDP/IP buffer limit to 2 megabytes (2097152).

Note that increasing these limits will not effect or harm other applications.  Only applications which specifically request larger buffers are effected.  MTP/IP will request the largest buffer size available, up to 2 megabytes.

Linux

Check the current UDP/IP buffer limit by typing the following commands:

sysctl net.core.wmem_max sysctl net.core.rmem_max

If the values are less than 2097152 bytes you should add the following lines to the /etc/sysctl.conf file:

net.core.wmem_max=2097152 net.core.rmem_max=2097152

Changes to /etc/sysctl.conf do not take effect until reboot.  To update the values immediately, type the following commands as root:

sysctl -w net.core.wmem_max=2097152 sysctl -w net.core.rmem_max=2097152

FreeBSD

Check the current UDP/IP buffer limit by typing the following command:

sysctl kern.ipc.maxsockbuf

If the value is less than 2097152 bytes you should add the following lines to the /etc/sysctl.conf file (create it if necessary):

kern.ipc.maxsockbuf=2097152

Changes to /etc/sysctl.conf do not take effect until reboot.  To update the values immediately, type the following commands as root:

sysctl -w kern.ipc.maxsockbuf=2097152

Solaris 8, 9, or 10

Check the current UDP/IP buffer limit by typing the following command:

ndd /dev/udp udp_max_buf

If the value is less than 2097152 bytes you should add the following lines to the /etc/init.d/inetinit file:

ndd -set /dev/udp udp_max_buf 2097152

Changes to /etc/init.d/inetinit do not take effect until reboot.  To update the values immediately, type the above command as root.

Solaris 11 or later

MTP/IP for Solaris will utilize up to 4 megabytes of UDP/IP buffer space for both sending and receiving.  Check the current UDP/IP buffer limit by typing the following command:

ipadm show-prop udp max_buf

If the value is less than 4194304 bytes you should add the following lines to the /etc/init.d/inetinit file:

ipadm set-prop -p max_buf=4194304 udp

Changes to /etc/init.d/inetinit do not take effect until reboot.  To update the values immediately, type the above command as root.

Others

As of this writing, all other supported systems are believed to provide adequate UDP/IP buffering by default.  You can verify this by setting debugging to level 1 and looking for a line such as this:

M 20151103 13:31:45.101 MTP1: UDP SO_RCVBUF 2097152, SO_SNDBUF 2097152

If either of the given values is less than 2097152, then you should examine the host operating system to determine if it is limiting UDP/IP buffer sizes, or contact DEI for assistance.

Tech Note History

Feb232018Minor Updates
Nov032015MTP 4.2 Values
Sep042014MTP 4.0 Values
Jun042012MTP 3.15.2 Values
Oct262010First Post