HP-UX TCP/IP Performance White Paper, March 2008

5
2 Out of the Box TCP/IP Performance Features for HP-UX
Servers
The HP-UX Networking Stack is especially engineered and tested for optimum performance in an enterprise
mission-critical environment. HP-UX 11i v3 exhibits excellent performance on NFS server performance and
in the TPC-C benchmark, a measurement of intensive online transaction processing (OLTP) in a database
environment. Typically, OLTP includes a mixture of read-only or update, short or long, and interactive or
deferred database transactions. There are significant networking performance tuning improvements and
optimizations in 11i v3 for database applications as demonstrated by the benchmark result.
There are many out of the box performance features introduced in HP-UX 11i. Users do not need to
configure or tune any attributes in order to see the performance improvement with these out of the box
performance features. The networking stack gracefully adapts to different networking needs in an
enterprise, from noisy low-bandwidth wireless environments to high-bandwidth high-throughput datacenter
environments.
The TCP/IP performance features described in this chapter improve the performance of HP-UX servers,
including database servers, application servers, NFS servers, web servers, mail servers, DNS servers, ftp
servers, DHCP servers, gateways, and firewall systems.
2.1 TCP Window Size and Window Scale Option (RFC 1323)
TCP performance depends not only on the transfer rate itself, but also on the product of the link bit rate and
the round-trip delay, or latency. This "bandwidth-delay product" measures the amount of data that would
"fill the pipe"; it is the buffer space required on the sender and receiver systems to obtain maximum
throughput on the TCP connection over the path, i.e., the amount of unacknowledged data that TCP must
handle in order to keep the pipeline full. TCP performance problems arise when the bandwidth-delay
product is large. We refer to an Internet path operating in this region as a "long, fat pipe".
In order to improve the performance of a network with a large bandwidth-delay product, the TCP window
size needs to be sufficiently large.
HP-UX supports the TCP window scale option (RFC 1323), which increases the maximum TCP window size
up to approximately 1 gigabyte, or 1,073,725,440 bytes (65,535 * 2
14
). When HP-UX initiates a TCP
connection (an active open), HP-UX always initiates a SYN segment with the window scale option. Even
when the real window size is less than 65,536, the window scale option is used with the scale factor set to
0. It is because advertising a 64K window with a window scale option of 0 is better than advertising a 64K
window without a window scale option as it tells the peer that the window scale option is supported. When
HP-UX responds to a connection request (a passive open), HP-UX accepts SYN segments with the window
scale option.
For the receiving TCP, the default receive window size is set by the ndd tunable
tcp_recv_hiwater_def. Applications can change the receive window size by the SO_RCVBUF socket
option. To fully utilize the bandwidth, the receive window needs to be sufficiently large for a given
bandwidth-delay product.
For the sending TCP, the default send buffer size is set by the ndd tunable tcp_xmit_hiwater_def, and
applications can change the size by the SO_SNDBUF setsockopt() option. By setting the send socket buffer