freebsd-dev/sys/netinet
Andre Oppermann 6741ecf595 Auto sizing TCP socket buffers.
Normally the socket buffers are static (either derived from global
defaults or set with setsockopt) and do not adapt to real network
conditions. Two things happen: a) your socket buffers are too small
and you can't reach the full potential of the network between both
hosts; b) your socket buffers are too big and you waste a lot of
kernel memory for data just sitting around.

With automatic TCP send and receive socket buffers we can start with a
small buffer and quickly grow it in parallel with the TCP congestion
window to match real network conditions.

FreeBSD has a default 32K send socket buffer. This supports a maximal
transfer rate of only slightly more than 2Mbit/s on a 100ms RTT
trans-continental link. Or at 200ms just above 1Mbit/s. With TCP send
buffer auto scaling and the default values below it supports 20Mbit/s
at 100ms and 10Mbit/s at 200ms. That's an improvement of factor 10, or
1000%. For the receive side it looks slightly better with a default of
64K buffer size.

New sysctls are:
  net.inet.tcp.sendbuf_auto=1 (enabled)
  net.inet.tcp.sendbuf_inc=8192 (8K, step size)
  net.inet.tcp.sendbuf_max=262144 (256K, growth limit)
  net.inet.tcp.recvbuf_auto=1 (enabled)
  net.inet.tcp.recvbuf_inc=16384 (16K, step size)
  net.inet.tcp.recvbuf_max=262144 (256K, growth limit)

Tested by:	many (on HEAD and RELENG_6)
Approved by:	re
MFC after:	1 month
2007-02-01 18:32:13 +00:00
..
libalias o made in kernel libalias mpsafe 2006-12-15 12:50:06 +00:00
accf_data.c
accf_http.c
icmp6.h
icmp_var.h
if_atm.c
if_atm.h
if_ether.c o Increment requests counter right before send out an ARP query actually. 2007-01-14 18:44:17 +00:00
if_ether.h
igmp_var.h
igmp.c Improve style(9) conformance of igmp.c. 2006-12-04 00:41:48 +00:00
igmp.h
in_cksum.c
in_gif.c With exception of the if_name() macro, all definitions in net_osdep.h 2006-08-04 21:27:40 +00:00
in_gif.h
in_pcb.c Some whitespace nits and remove a few casts. 2006-12-29 14:58:18 +00:00
in_pcb.h Fix race conditions on enumerating pcb lists by moving the initialization 2006-07-18 22:34:27 +00:00
in_proto.c Ok, here it is, we finally add SCTP to current. Note that this 2006-11-03 15:23:16 +00:00
in_rmx.c Complete timebase (time_second -> time_uptime) conversion. 2006-07-05 23:37:21 +00:00
in_systm.h
in_var.h The IPv4 code should clean up multicast group state when an interface 2006-09-28 10:04:07 +00:00
in.c Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
in.h Import macros IN_LINKLOCAL(), IN_PRIVATE(), IN_LOCAL_GROUP(), IN_ANY_LOCAL(). 2007-01-31 14:34:47 +00:00
ip6.h
ip_carp.c Make it possible that carpdetach() unlocks on return. Then, in 2007-01-25 18:03:40 +00:00
ip_carp.h Make sure that carp_header is 36 bytes long 2006-12-01 18:37:41 +00:00
ip_divert.c Some whitespace nits and remove a few casts. 2006-12-29 14:58:18 +00:00
ip_divert.h
ip_dummynet.c - Use non-recursive mutex. MTX_RECURSE is unnecessary since rev. 1.70 2006-10-29 12:09:24 +00:00
ip_dummynet.h When sending a packet from dummynet, indicate that we're forwarding 2006-02-14 06:36:39 +00:00
ip_ecn.c
ip_ecn.h
ip_encap.c With exception of the if_name() macro, all definitions in net_osdep.h 2006-08-04 21:27:40 +00:00
ip_encap.h
ip_fastfwd.c Remove the IPFIREWALL_FORWARD_EXTENDED option and make it on by default as it always was 2006-08-17 00:37:03 +00:00
ip_fw2.c Remove two lines that somehow snuck back in after testing. 2007-01-09 21:03:07 +00:00
ip_fw_pfil.c Summer of Code 2005: improve libalias - part 2 of 2 2006-12-29 21:59:17 +00:00
ip_fw.h Summer of Code 2005: improve libalias - part 2 of 2 2006-12-29 21:59:17 +00:00
ip_gre.c Fix the following bpf(4) race condition which can result in a panic: 2006-06-02 19:59:33 +00:00
ip_gre.h Fix stack corruptions on amd64. 2006-01-21 10:44:34 +00:00
ip_icmp.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
ip_icmp.h
ip_id.c
ip_input.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
ip_ipsec.c Remove unneeded mac.h include. 2006-07-06 13:25:01 +00:00
ip_ipsec.h Move the IPSEC related code blocks to their own file to unclutter 2006-02-01 13:55:03 +00:00
ip_mroute.c Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
ip_mroute.h Nits. 2006-09-29 16:16:41 +00:00
ip_options.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
ip_options.h Move MAX_IPOPTLEN and struct ipoption back into ip_var.h as 2005-11-19 14:01:32 +00:00
ip_output.c Back out revision 1.264. 2006-12-10 13:44:00 +00:00
ip_var.h Fix a long-standing limitation in IPv4 multicast group membership. 2006-05-14 14:22:49 +00:00
ip.h Marking this as __packed was needed to get the alignment and offset of 2007-01-12 07:23:31 +00:00
ipprotosw.h
pim_var.h
pim.h
raw_ip.c Summer of Code 2005: improve libalias - part 2 of 2 2006-12-29 21:59:17 +00:00
sctp_asconf.c - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_asconf.h - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_auth.c - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_auth.h Ok, here it is, we finally add SCTP to current. Note that this 2006-11-03 15:23:16 +00:00
sctp_bsd_addr.c - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_bsd_addr.h - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_constants.h - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_crc32.c - Macroizes the V6ONLY flag check. 2007-01-15 15:12:10 +00:00
sctp_crc32.h - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_header.h Ok, here it is, we finally add SCTP to current. Note that this 2006-11-03 15:23:16 +00:00
sctp_indata.c - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_indata.h - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_input.c - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_input.h - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_lock_bsd.h 1) Fixes on a number of different collision case LOR's. 2006-12-14 17:02:55 +00:00
sctp_os_bsd.h - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_os.h - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_output.c - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_output.h - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_pcb.c - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_pcb.h - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_peeloff.c - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_peeloff.h - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_structs.h - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_timer.c - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_timer.h - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_uio.h - Macroizes the V6ONLY flag check. 2007-01-15 15:12:10 +00:00
sctp_usrreq.c - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_var.h - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp.h Ok, here it is, we finally add SCTP to current. Note that this 2006-11-03 15:23:16 +00:00
sctputil.c - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctputil.h - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
tcp_debug.c
tcp_debug.h
tcp_fsm.h
tcp_hostcache.c MFp4: 92972, 98913 + one more change 2006-12-12 12:17:58 +00:00
tcp_input.c Auto sizing TCP socket buffers. 2007-02-01 18:32:13 +00:00
tcp_output.c Auto sizing TCP socket buffers. 2007-02-01 18:32:13 +00:00
tcp_reass.c Auto sizing TCP socket buffers. 2007-02-01 18:32:13 +00:00
tcp_sack.c Eliminate debug code that catches bugs in the hinting of sack variables 2006-04-06 17:21:16 +00:00
tcp_seq.h Remove T/TCP RFC1644 Connection Count comparison macros. They are no longer 2006-06-18 14:24:12 +00:00
tcp_subr.c Whitespace fix and remove an extra cast. 2006-12-30 17:53:28 +00:00
tcp_syncache.c Change the way the advertized TCP window scaling is computed. Instead of 2007-02-01 17:39:18 +00:00
tcp_timer.c Back when we had T/TCP support, we used to apply different 2006-09-07 13:06:00 +00:00
tcp_timer.h if min is greater than max, prefer max over min... I managed to get a 2006-09-25 07:22:39 +00:00
tcp_timewait.c Whitespace fix and remove an extra cast. 2006-12-30 17:53:28 +00:00
tcp_usrreq.c Auto sizing TCP socket buffers. 2007-02-01 18:32:13 +00:00
tcp_var.h Auto sizing TCP socket buffers. 2007-02-01 18:32:13 +00:00
tcp.h Add missing TH_PUSH to the TH_FLAGS enumeration. 2006-02-18 16:50:08 +00:00
tcpip.h
udp_usrreq.c o One more typo in the comment. 2007-01-06 13:12:24 +00:00
udp_var.h
udp.h