freebsd-nq/sys
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
..
amd64 Introduce some more SO_ option equivalents from Linux to FreeBSD. 2007-02-01 13:36:19 +00:00
arm Use our own timer that piggybacks on npe_tick() callout instead of 2007-01-30 01:18:29 +00:00
boot o Wrap long lines. 2007-01-14 13:55:43 +00:00
bsm Merge OpenBSM 1.0 alpha 12 import changes into src/sys/bsm. New events 2006-09-25 12:22:07 +00:00
cam Use the more specific 'EM732X' designation rather than * to disable sync 2007-01-23 17:29:31 +00:00
coda change vop_lock handling to allowing tracking of callers' file and line for 2006-11-13 05:51:22 +00:00
compat Introduce some more SO_ option equivalents from Linux to FreeBSD. 2007-02-01 13:36:19 +00:00
conf Remove MSDOSFS_LARGE compile time option. It has been converted 2007-01-30 05:01:06 +00:00
contrib Clean up pfr_kentry_pl2 as well. This fixes a kernel panic in the vm.zone 2007-01-01 16:51:11 +00:00
crypto Initialize T1 to silent gcc warning. 2006-10-22 02:19:33 +00:00
ddb Use FOREACH_PROC_IN_SYSTEM instead of using its unrolled form. 2007-01-17 15:05:52 +00:00
dev Fix huge memory leak within sound buffer (during channel destruction, 2007-02-01 09:46:03 +00:00
fs Fixing compilation bustage by removing references to opt_msdosfs.h. 2007-01-30 08:05:04 +00:00
gdb
geom We expect 'bio_data != NULL' for BIO_{READ,WRITE,GETATTR}, but for 2007-01-28 23:36:07 +00:00
gnu Cylinder group bitmaps and blocks containing inode for a snapshot 2007-01-23 10:01:19 +00:00
i4b Fix fat-fingering in previous commit. 2006-12-29 16:38:22 +00:00
i386 Introduce some more SO_ option equivalents from Linux to FreeBSD. 2007-02-01 13:36:19 +00:00
ia64 Remove 3rd clause, renumber, ok per email 2007-01-12 07:26:21 +00:00
isa Cleaned up declaration and initialization of clock_lock. It is only 2007-01-23 08:01:20 +00:00
isofs/cd9660 The ISO9660 spec does allow files up to 4G. Change the i_size 2006-12-08 07:43:53 +00:00
kern Generic socket buffer auto sizing support, header defines, flag inheritance. 2007-02-01 17:53:41 +00:00
libkern Add strstr() function to the libkern. 2006-08-12 15:28:39 +00:00
modules Reflecting the removal of MSDOSFS_LARGE found in sys/conf/files:1.1173. 2007-02-01 04:21:03 +00:00
net Update comment for struct bpf_d: we now store buffered packets for BPF 2007-01-29 14:41:03 +00:00
net80211 Add initial support for 900MHz cards like the Ubiquiti SR9: 2007-01-15 01:12:28 +00:00
netatalk Clean up DDP layer netatalk code: 2007-01-12 15:07:51 +00:00
netatm Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
netgraph - Create ng_ppp_bypass() function, that prepares a packet 2007-01-25 21:16:50 +00:00
netinet Auto sizing TCP socket buffers. 2007-02-01 18:32:13 +00:00
netinet6 Revert nd6.c revs. 1.67, 1.68, 1.69, 1.70 in an attempt to unbreak 2007-01-26 23:22:58 +00:00
netipsec s,#if INET6,#ifdef INET6, 2006-12-14 17:33:46 +00:00
netipx Factor out UCB and my copyrights from copyrights of Mike Mitchell; 2007-01-08 22:14:00 +00:00
netkey With exception of the if_name() macro, all definitions in net_osdep.h 2006-08-04 21:27:40 +00:00
netnatm Factor out my copyrights + licenses from Charles D. Cranor and 2007-01-08 22:30:39 +00:00
netncp Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
netsmb Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
nfs NFSv4 client: 2006-11-28 19:33:28 +00:00
nfs4client Rename some functions and variables from nfs_* to nfs4_* to avoid 2007-01-25 14:33:13 +00:00
nfsclient Fix for a vnode lock leak in nfs_create() in the event of an error. 2007-01-31 23:10:27 +00:00
nfsserver The nfsm_srvpathsiz() macro in nfsrv_symlink() in nfs_serv.c should 2007-01-02 20:42:08 +00:00
opencrypto
pc98 MFi386: revision 1.647. 2007-01-28 07:19:14 +00:00
pccard
pci Change the remainder of the drivers for DMA'ing devices enabled in the 2007-01-21 19:32:51 +00:00
powerpc Remove stale header. 2007-01-26 04:58:31 +00:00
rpc
security When returning early from audit_arg_file() due to so->so_pcb being NULL 2007-01-06 22:28:28 +00:00
sparc64 Quiet GCC4 warnings regarding the width of printf()-arguments not 2007-01-20 17:14:12 +00:00
sun4v MFsparc64: Add .cvsignore file here too. 2007-01-30 10:50:55 +00:00
sys Generic socket buffer auto sizing support, header defines, flag inheritance. 2007-02-01 17:53:41 +00:00
tools
ufs Prevent quotactl calls that pass in an id of -1 from incorrectly 2007-02-01 02:13:53 +00:00
vm Fix for problems that occur when all mbuf clusters migrate to the mbuf packet 2007-01-25 01:05:23 +00:00
Makefile o Add cam to a list of cscope dirs. 2006-11-26 18:27:16 +00:00