Revalidation

As users traverse the directory tree of an AFM cache fileset, files and directory metadata information from the home cluster is checked and updated as needed on the cache cluster. This process is called AFM revalidation.

Revalidation performance is dependent upon network latency and bandwidth available between the cache and home. Revalidations are done per node, and not per fileset. If a file or directory is revalidated from one node on the cache cluster, the same fileset goes through another revalidation operation when accessed from another node on the same cache cluster. You can modify the refresh intervals using the mmchfileset command as shown:
# mmchfileset fs1 sw1 -p afmFileOpenRefreshInterval=160
In the above example, the File Open Refresh Interval is set to 160 for the filesets in file system fs1.

Revalidation intervals can be adjusted to best support the workload and network latency. Setting a parameter using mmchconfig command sets the default for all filesets. Parameters set using mmchfileset only affect a particular fileset and override the global defaults. You can enable, modify, or disable any of the intervals based on the application needs, though it is recommended to use default values for most cases.

If file or directory refresh intervals are disabled for a fileset, the refresh intervals can be enabled using the mmchfileset command. Enabling requires the fileset to be unlinked, and then linked again.

For more information on the mmchfileset command, see mmchfileset command

It is recommended not to set the revalidation intervals to 0, as a revalidation request is continuously sent to home, thus resulting in performance degradation. You must set the revalidation interval to as large as possible, depending on how frequently home gets updated, and at what interval the cache needs the updated data.

For more information on revalidation intervals, see mmcrfileset command

The revalidation intervals are defined by the following configuration parameters. These are tunable at cluster and fileset level and can be changed using the mmchconfig and mmchfileset commands respectively:

  1. afmFileLookupRefreshInterval: The frequency of revalidation triggered by a lookup operation on a file such as ls or stat, from the cache
  2. afmDirLookupRefreshInterval: The frequency of revalidation triggered by a lookup operation on a directory such as ls or stat, in the cache.
  3. afmFileOpenRefreshInterval: The frequency of revalidations triggered by read or write operations on a file in the cache. Open requests on that file are served from the cache fileset until the afmFileOpenRefreshInterval expires, after which the open requests are sent to home.
  4. afmDirOpenRefreshInterval: The frequency of revalidations triggered by read or update operations on a directory from the cache. Open requests on files or sub-directories on that directory are served from the cache fileset until the afmDirOpenRefreshInterval expires, after which the open requests are sent to home.
  5. afmRevalOpWaitTimeout: The time for which AFM waits for completion of revalidation to get response from the home cluster. afmRevalOpWaitTimeout can be set only for a cluster and not for an individual fileset.

RO, LU and IW filesets revalidate regularly with home. SW mode populates metadata only once during first access and does not revalidate with home thereafter. To revalidate, AFM sends a message to the home cluster to find out whether the metadata of that file or directory has been modified since the last time it was revalidated. If so, the latest file metadata or data information, depending on the type of request, at home is reflected on the cache.

In some cases one operation such as a lookup can trigger another operation such as readdir asynchronously based on the application. Since such asynchronous operations can get internally triggered by AFM, the behavior of revalidation intervals might show slight variation than the exact set values. For example, a read on a cached file checks with home that the file has not changed if the read request comes after the afmFileLookupRefreshInterval has elapsed. So, this read includes a lookup operation for that file.