Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jul 2001 17:08:59 -0400 (EDT)
From:      bicknell@ufp.org
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   conf/28882: Network defaults are absurdly low.
Message-ID:  <200107102108.f6AL8xF03740@ussenterprise.ufp.org>

next in thread | raw e-mail | index | archive | help

>Number:         28882
>Category:       conf
>Synopsis:       Network defaults are absurdly low.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 10 14:10:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Leo Bicknell
>Release:        FreeBSD 4.2-RELEASE i386
>Organization:
United Federation of Planets
>Environment:

FreeBSD 4.x based systems, they all seem to be the same for this
particular problem.

>Description:

The following sysctl variables show FreeBSD defaults:

  kern.ipc.maxsockbuf: 262144
  net.inet.tcp.sendspace: 16384
  net.inet.tcp.recvspace: 16384

These are absurd.  The tcp.sendspace/recvspace limit the window size of
a TCP connection, which in turn limit throughput.  On a 50ms coast to coast
path, it imposes a limit of 16384 Byes * 1000ms/sec / 50ms = 327 KBytes/sec.
This is a third of what a 10Mbps/sec cable modem should be able to
deliver, say nothing of a 100Meg FE connected host (eg server) at an ISP.
Go further, 155ms to Japan from the east coast of the US and you're down
to under 100 KBytes/sec, all due to a poor software limit.

>How-To-Repeat:

Do some FTP's from a well connected host to a far away well connected
host with these values.  You can see the probelms first hand.

>Fix:

To allow a 100Mbps FE host to get 100Mbps to Japan, I put the following
values in /etc/sysctl.conf:

kern.ipc.maxsockbuf=16777216
net.inet.tcp.sendspace=4194304
net.inet.tcp.recvspace=4194304

I suspect the FreeBSD authors will want tobe more conservative to allow
lower memory machines to operate properly, so I suggest the following system
defaults:

kern.ipc.maxsockbuf=1048576
net.inet.tcp.sendspace=524288
net.inet.tcp.recvspace=524288

I believe it is important to make these defaults as few users know to
enable them.  I also believe that:

tcp_extensions="YES"

should be the default, as they are highly unlikey to break anything in
this day and age, and are necessary to use windows over 64K.   An 
interesting compromise would be to only set the settings I suggest if
tcp_extensions is turned on.

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107102108.f6AL8xF03740>