Date: Tue, 25 Sep 2001 11:12:23 -0700 From: Terry Lambert <tlambert2@mindspring.com> To: Attila Nagy <bra@fsn.hu> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Disk based file system cache Message-ID: <3BB0C907.4F6AA199@mindspring.com> References: <20010918165302.V17360-100000@scribble.fsn.hu>
next in thread | previous in thread | raw e-mail | index | archive | help
Attila Nagy wrote: > > Hello, > > I'm just curious: is it possible to set up an NFS server and a client > where the client has very big (28 GB maximum for FreeBSD?) swap area on > multiple disks and caches the NFS exported data on it? > This could save a lot of bandwidth on the NFS server and also redues load > on that. There is a configuration called "dataless", in which you have local swap for an NFS booted system; this has been supported by SunOS since 1991/1992. It can also be used with FreeBSD, with some rc file tweaking (FreeBSD has seemingly resisted rc file changes to make this kind of division easier, as well as diskless). You are also allowed locacl data storage, with the idea that the OS and utilities, etc. all come off the remote server. The major value would be to mark the VFS type as "precache executables to swap"... the main failure mode for diskless and dataless SunOS machines has historically been the fact that, when the machine when to swap in a page in an exectable, the server was down, and therefore, all the engineers sit and twiddle their thumbs while their machine is locked up sitting in the page-in path. To combat this, you could have an attribute flag on the FS that indicated it was remote, and thus triggered local swap caching of the executable file image in its entirety, so that demand paging over the network was held to a minimum. This would permit people to continue to do work during a server outage, since the pages will be there. This is an idea I've suggested before. If, on the other hand, you are asking for caching of data file contents for writable files (unlike executables, which are read-only except for the server, since when you run a program, you do not tend to write to its image), then the answer is "no, not unless you implement NFSv4". The problem is that, prior to NFSv4, there was not a working distributed cache coherency protocol, so locally cached data can become stale; writebacks to the server by one client can therefore overwrite adjacent but unrelated data written back by another client, if such writes are not restricted to page boundaries (or worse). So that answer is that any system that does this, risks the corruption of its data in the common case (even the simplest case, a mail server whose mailbox files are accessed by a single client machine at a time, will get corruption). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3BB0C907.4F6AA199>