Date: Thu, 15 Nov 2001 19:26:57 +0000 (GMT)
From: Mark Blackman <mark@blackmans.org>
To: FreeBSD-gnats-submit@freebsd.org
Subject: docs/32041: Add point about net.inet.tcp.portange.{first,last} sysctl tunable to tuning(7) manpage
Message-ID: <20011115192657.6E3D7183A@mail.blackmans.org>
index | next in thread | raw e-mail
>Number: 32041
>Category: docs
>Synopsis: Add point about net.inet.tcp.portange.{first,last} sysctl tunable to tuning(7) manpage
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-doc
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri Nov 16 10:30:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Mark Blackman
>Release: FreeBSD 4.4-STABLE i386
>Organization:
Gnomes of Zurich
>Environment:
System: FreeBSD maddog 4.4-STABLE FreeBSD 4.4-STABLE #124: Fri Nov 2 04:05:32 GMT 2001 root@maddog:/usr/obj/usr/src/sys/BASIC i386
>Description:
tuning(7) doesn't mention the net.inet.tcp.portange.{first,last}
sysctl tunables and probably ought to as at least one published
benchmark failed because the benchmarkers were unaware of its
existence.
http://www.samag.com/documents/s=1147/sam0108q/
>How-To-Repeat:
Read the man page and fail to realize that
net.inet.tcp.portange.{first,last} might need adjustment.
>Fix:
--- tuning.7 Sat Nov 3 03:32:43 2001
+++ - Thu Nov 15 19:10:11 2001
@@ -332,6 +332,32 @@
connections.
.Pp
The
+.Em net.inet.ip.portrange.first
+and
+.Em net.inet.ip.portrange.last
+tunables default to 1024 and 5000, respectively. These, like many other
+sysctl tunables, are designed to limit the use of kernel resources
+(i.e. port number space) unless there is an explicit requirement for
+more than this reasonable default. These are the port numbers
+allocated to sockets which were created with a
+.Xr socket 2
+call where
+the port number parameter was zero. This default range of ports (3977
+in total) is likely to be insufficient for a machine running a number
+of client programs of whatever description. The 'first' tunable can't
+be set below 1024, but may be set higher.
+The 'last' tunable will usually be the one that requires tweaking on
+a machine with numerous clients (that don't make use of the IP_PORTRANGE
+.Xr setsockopt 2
+option). Assuming you have enough file descriptors and your client
+code uses
+.Xr perror 3 ,
+you will see a message like "Can't assign requested address"
+(EADDRNOTAVAIL) or "Resource temporarily unavailable" (EAGAIN) if this is set
+too low for your application. See /usr/src/sys/netinet/in.h for more
+discussion.
+.Pp
+The
.Em kern.ipc.somaxconn
sysctl limits the size of the listen queue for accepting new tcp connections.
The default value of 128 is typically too low for robust handling of new
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011115192657.6E3D7183A>
