From owner-freebsd-arch@FreeBSD.ORG Tue Jun 3 00:15:24 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2AA9437B401 for ; Tue, 3 Jun 2003 00:15:24 -0700 (PDT) Received: from heron.mail.pas.earthlink.net (heron.mail.pas.earthlink.net [207.217.120.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id 77C0543F93 for ; Tue, 3 Jun 2003 00:15:23 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfj2f.dialup.mindspring.com ([165.247.204.79] helo=mindspring.com) by heron.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19N60m-0004e9-00; Tue, 03 Jun 2003 00:15:13 -0700 Message-ID: <3EDC4ABA.F923A9C8@mindspring.com> Date: Tue, 03 Jun 2003 00:14:02 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Matthew Dillon References: <20030602171942.GA87863@roark.gnf.org> <20030602202947.GE87863@roark.gnf.org> <200306022125.h52LPhhc002291@apollo.backplane.com> <200306022224.h52MOIwj002729@apollo.backplane.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4da9196cd59c2088f9440058127991a97387f7b89c61deb1d350badd9bab72f9c350badd9bab72f9c cc: Dag-Erling Smorgrav cc: arch@freebsd.org Subject: Re: Making a dynamically-linked root X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2003 07:15:24 -0000 Matthew Dillon wrote: > Ah, but you are still waiting on 'disk I/O'... it just happens to be > *network* disk I/O, so it doesn't matter if it's in the server's > cache or not. > > A lot of the delay is due to the client program stalling until the page > is faulted in over the network (and not doing any other work in the mean > time), then running for a few cycles and stalling again waiting for the > next random page to be faulted in. Yes. This is still incredibly frustrating; the same stall happens in N:M and N:1 threading models, whenever a page fault happens, since it stalls the kernel thread where the fault occurred, meaning it can't run other user space code while it's waiting for the fault to be satisfied. It would be very useful if other code could proceed while waiting for the fault; particularly when it's a decriptor with non-blocking I/O set on it (you'd expect the fault to proceed in the background, and make the data be there for when you retry the read). > Another big issue with the diskless code is the path cache. Whenever > a shell script runs a program using a relative path (like 'ls' instead of > '/bin/ls'), it tries to stat the program file for each path element in > the path. With a local disk the local system's name cache is coherent > and these operations are nearly instantanious. Over NFS, however, a > lot of retesting of the same paths are done over the network over and > over again, leading to a massive perceived slow down, and even retesting > a good path like /bin/sh often generates NFS traffic looking up "/bin/sh" > over and over again. The effects of this should be much less than you imply, as long as you are hitting the same terminal object name several times (that's why the name cache support negative caching). > For example, if in one window you start a tcpdump and monitor port > 2049 (typically nfsd), and in another window you run /bin/sh, you > will see at least 3 NFS lookups. If you exit the shell and run it again > you will see the same 3 NFS lookups again. And again, and again. Then the negative caching is broken, and needs to be fixed. Actually, there's probably some extra wire traffic happening, if you aren't using NFSv3, which caches VOP_ACCESS() calls when it can. Probably the name cache code should be done higher up in the VFS layer, so that it's mostly operating no local nfsnode data, or just the vnode; only it's not. -- Terry