Metadata, lock, and data caches

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.

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.

A client caches data for small 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, the client reads the data from the shared storage device on which the file is stored. Data access is still fast because the client has direct access to all storage devices attached to the SAN.

Opportunistic locks

Opportunistic locks can be created and used by Windows-based clients. An opportunistic lock (or oplock) is a lock placed on a file in the global namespace. It allows a Windows-based client to cache data locally, reducing network traffic and improving performance. SAN File System supports level 1, 2, batch, and filter locks.

Direct I/O

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, does not cache data, and allows distributed applications on different computers 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. The I/O buffers, offsets and transfer size must be multiples of 512. You receive an Invalid argument error if this restriction is not met.

Windows-based clients enforce full, native direct I/O, or unbuffered I/O, semantics. You must specify the FILE_FLAG_NO_BUFFERING flag to open or create a file in direct I/O mode. When using this flag, your application must meet the following requirements:
  • The I/O buffers, offsets and transfer size must be integer multiples of the volume's sector size.
  • Buffer addresses for read and write operations must be sector aligned.
You receive a return code of 87 (ERROR_INVALID_PARAMETER) if the requirements are not met.
Restriction: You cannot use direct I/O on a file that is being used in cache mode by another process.

Parent topic: Clients

Terms of use | Feedback
(C) Copyright IBM Corporation 2003, 2004. All Rights Reserved.