SUMMARY: INETD BACKLOG VALUE

From: Tom Murray <murray_at_reston.ans.net>
Date: Mon, 25 Mar 1996 13:58:47 -0500

Many thanks to all who responded to my question on how to
change the inetd listen backlog value. I am enclosing the
the steps we took in order to increase the inted backlog value.
I must also point out in DU v4.0 there is a tunable kernel parameter
'sominconn' which will override the application specified backlog,
including inetd.

In order to change the backlog value in inted, we had
to port NetBSD inetd. The port was fairly straight forward.
Here is a summary of changes made to NetBSD inetd.c:


*********************************************
Changed the connection per time frame throttle
from 40 to 4000

> #define TOOMANY 40 /* don't start more than TOOMANY */

< #define TOOMANY 4000 /* don't start more than TOOMANY */
*********************************************


*********************************************
Changed the time it takes to reconnect to a
failed connection request.

< #define RETRYTIME (60*10) /* retry after bind or server fail */

< #define RETRYTIME (60) /* retry after bind or server fail */
*********************************************

*********************************************
Replaced the following line:

> typeof(((struct rlimit *)0)->rlim_cur) rlim_ofile_cur = OPEN_MAX;

WITH:

< unsigned long rlim_ofile_cur = OPEN_MAX;
*********************************************

*********************************************
Commented out the debug statement:

< /*if (debug == 0)
                daemon(0, 0);
        */
*********************************************

*********************************************
Changed the listen backlog value from 10 to 128:

< listen(sep->se_fd, 10);

> listen(sep->se_fd, 128);
*********************************************


In addition to changing the backlog value to 128 , the somaxconn kernel
variable needs to be patched as well.


To patch the running kernel, do this,

# /usr/bin/dbx -k /vmunix
print somaxconn
assign somaxconn = 128
print somaxconn
quit

To patch the kernel on disk use patch,

# /usr/bin/dbx -k /vmunix
print somaxconn
patch somaxconn = 128
print somaxconn
quit


We are now running with the NetBSD inetd and everything seems to be
working just fine.

Tom
murray_at_ans.net

========================================================================
Original Question:

> I am interested in increasing the value of the listen backlog
> value in inetd. The current value in Digital Unix is ten. As far as I
> know the only way to increase this value is to change the source code.
> Unfortunately, I do not have a source code license for Digital Unix.
>
> Has anyone attempted to port NETBSD inetd or any other inetd
> to Digital Unix? If so, which platform of inetd did you use?
> Any problems associated with the ported inetd?
>
>
> Thanks in Advance for your help.
>
> Tom
> murray_at_ans.net
Received on Mon Mar 25 1996 - 20:26:58 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:46 NZDT