CacheFS
Encyclopedia
CacheFS is the name used for several similar software technologies designed to speed up Network file system
Network File System
Network File System is a network file system protocol originally developed by Sun Microsystems in 1984, allowing a user on a client computer to access files over a network in a manner similar to how local storage is accessed. NFS, like many other protocols, builds on the Open Network Computing...

 file access for networked computers. These technologies all operate in similar ways: they store (cache
Cache
In computer engineering, a cache is a component that transparently stores data so that future requests for that data can be served faster. The data that is stored within a cache might be values that have been computed earlier or duplicates of original values that are stored elsewhere...

) copies of files on a local Hard disk
Hard disk
A hard disk drive is a non-volatile, random access digital magnetic data storage device. It features rotating rigid platters on a motor-driven spindle within a protective enclosure. Data is magnetically read from and written to the platter by read/write heads that float on a film of air above the...

 so that if a file is accessed again, it can be done locally at much higher speeds than networks typically allow.

CacheFS software is used on several Unix-like
Unix-like
A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....

 operating systems. The original version was developed by Sun Microsystems
Sun Microsystems
Sun Microsystems, Inc. was a company that sold :computers, computer components, :computer software, and :information technology services. Sun was founded on February 24, 1982...

 in 1993. Another version was written for Linux and released in 2003.

Network filesystems are dependent on a network
Computer network
A computer network, often simply referred to as a network, is a collection of hardware components and computers interconnected by communication channels that allow sharing of resources and information....

 link and a remote server
Server (computing)
In the context of client-server architecture, a server is a computer program running to serve the requests of other programs, the "clients". Thus, the "server" performs some computational task on behalf of "clients"...

; obtaining a file from such a filesystem
File system
A file system is a means to organize data expected to be retained after a program terminates by providing procedures to store, retrieve and update data, as well as manage the available space on the device which contain it. A file system organizes data in an efficient manner and is tuned to the...

 can be significantly slower than getting the file locally. For this reason, it can be desirable to cache data from these filesystems on a local disk, thus potentially speeding up future accesses to that data by avoiding the need to go to the network and fetch it again. The software has to check that the remote file has not changed since it was cached, but this is much faster than reading the whole file again.

Sun version

The first CacheFS implementation was developed by Sun Microsystems
Sun Microsystems
Sun Microsystems, Inc. was a company that sold :computers, computer components, :computer software, and :information technology services. Sun was founded on February 24, 1982...

 and released in the Solaris 2.3 operating system release in 1993, as part of an expanded feature set for the NFS or Network File System suite known as Open Network Computing Plus (ONC+)
Open Network Computing Remote Procedure Call
Open Network Computing Remote Procedure Call is a widely deployed remote procedure call system. ONC was originally developed by Sun Microsystems as part of their Network File System project, and is sometimes referred to as Sun ONC or Sun RPC...

. It was subsequently used in other UNIX operating systems such as Irix
IRIX
IRIX is a computer operating system developed by Silicon Graphics, Inc. to run natively on their 32- and 64-bit MIPS architecture workstations and servers. It was based on UNIX System V with BSD extensions. IRIX was the first operating system to include the XFS file system.The last major version...

 (starting with the 5.3 release in 1994).

Linux version

Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 operating systems now commonly use a new version of CacheFS developed by David Howells. Howells appears to have rewritten CacheFS from scratch, not using Sun's original code.

The Linux CacheFS currently is designed to operate on Andrew File System
Andrew file system
The Andrew File System is a distributed networked file system which uses a set of trusted servers to present a homogeneous, location-transparent file name space to all the client workstations. It was developed by Carnegie Mellon University as part of the Andrew Project. It is named after Andrew...

 and Network File System filesystems.

Terminology

Because of its similar naming to FS-Cache, CacheFS' terminology
Terminology
Terminology is the study of terms and their use. Terms are words and compound words that in specific contexts are given specific meanings, meanings that may deviate from the meaning the same words have in other contexts and in everyday language. The discipline Terminology studies among other...

 is confusing to outsiders. CacheFS is a backend for FS-Cache and handles the actual data storage and retrieval. FS-Cache passes the requests from netfs to CacheFS.

CacheFS

CacheFS is a Filesystem for the FS-Cache facility. A block device can be used as cache by simply mounting
Mount (computing)
Mounting takes place before a computer can use any kind of storage device . The user or their operating system must make it accessible through the computer's file system. A user can access only files on mounted media.- Mount point :A mount point is a physical location in the partition used as a...

 it. Needs no special activation and is deactivated by unmounting it.

Cachefiles(daemon)

Daemon
Daemon (computer software)
In Unix and other multitasking computer operating systems, a daemon is a computer program that runs as a background process, rather than being under the direct control of an interactive user...

 using an existing filesystem (Ext3
Ext3
The ext3 or third extended filesystem is a journaled file system that is commonly used by the Linux kernel. It is the default file system for many popular Linux distributions, including Debian...

 with user_xattr) as cache. Cache is bound with "cachefilesd -s".

Project status

Project status seems to be stalled. Some people are attempting to revive the code and bring it up to date.

Features

The facility can be conceptualised by the following diagram
Diagram
A diagram is a two-dimensional geometric symbolic representation of information according to some visualization technique. Sometimes, the technique uses a three-dimensional visualization which is then projected onto the two-dimensional surface...

:



The facility (known as FS-Cache) is designed to be as transparent as possible to a user of the system. Applications should just be able to use NFS files as normal, without any knowledge of there being a cache.

See also


Outdated articles?
  • LWN.NET A general caching filesystem
  • LWN.NET Initial mail introducing cacheFS for Linux
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK