Subject: Re: QUESTION ABOUT SOMAXCONN IN SYS/SOCKET.H FOR 1.0 AND 1.1
To: None <buhrow@cats.ucsc.edu, netbsd-help@NetBSD.ORG, tech-kern@NetBSD.ORG>
From: Arne H. Juul <arnej@pvv.unit.no>
List: netbsd-help
Date: 01/05/1996 21:34:15
 > I see in the
 > NetBSD source, that SOMAXCONN (sys/socket.h) is set to 5 and that the only
 > place it is used in the 0.9A and 1.0 src trees is in
 > sys/kern/uipc_socket.c.

 > I understand that one needs to
 > recompile the kernel to get this altered behavior, and that one should
 > probably put the altered sys/socket.h in the /usr/include on the build
 > machine so that the application and the kernel agree about what the maximum
 > queue size is?

We're running our web server (avarage of 75000 connections/day) with:

options         SOMAXCONN=500

And then in /sys/sys/socket.h:

#ifndef SOMAXCONN
#define SOMAXCONN       5
#endif

(It's also installed in /usr/include/sys/socket.h in case some application
uses it.)

I don't think there's any gotchas in here.  You probably need to increase
NMBCLUSTERS as well, in case you haven't already.

It would actually be nice if most parameters was set inside #ifndef
so they could be overridden in the kernel config file easily.

  -  Arne H. J.