z/OS Distributed File Service zFS Administration
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Metadata cache

z/OS Distributed File Service zFS Administration
SC23-6887-00

The metadata cache is used to contain all file system metadata; this metadata includes all directory contents, file status information (such as, atime, mtime, size, and permission bits), and file system structures. Additionally, it also caches data for files smaller than 7 K. Essentially, zFS stores a file by using one of the following three methods. For more information about how zFS shows free blocks, see Understanding zFS disk space allocation.

inline
If the file is 52 bytes or less, its data is stored in the structure that contains the status information for the file.
fragmented
Beginning with z/OS® V1R13, new zFS user data is not stored in fragments. Files that are 53 bytes or more are stored as blocked. The first time a fragmented file is updated, it is converted to blocked. On prior releases, if the file is less than 7 K, it is stored in blocks on disk that can be shared with other files; multiple files are then stored in the same physical disk block. Physical disk blocks are always 8 K in size.
blocked
Beginning with z/OS V1R13, new zFS user data is not stored in 1 K fragments. Files that are 53 bytes or more are stored as blocked. The first time a fragmented file is updated, it is converted to blocked. On prior releases, files larger than 7 K are stored in multiple blocks, blocked files are only stored in the user file cache, and all I/O is performed directly to or from user file cache buffers.

Because inline files are stored in the status block, files that are stored on disk by using the inline method are stored in the metadata and hence are cached in the metadata cache (and also in the user file cache). Because the metadata cache is the only component that knows about multiple files sharing disk blocks, small fragmented files are stored in the metadata cache (and also in the user file cache) and I/O is performed directly to or from the metadata cache for these small user files.

Generally, metadata is referred to and updated frequently for most zFS file operations; hence, achieving a good hit ratio is often essential to good performance for most workloads. A good hit ratio might be considered to be 90% or more, depending on your workload.

The metadata cache is stored in the primary address space and its default size is 64 M. Because the metadata cache contains only metadata and small files, it typically does not need to be nearly as large as the user file cache. The operator modify zfs,query,all command output shows statistics for the metadata cache including the cache hit ratio.

An optional metadata backing cache can be specified that extends the size of the metadata cache. It resides in a data space and increases the amount of metadata that can be kept in memory. It might improve the performance of workloads that require large amounts of metadata.

Note: Beginning with z/OS V1R13, the optional metadata backing cache cannot be created dynamically using the zfsadm config -metaback_cache_size command. You must specify the metaback_cache_size configuration option in your IOEFSPRM file to have a metadata backing cache. You can still use the zfsadm config command to dynamically change the size of the metadata backing cache when the metadata backing cache exists.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014