monty@nestor.bsd.uchicago.edu (Monty Mullig) (01/15/90)
Many thanks to those who responded to my question about choosing a good number of nfsd processes to run. Here is a summary of responses that I received. I have excluded Piercarlo Grandi's response. Because of its length and the fact that it was posted to sun-spots directly, I thought it best just to reference his posting, V9N6. Piercarlos differs from others in his approach and strong aversions to increasing the number of nfsd processes. It was also very thorough. ======================================== X-From: blc@sol.med.ge.com (Brett Chapman x5156 ) Even though the man page says 4, eight is actually the real number. I don't think that too many will hurt, but too few will definitely slow things down! If you have a copy of 'top', you can watch the process load, and see how long, often, and how many of the nfsds are active. If all are ever active, then increasing the number of nfsds would be a good idea. X-From: ncr-fc!chuckp@bach@ccncsu.ColoState.EDU (Chuck Phillips) The man page for nfsd suggest that "four is a good number" of nfsd process to start, but doesn't give any further information on how to choose the best number to start. We have 10 diskless clients and about 20 PCs running off of a 4/280 and our diskless 3/50s have recently begun to run noticably slower (we just added 4). Should we increase the nfsd processes ? our 4/280 has one controller on each drive, with the client swap partitions on a rimfire controller and a hitachi 892 MB drive. we have 32 MB on the 4/280. Because we have a large network, our servers run 6 biod's and 8 nfsd's. If your PCs are running NFS, you probably should up the number of nfsd's. The down side of increasing the number of nfsd's on a Sun 4 server is that it can increase the load factor by that much more during times of heavy NFS activity. As your probably know, the current Sun 4's are lousy at context switching. I saw a review in a "UNIX World" "Tested Mettle" column a graph of throughput vs. load factor for a Sun 4. At a load factor of 5, the Sun 4 throughput reduced by half. Neat, eh? However, this seems to be a common drawback of RISC systems. X-From: metaphor!aspen!ammon@decwrl.dec.com (Mike Ammon) I also couldn't find the answer in the manual or from talking to sun. I got this information from Mt. Xinu at Usenix. Each nfsd can handle one request at a time. So, the number of simultaneous requests can be up to the number of nfsds running. Rules of thumb: 1) If the client response is slow add more nfsds. 2) If the server load is too high reduce the number of nfsds. 3) If a balance cannot be reached between 1) and 2) you need a faster server or more servers. We have a 3/280 and about 40 clients (3/50 and 3/80). All clients have disks so there is no network swapping. I am currently running 10 nfsds. I noticed a big improvement going from 4 to 6, some improvement from 6 to 8 and little or no improvement from 8 to 10. X-From: ames!omni.com!bob@ncar.UCAR.EDU (Bob Weissman) Yes, increase the number of nfsd processes. A good guess would be one nfsd per active client. If all 10 of your diskless nodes tend to doing real work simultaneously, you will want 10 nfsds. If the PCs do a lot of NFS, you may need to increase the number beyond that. In fact, if your server is not a compute server (i.e., it's just an NFS server and nobody does compiles on it), you may want to increase the nfsd number even more. The higher the number of nfsds, the less CPU will be available for non-NFS stuff on your server. From: alex <alexl%daemon.cna.tek.com@RELAY.CS.NET> WIth 'ps axg', look at the TIME on your nfsd's. If they are looking busy in a short period of time, then maybe you could use some more. Cant hurt to go to 8 for a while.
narten@cs.albany.edu (Thomas Narten) (01/29/90)
>In blue sky theory, the number of nfsd processes should be equal to the >number of discs you have plus two; this to cover the possibility where all >the discs are busy, one nfsd is working the ethernet (if you have more >than one ethernet interface more than one nfsd could be reading or writing >to the ethernet) and one nfsd is running the CPU as well. If the disk device drivers are written in any sort of reasonable fashion, there is no reason not to have many more simultaneous disk operations than disk drives. The driver should reorder queued operations to minimize seek times. Thus, increasing the number of nfsds might actually increase througput. Without looking at the code, I dunno of Sun drivers do that. I also understand that SCSI disks really muck this up too, because the driver really doesn't know how the disk is layed out. This is bad news of course, because it means that the Berkeley Fast File System layout policies aren't used on such disks. >If you have fewer nfsd processes, specially under SunOS 4, the number of >context switches will go down dramatically, especially if your server is >used mostly for NFS service. But this isn't really helpful. If an nfsd has to wait for a disk operation, a context switch will take place anyway. Better to have a active process to switch to than just sit idle. Thomas Narten