And we gave a brief recap of caching at the beginning of February's Performance column. The second principle is called spacial locality and depends on using things at the same time that are located near each other. A cache works well if there are a lot more reads than writes, and the reads or writes of the same or nearby data occur close together in time. A special kind of cache can be used to accelerate writes. Write caches use the same principles of temporal and spacial locality in a slightly different way.
Temporal locality applies when writes to the same thing happen close together in time.
The write c ache waits a while after each write so that if another write to the same data comes along it can combine them together into a single coalesced write at a later stage. Writes that have spacial locality allow adjacent writes to be coalesced into a single la rger write that is much more efficient to process. Here's how NFS access caching works We'll start by looking at the simplest configuration, the open, fstat, read, write, and mmap operations on an NFS mounted filesystem. Like the UFS inode cache, the rnode keeps pointers to pages from the file that are in the local page cache. The handle has no meaning on the client, but on the server it is used to locate the mount point and inode number of the file so that NFS reads and writ es can go directly to the right file on the server.