From: Jim Jagielski Date: Fri, 29 May 1998 15:33:19 +0000 (+0000) Subject: Have people use sysctl to adjust somaxconn X-Git-Tag: 1.3.0~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=815ef2366131e8b5aed4b43ac02503a6bbce3311;p=thirdparty%2Fapache%2Fhttpd.git Have people use sysctl to adjust somaxconn instead of the bogus and incorrect method we suggested before git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@81412 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/platform/perf-bsd44.html b/docs/manual/platform/perf-bsd44.html index 4d60f4b8876..f432b5a88ae 100644 --- a/docs/manual/platform/perf-bsd44.html +++ b/docs/manual/platform/perf-bsd44.html @@ -112,7 +112,6 @@ your own values in the kernel configuration file: # Network options. NMBCLUSTERS defines the number of mbuf clusters and # defaults to 256. This machine is a server that handles lots of traffic, # so we crank that value. -options SOMAXCONN=256 # max pending connects options NMBCLUSTERS=4096 # mbuf clusters at 4096 # @@ -122,10 +121,6 @@ options CHILD_MAX=512 # maximum number of child processes options OPEN_MAX=512 # maximum fds (breaks RPC svcs) -SOMAXCONN is not derived from maxusers, so you'll always need to increase -that yourself. We used a value guaranteed to be larger than Apache's -default for the listen() of 128, currently. -

In many cases, NMBCLUSTERS must be set much larger than would appear @@ -163,6 +158,27 @@ value derived from maxusers proved sufficient for our load.

+To increase the size of the listen() queue, you need to +adjust the value of SOMAXCONN. SOMAXCONN is not derived from maxusers, +so you'll always need to increase that yourself. We use a value guaranteed +to be larger than Apache's default for the listen() of 128, currently. +The actual value for SOMAXCONN is set in sys/socket.h. +The best way to adjust this parameter is run-time, rather than changing +it in this header file and thus hardcoding a value in the kernel and +elsewhere. To do this, edit /etc/rc.local and add the +following line: +

+    /usr/sbin/sysctl -w kern.somaxconn=256
+
+ +

+ +We used 256 but you can tune it for your own setup. In +many cases, however, even the default value of 128 (for +later versions of FreeBSD) is OK. + +

+ Caveats