From owner-freebsd-questions Thu Apr 11 19:37:14 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id TAA10276 for questions-outgoing; Thu, 11 Apr 1996 19:37:14 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id TAA10265 for ; Thu, 11 Apr 1996 19:37:08 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id TAA00560; Thu, 11 Apr 1996 19:35:18 -0700 From: Terry Lambert Message-Id: <199604120235.TAA00560@phaeton.artisoft.com> Subject: Re: nfs To: htchan@millennianet.com (Henry Chan) Date: Thu, 11 Apr 1996 19:35:18 -0700 (MST) Cc: freebsd-questions@FreeBSD.ORG In-Reply-To: from "Henry Chan" at Apr 11, 96 12:04:06 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > I've got a few FreeBSD boxes as servers that are sharing an file mounted > via nfs. The file is modified approximately every few seconds. One the > servers accessing the file via nfs, if the file is accessed 10-20 times > within a span of 1-2 seconds, is the data cached or does FreeBSD try to > read the file 10-20 times? I'm using 2.2-960323-SNAP on all the boxes. NFSv3 does client caching via leases. It still stats the file, but may avoid reads, until the lease period expires. Prior to that, client caching is not done. Typically, an implementation that does client caching will cause the cache to be on reads only (not writes), and it will be flushed as a result of unlock operations on file regions when locking is in effect. FreeBSD currently does not support NFS file locking, and does not make cache assumptions locally using local locking semantics. After the 4.4BSD-Lite2 integration, one change from the UCB file lock design to convert it from call through to a veto system will allow client caching and cache flushing, even if the locks are not propagated. For now, client caching isn't there. Are you trying to user this for shared memory? There are packages for distributed shared memory which operate on FreeBSD. Such an application requires a stateful cache coherency protocol (NFS is not stateful) and so inherently requires you to use a different transport (not NFS). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.