Search

25.6.2.3. Improving UDP Performance by Configuring OS UDP Buffer Limits

download PDF
By default, the JGroups channels in JBoss Enterprise Application Platform use the UDP transport protocol to take advantage of IP multicast. However, one disadvantage of UDP is it does not come with the reliable delivery guarantees provided by TCP. The protocols discussed in Section 25.1.5, “Reliable Delivery Protocols” allow JGroups to guarantee delivery of UDP messages, but those protocols are implemented in Java, not at the operating system network layer. For peak performance from a UDP-based JGroups channel it is important to limit the need for JGroups to retransmit messages by limiting UDP datagram loss.
One of the most common causes of lost UDP datagrams is an undersized receive buffer on the socket. The UDP protocol's mcast_recv_buf_size and ucast_recv_buf_size configuration attributes are used to specify the amount of receive buffer JGroups requests from the operating system, but the actual size of the buffer the operating system provides is limited by operating system-level maximums. These maximums are often very low:
Table 25.1. Default Max UDP Buffer Sizes
Operating System Default Max UDP Buffer (in bytes)
Linux 131071
Windows No known limit
Solaris 262144
FreeBSD, Darwin 262144
AIX 1048576
The command used to increase the above limits is operating system-specific. The table below shows the command required to increase the maximum buffer to 25 megabytes. In all cases, root privileges are required:
Table 25.2. Commands to Change Max UDP Buffer Sizes
Operating System Command
Linux sysctl -w net.core.rmem_max=26214400
Solaris ndd -set /dev/udp udp_max_buf 26214400
FreeBSD, Darwin sysctl -w kern.ipc.maxsockbuf=26214400
AIX no -o sb_max=8388608 (AIX will only allow 1 megabyte, 4 megabytes or 8 megabytes).
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.