From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,fa387db71612325a X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1994-10-03 23:52:38 PST Newsgroups: comp.unix.osf.misc Path: bga.com!news.sprintlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!MathWorks.Com!news2.near.net!noc.near.net!atria.com!pluto!mishkin From: mishkin@atria.com (Nathaniel Mishkin) Subject: Re: Max RPCs Queued per Server Message-ID: Sender: news@atria.com Nntp-Posting-Host: pluto.atria.com Organization: Atria Software, Inc. X-Newsreader: TIN [version 1.2 PL0] References: Distribution: usa Date: Tue, 4 Oct 1994 03:02:12 GMT Muiz Motani (a11389@mindlink.bc.ca) wrote: : In article jdement@lookout.mtt.it.uswc.uswest.com (Jeffrey DeMent) writes: : > 3)"maximum listen backlog" on a socket is 8 -- WHAT IS THIS "MAXIMUM LISTEN : > BACKLOG", I'm thinking it's a TCP thing, not a DCE concept ? : This maximum listen backlog refers to the backlog parameter on the : socket_listen() call. This is the API which blocks until it receives data on a : socket. The backlog parameter tells TPC/IP how many pending socket receives to : queue up - i.e. how large a buffer to allocate. : > 4)I'll specify "max_call_requests" of 16 in my server initialization code in Actually the listen backlog refers to how many incoming pending as-yet-unaccepted connections a socket can have before the OS starts telling the remote end that the connection attempt has failed. The listen backlog parameter has no effect on sockets that correspond to established connections. Unless things are really loaded and/or wedged, the RPC runtime should be able to accept() incoming connection requests as they arrives. (Whether it'll be able to do anything with the open connections is another matter.) : >LOGIC: : > 1)Within my DCE server process, a single "listener thread" is set up for : > TCP that listens to all TCP connection requests on a socket (this is : > called a "listening socket" and is different and counted separately from : > "comm sockets" described below (correct) ?). : Absolutely correct. This is the thread in which the socket_listen() call : blocks for data on sockets. You mean the accept() call. : Right. In TPC/IP terms, the listener thread creates a receiver thread and : spawns an I/O socket on which the receiver thread can read the data which is : being sent on the socket. : > 3)The "receiver thread" accepts an rpc's data and queues it up for use by a : > "call thread". The number of "call threads" is dictated by the : > "max_call_requests" in the rpc_server_listen() call. : This is also correct. You should also remember that there is a one-to-one : relationship between receiver threads and executor threads. For every executor : thread there is a corresponding receiver thread. With all these threads, you gotta hope your threads implementation is good, eh? : It's been a while since I looked at the connection oriented code and I'm sure : that somebody wil correct me on some of these points, but I hope this helps. I : will also dig out some of my old notes and see if I can find a definitive : answer. : > * But my class notes also talk about DCE creating sockets using the : > following logic: "max_call_requests" divided by "maximum listen backlog" : > which in my case would be 16/8=2, and it seems to suggest these are the : > aforementioned "comm sockets" which have "receiver threads" on them. : > But that seems to make no sense if everything else here holds. : > ..... so I'm confused ! : >Anyone care to tread into this and show me the light ? I suppose someone could figure it all out but I think it all really comes down to depending on characteristics of the socket implementation (and in general the kernel as a whole) that the DCE RPC runtime (much less the app built on top of DCE RPC) has little or no control over (e.g., the number of available mbufs). I.e., in the name of generality and with an eye toward future implementations, the DCE RPC API has more knobs than it can have a reasonable implementation of. -- -- Nat Mishkin Atria Software, Inc. mishkin@atria.com