TCP auto-tuning
TCP auto-tuning is not new, but it’s still not well-known. TCP performance has two competing environmental issues tugging at it. If you queue too much, then you have wild swings when congestion happens, causing your transmission rate to swing between maximum and near-zero. If you don’t have enough packets in flight, then you are waiting in ACKs to be returned, and thus using only a fraction of available bandwidth. Both of these have one input from you, the size of the receive buffer (and lesser but still somewhat important, the size of the send buffer).
TCP auto-tuning’s insight was to let the TCP stack participate in setting the size of TCP buffers. In the past 10 years, most major operating systems have added TCP auto-tuning to their TCP network stacks. Linux as of 2.6, Windows as of Vista, Mac OS X as of 10.5.
I think that most operating system disable auto-tuning if you manually set socket buffer sizes. In BSD, this is done with setsockopt:
Host Tuning - details for various operating systems on manual and automatic tuning.
Enabling High Performance Data Transfers
Windows TCP Window Scaling Hitting plateau too early