Subject: Re: New sysctl "net.listen_backlog"?
To: Perry E. Metzger <email@example.com>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
Date: 09/14/1998 18:34:00
Perry Metzger writes:
>Todd Vierling writes:
>> Actually, SOMAXCONN _should_ be set to the upper hard limit, i.e. UINT_MAX.
>> The reason is simple - your app compiles with the macro's define of 128, you
>> up the limit via sysctl, and your app is still stuck at 128.
>People compiling third party software that probably should have a
>limit in it won't be happy with that.
>Leave it be...
My take is, if the app writer uses SOMAXCONN, they're asking for a big
a backlog as they can get, or perhaps jus tbeing lazy about "large backlog".
If we leave SOMAXCONN at 128, then that limits the app to 128 even if
that's too small (_or_ even too big, for a slow machine). But bumping
the sysctl can't get beyond 128.
But if we change SOMAXCONN to INT_MAX, then the app gets no more than
the sysadmin configured for the sysctl variable.
Without having to pick huge values of sominconn, which affects _all_
apps, even those that deliberately want small backlogs
(e.g., like 1).