Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!sun-barr!newstop!sun!terra!brent From: brent%terra@Sun.COM (Brent Callaghan) Newsgroups: comp.protocols.nfs Subject: Re: mountd Performance under Stress Keywords: mountd nfs performance Message-ID: <124174@sun.Eng.Sun.COM> Date: 5 Sep 89 21:17:59 GMT References: <1577@dsacg3.UUCP> Sender: news@sun.Eng.Sun.COM Lines: 40 I made some improvements to the mountd performance for the SunOs 4.0.3 release. They were oriented to speeding up mounts from a client using the automounter's "-hosts" map. The special situation here is that you have can have a large number of mount requests coming in from the same client in a short period of time but the changes should make the mountd a bit faster for all mount requests. - Exports caching. Previously the mountd had to open the /etc/exports file and do a linear search for the exported filesystem for each mount request from a client. I had the file cached as a linked list. The list is valid as long as a stat() of /etc/exports shows that it hasn't been updated (by exportfs). - Asynchronous /etc/rmtab updating. The mountd was changed to update the /etc/rmtab *after* it had sent the response containing the filehandle back to the client. There's no reason why the client should have to wait for this file to be updated. BTW: the /etc/rmtab is already cached as a linked list. The disk file is read only when the mountd starts up (presumably after a crash). - Change netgroup/hostname checking. Given a list of hostnames/netgroups there's no easy way to tell whether a name represents a hostname or a netgroup. The old mountd used to take each name one at a time first checking it as a netgroup then as a hostname. This is about the most inefficient way to do this checking and it could take a huge amount of time if the list was big (I've seen exports with 100 or so names in the list). The new code first checks the whole list as if it is hostnames. This is just a bunch of strcmp's so it's relatively fast. If there's no match, then it assumes that the list is netgroups and checks them with innetgr calls. This is a whole lot faster if the list is just hostnames. FYI. Brent Made in New Zealand --> Brent Callaghan @ Sun Microsystems uucp: sun!bcallaghan phone: (415) 336 1051