To further complicate the picture, the maximum backlog value for a server
will sometimes change dynamically. If the backlog has exceeded the maximum
and a number of connection requests have been dropped, the maximum backlog
can jump from the default 10 to a number in the hundreds. This behavior is
not documented anywhere that I have ever been able to find, but I have
witnessed it and was able to recreate it. It was years ago, and I was using
FTP, but a customer recently reported maximum backlog values jumping from 10
to 768 on some DB2 servers.
I suppose the server could be re-issuing its listen() with a new backlog
value, but it's not clear to me how the application would even know that a
backlog had developed -- that's TCP's business. And in my case, at least,
the new maximum backlog value far exceeded what was coded in the PROFILE for
SOMAXCONN. It appeared to me as if it were a unilateral decision by the
stack.
> -----Original Message-----
> From: IBM TCP/IP List [mailto:IBMTCP-***@VM.MARIST.EDU] On
> Behalf Of Chris Mason
> Sent: Wednesday, March 15, 2006 5:23 PM
> To: IBMTCP-***@VM.MARIST.EDU
> Subject: Re: How do I display TCPIP.PROFILE parm SOMAXCONN
>
> Jim
>
> Armed with what Doug mentioned, I did a search using
> "MaximumBacklog" in the z/OS V1R7.0 Communications Server IP
> System Administrator's Commands manual
> http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/F1A
> 1C240. There is only one "hit": Netstat ALL/-A report,
> 3.3.2.2. You will see the example output here and the explanation:
>
> <quote>
>
> MaximumBacklog
>
> The maximum number of connection requests a server will
> maintain waiting to finish the connection establishment.
> Connection requests that are received when the maximum number
> of requests is already on the backlog queue are generally
> discarded. The higher the maximum backlog queue, the more
> simultaneous connection requests a server can handle without
> having to drop requests.
>
> </quote>
>
> Now, going back to my last post and despite Doug's
> endorsement, I think I made a mistake based on the APAR text
> I was reading and *not* thinking about. I'm pretty sure there
> are only two execution-time limits, the minimum of which is used:
>
> - The PROFILE SOMAXCONN value
> - The value of the listen() call "backlog" parameter
>
> I think the socket.h value gets in on the act by virtue of
> SOMAXCONN being a suggested token to be placed in the
> listen() call as the second, "backlog", parameter. I suspect
> - unfortunately I can't check - that SOMAXCONN in the
> socket.h file is a #define (a Google search revealed "#define
> SOMAXCONN 8"
> so I think I'm right). Thus it's only if you use the token
> SOMAXCONN in the
> listen() call that you need to follow the suggestion in the
> "Usage Notes"
> (actually there is only the one) in section 1.2.52 SOMAXCONN
> of the CS IP Configuration Reference that the PROFILE
> SOMAXCONN value and the socket.h file SOMAXCONN value should
> be matched.
>
> Nobody has responded concerning the algorithm I suspected
> exists for converting the "coded" "backlog" number to the
> "operational" "backlog"
> number. I have had a further possible memory that the
> algorithm exists for any TCP/IP implementation based upon a
> popular BSD which - I think - was 4.3. I'm putting up an
> "Aunt Sally" for contributors to take shots at.
>
> Chris Mason
>
> ----- Original Message -----
> From: "Doug Bulbeck" <***@celero.ca>
> Newsgroups: bit.listserv.ibmtcp-l
> To: <IBMTCP-***@VM.MARIST.EDU>
> Sent: Wednesday, 15 March, 2006 4:15 PM
> Subject: Re: [IBMTCP-L] How do I display TCPIP.PROFILE parm SOMAXCONN
>
>
> Hi Jim,
>
> You can display the SOMAXCONN value by issuing a 'NETSTAT
> ALL' command from tso, or the 'netstat -A' command from USS.
> This will give you stats for all current connections, but you
> can use filters to reduce the amount of output you get. Look
> for the information on the connection for your application's
> listener port -- the 'Local Socket' is generally 0.0.0.0..nn
> in this case. The information included will indicate the
> 'CurrentBacklog' and the 'MaximumBacklog', where the 'MaximumBacklog'
> will be the value of SOMAXCONN that the application is using
> -- either the default from the profile, or whatever value the
> application set when it opened the socket as described by
> Chris Mason. Another interesting piece of information will
> be the 'ConnectionsDropped' field, which indicates the number
> of connections that were dropped because the maximum number
> of connection requests was already in the backlog queue.
>
> Regards,
> Doug Bulbeck
>
>
>
> -----Original Message-----
> From: IBM TCP/IP List [mailto:IBMTCP-***@VM.MARIST.EDU] On
> Behalf Of Jim Labine
> Sent: March 14, 2006 1:08 PM
> To: IBMTCP-***@VM.MARIST.EDU
> Subject: [IBMTCP-L] How do I display TCPIP.PROFILE parm SOMAXCONN
>
>
> We need to change SOMAXCONN - but I do not know how to
> display the current settings.
>
> I know it is defaulted to SOMAXCONN 10.
>
> I have been looking at NETSTAT and other TCPIP display commands.
>
> Thank You
>
> Jim LaBine
> TCF Bank Tech Support
> MPLS, MN
>
> ----------------------------------------------------------------------
> For IBMTCP-L subscribe / signoff / archive access
> instructions, send email to ***@VM.MARIST.EDU with the
> message: INFO IBMTCP-L
----------------------------------------------------------------------
For IBMTCP-L subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO IBMTCP-L