Xref: utzoo comp.protocols.nfs:1860 comp.arch:21159 Path: utzoo!utgpu!watserv1!watmath!att!bellcore!uunet!spool.mu.edu!sol.ctr.columbia.edu!lll-winken!sun-barr!newstop!exodus!appserv!slovax!lm From: lm@slovax.Berkeley.EDU (Larry McVoy) Newsgroups: comp.protocols.nfs,comp.arch Subject: Re: how many nfsd's should I run? Message-ID: <476@appserv.Eng.Sun.COM> Date: 1 Mar 91 21:37:30 GMT References: <28975@cs.yale.edu> Sender: news@appserv.Eng.Sun.COM Reply-To: lm@Eng.Sun.COM Followup-To: comp.protocols.nfs Organization: Sun Microsystems, Inc. Lines: 59 In article , pcg@cs.aber.ac.uk (Piercarlo Grandi) writes: |> richard> Given that nfsd runs in kernel mode inside nfssvc(), is this |> richard> statement about contexts correct? |> |> Yes and no, depending on who is your vendor, and which OS revision and |> machine model you have. For Sun there is some history that may be worth |> mentioning. Under SunOS 3 the nfsds were in effect kernel processes, so |> that they could access the buffer cache, held in the kernel address |> space, without copies. Since all nfsds run in the kernel page table |> there was no problem. |> |> Under SunOS 4 the buffer cache went away, so each nfsd was given its own |> address space (memory mapped IO), while still being technically a kernel |> process. This meant that MMU slot thrashing was virtually guaranteed, as |> the nfs daemons are activated more or less FIFO and the MMU has a LIFO |> replacement policy. As soon as the number of nfsds is greater or equal |> to the number of MMU slots problems happen. More misinformation spoken in an authoritative manner. Ah, well, I've done the same I guess. From sys/nfs/nfs_server.c: nfs_svc() .... /* Now, release client memory; we never return back to user */ relvm(u.u_procp); From the SCCS history (note the date): D 2.83 87/12/15 18:34:42 kepecs 88 87 remove virtual memory in async_daemon and nfs_svc as it's not needed. Remove pre-2.0 code to set rdir in nfs_svc. make sure these guys exit if error, since no vm to return to. In other words, this problem went away 3 years ago, never to return. |> I have seen the same server running the same load under SunOS 3 the day |> before with 10-20% system time and 100-200 context switches per second, |> and with SunOS 4 the day after with 80-90% system time and 800-900 |> context switches per second. An MMU slot swap on a Sun 3 will take about |> a millisecond, which fits. You may well have seen this. Jumping to the conclusing that it is caused by NFS is false, at least the reasons that you list are not true. |> richard> If so, why is the default number of nfsds for Sun 3s 8? |> |> Sun bogosity :-). Piercarlo ignorance :-) |> The latter argument is somewhat doubtful as there is contradictory |> evidence about the relative merits of FCFS and of elevator style sorting |> as used by the Unix kernel. Ahem. References, please? I've looked at this one in detail, this should be interesting. --- Larry McVoy, Sun Microsystems (415) 336-7627 ...!sun!lm or lm@sun.com