Date: Fri, 01 Aug 1997 04:20:20 -0700 From: David Greenman <dg@root.com> To: Doug White <dwhite@resnet.uoregon.edu> Cc: rajesha <rajesha@ct-yardley.com>, questions@FreeBSD.ORG Subject: Re: number of socket connections Message-ID: <199708011120.EAA10693@implode.root.com> In-Reply-To: Your message of "Fri, 01 Aug 1997 00:59:46 PDT." <Pine.BSF.3.96.970801005843.11381N-100000@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
>On Wed, 30 Jul 1997, rajesha wrote: > >> When doing socket programming, what is the maximum socket connections that >> can be made in UNIX in FreeBSD: 128 or 255? I looked in the sys/socket.h >> header file and it had a define of 'SOMAXCONN' as 128. >> > >This is defined as a kernel sysctl variable 'kern.somaxconn.' The default >is 128 there. > >$ sysctl -a | grep somaxconn >kern.somaxconn: 128 somaxconn/SOMAXCONN is for limiting the number of unaccepted connections - in other words, those connections for which an accept() hasn't yet been made. It puts in upper limit on the "backlog" parameter to the listen() syscall. somaxconn does NOT limit the total number of socket connections. The only limit there would be caused by exceeding the global open file limit (kern.maxfiles), or perhaps more indirectly, exceeding the maximum number of networking buffers in the system. -DG David Greenman Core-team/Principal Architect, The FreeBSD Project
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708011120.EAA10693>