Tuning TCP/IP buffer sizes

WebSphere® Application Server uses the TCP/IP sockets communication mechanism extensively. For a TCP/IP socket connection, the send and receive buffer sizes define the receive window. The receive window specifies the amount of data that can be sent and not received before the send is interrupted. If too much data is sent, it overruns the buffer and interrupts the transfer. The mechanism that controls data transfer interruptions is referred to as flow control. If the receive window size for TCP/IP buffers is too small, the receive window buffer is frequently overrun, and the flow control mechanism stops the data transfer until the receive buffer is empty.

About this task

[AIX HP-UX Linux Solaris Windows] [iSeries] Flow control can consume a significant amount of CPU time and result in additional network latency as a result of data transfer interruptions. It is recommended that you increase buffer sizes avoid flow control under normal operating conditions. A larger buffer size reduces the potential for flow control to occur, and results in improved CPU utilization. However, a large buffer size can have a negative effect on performance in some cases. If the TCP/IP buffers are too large and applications are not processing data fast enough, paging can increase. The goal is to specify a value large enough to avoid flow control, but not so large that the buffer accumulates more data than the system can process.

[AIX HP-UX Linux Solaris Windows] [iSeries] The default buffer size is 8 KB. The maximum size is 8 MB (8096 KB). The optimal buffer size depends on several network environment factors including types of switches and systems, acknowledgment timing, error rates and network topology, memory size, and data transfer size. When data transfer size is extremely large, you might want to set the buffer sizes up to the maximum value to improve throughput, reduce the occurrence of flow control, and reduce CPU cost.

[AIX HP-UX Linux Solaris Windows] [iSeries] Buffer sizes for the socket connections between the Web server and WebSphere Application Server are set at 64 KB. In most cases this value is adequate.

[AIX HP-UX Linux Solaris Windows] [iSeries] Flow control can be an issue when an application uses either the IBM® Developer Kit for Java JDBC driver or the IBM Toolbox for Java JDBC driver to access a remote database. If the data transfers are large, flow control can consume a large amount of CPU time. If you use the IBM Toolbox for Java JDBC driver, you can use custom properties to configure the buffer sizes for each data source. It is recommended that you specify large buffer sizes, for example, 1 MB.

[AIX HP-UX Linux Solaris Windows] [iSeries] Some system-wide settings can override the default 8 KB buffer size for sockets. With some applications, for example, WebSphere Commerce Suite, a buffer size of 180 KB reduces flow control and typically does not adversely affect paging. The optimal value is dependent on specific system characteristics. You might need to try several values before you determine the ideal buffer size for your system.

[z/OS] TCP/IP can be the source of some significant remote method delays.

[AIX] For more information, see section 4.6 in the http://www.redbooks.ibm.com/redbooks/SG247347/wwhelp/wwhimpl/js/html/wwhelp.htm document. In addition, see the http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.prftungd/doc/prftungd/tcp_streaming_workload_tuning.htm document.

[HP-UX] For more information, see the ndd command information in the following documents:
  • http://docs.hp.com/en/B2355-91020/B2355-91020.pdf
  • http://docs.hp.com/en/TKP-90203/index.html

[HP-UX] Also, see the _recv_hiwater_def and tcp_xmit_hiwater_def parameter information in the following document: http://docs.hp.com/en/11890/perf-whitepaper-tcpip-v1_1.pdf

[Linux] For more information, see the following documents:
  • http://www.ibm.com/developerworks/linux/library/l-hisock.html
  • http://fasterdata.es.net/TCP-tuning/linux.html
  • http://www.onlamp.com/pub/a/onlamp/2005/11/17/tcp_tuning.html?page=2

[Solaris] For more information, see section 2.2 in the following document: http://www.redbooks.ibm.com/redbooks/SG247584/wwhelp/wwhimpl/java/html/wwhelp.htm

[Windows] For information on tuning TCP/IP buffer sizes, see the "TCP window size" section of the http://support.microsoft.com/kb/224829 document. Consider setting the TcpWindowSize value to either 8388608 or 16777216.

[iSeries] [z/OS] To change the system wide value, perform the following steps:

Procedure [iSeries] [z/OS]

Results [z/OS] [iSeries]

[z/OS] [iSeries] Repeat this process until you determine the ideal buffer size.

What to do next [z/OS] [iSeries]

[z/OS] [iSeries] The TCP/IP buffer sizes are changed. Repeat this process until you determine the ideal buffer size.

[iSeries] For more information about TCP/IP performance, see Chapter 5 of the Performance Capabilities Reference. Links to several editions of the Performance Capabilities Reference are in the Performance Management Resource Library.




In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 31, 2013 2:56:59 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-nd-dist&topic=tprf_tunetcpip
File name: tprf_tunetcpip.html