Date: Fri, 26 Apr 2002 16:42:48 -0700 (PDT) From: "Andrew P. Lentvorski" <bsder@allcaps.org> To: Brian Candler <B.Candler@pobox.com> Cc: <freebsd-fs@freebsd.org>, <freebsd-net@freebsd.org> Subject: Re: NFS clearing attribute cache in nfs_open Message-ID: <20020426162442.N8693-100000@mail.allcaps.org> In-Reply-To: <20020426181535.B2748@linnet.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 26 Apr 2002, Brian Candler wrote: > perl -e 'for ($i=0;$i<1000;$i++) { open F,"</bin/rm"; $x=<F>; close F;}' I will assume that you wrote this *only* to prove the point. However, if you are using NFS, you need to check the status of both open *and* close. Otherwise you are likely to start breeding *very* insidious bugs. > ... Could it safely be made less restrictive, e.g. don't > clear the cache when opening a file for read? In a word, no. Why couldn't the sysadmin be running "make installworld" on the NFS server while you're running that program? By definition, for better or worse, NFS is "stateless". The only way in which NFS can know that your file hasn't changed (been deleted, renamed, etc) is to make that round trip to the server. Sorry. > I think there are some > potentially large performance gains for diskless server clusters, where the > same file is being repeatedly exec()'d. Yes, as long as you are willing to risk invalid data. If you are really into clusters with low-latency, you might want to look into something like NFS V4 (Is anybody working on that on FreeBSD, anymore?), AFS, CODA, or something more specialized. Those networked filesystems have a bidrectional characteristic and cached state protocols so that they can minimize communication. -a To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020426162442.N8693-100000>