Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!icdoc!qmw-cs!liam From: liam@cs.qmw.ac.uk (William Roberts) Newsgroups: comp.protocols.nfs Subject: Re: How many clntudp_create() are there in an NFS client? Summary: Number of clients is compiled in Keywords: nfs biod udp clntudp_create() Message-ID: <1818@sequent.cs.qmw.ac.uk> Date: 22 Mar 90 19:38:55 GMT References: <6306@umd5.umd.edu> Reply-To: liam@cs.qmw.ac.uk (William Roberts) Organization: Computer Science Dept, QMW, University of London, UK. Lines: 35 Expires: Sender: Followup-To: Distribution: The nfsd command opens a single UDP socket, then forks a lot to make process table entries, then makes a system call to pass the socket to the kernel routines which take over from there. The biod processes just fork to make process table slots and then execute a different system call. This does almost everything that _exit() does (frees memory etc) but leaves the process table entries available for associating with read/write requests. Entirely separately, whenever the kernel needs to do an rpc to a remote server, it does an clget to find a free "client structure" from a table whose size is fixed at compile time. The free client structure is marked as "in use" and then a clntudp_create() is called to make a socket if this client structure has not been used before. The biod daemons is sitting idle in a queue until the kernel NFS code notices that the read/write request is flagged as ASYNCH, in which case an attempt will be made to get a biod to wait for the I/O rather than the current process. If there aren't any biods then some other lucky process gets to do the waiting! You can run without biods - it all still works OK. To summarise: the number of clntudp_create() calls is limited by the size of the array of client structures, and has nothing to do with the number of nfsds, biods or anything else. -- William Roberts ARPA: liam@cs.qmw.ac.uk Queen Mary & Westfield College UUCP: liam@qmw-cs.UUCP Mile End Road AppleLink: UK0087 LONDON, E1 4NS, UK Tel: 01-975 5250 (Fax: 01-980 6533)