Caching allows a client to achieve low-latency access to both metadata and data. SAN File System supports caching of metadata, locks, and data.
A client caches metadata to perform multiple metadata reads locally. The metadata includes the mapping of logical file system data to physical addresses on storage devices that are attached to the SAN, name space, and file attributes.
A client caches locks to allow the client to grant multiple opens to a file locally without having to contact a metadata server for each operation that requires a lock. It also allows the client to perform reads and write on file data blocks when the appropriate locks and the logical physical address mappings are already cached .
A client caches data for files to eliminate I/O operations to storage devices attached to the SAN. A client performs all data caching in memory. If there is not enough space in the client's cache for all of the data in a file, SAN File System overwrites old data in the cache to make room for the new data.
An opportunistic lock (or oplock) is a lock that is placed on a file in the global namespace. An oplock can be created and used by CIFS clients that use a SAN File System client, which acts as a CIFS server. The oplock is obtained by the CIFS client from the CIFS server and is bound to a SAN File System file lock. The CIFS lock and client caching of file data eliminates the need for the CIFS client to go to the CIFS server across the network all the time. SAN File System enables the use of oplocks with appropriate synchronization of the CIFS client cache and SAN File System client cache.
A SAN File System client acting in the role of a CIFS server supports level 1, 2, batch, and filter locks.
Some applications, such as database management systems, use their own cache management systems. For such applications, SAN File System provides a direct I/O mode, which allows these applications to bypass the data cache. In this mode, SAN File System performs direct writes to disk and does not cache data. This also allows distributed applications on different AIX® or Linux™ client machines to write data to the same file at the same time. Using the direct I/O mode makes files act like raw devices. This gives database systems direct control over their I/O operations, while still providing the advantages of SAN File System, such as the FlashCopy® feature and file-level backup and restore processing. Applications need to be aware of, and configured for, direct I/O.
UNIX-based clients use existing operating-system interfaces to use direct I/O. That is, you must set the O_DIRECT flag to open a file in direct I/O mode.
However, a process can use direct I/O on a file that is being used in cache mode by a process on another client machine. Similarly, a process can use a file in cached mode that is being used in direct I/O mode by a process on another client machine.
Parent topic: Clients