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 the 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 by using the following command:
# mmchfileset fs1 sw1 -p afmFileOpenRefreshInterval=160
In this example, the afmFileOpenRefreshInterval parameter is set to 160 for the sw1 fileset in the fs1file system.

Revalidation intervals can be adjusted to support the workload and network latency. Setting a parameter by using the mmchconfig command sets the default for all filesets. Parameters set by using the mmchfileset command affect only 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 by using the mmchfileset command. Enabling requires the fileset to be unlinked, and then linked again.

For more information, 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 about revalidation intervals, see mmcrfileset command

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

  1. afmFileLookupRefreshInterval: The frequency of revalidation that is triggered by a lookup operation on a file such as ls or stat, from the cache.
  2. afmDirLookupRefreshInterval: The frequency of revalidation that is triggered by a lookup operation on a directory such as ls or stat, in the cache.
  3. afmFileOpenRefreshInterval: The frequency of revalidations that are 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 that are triggered by read or update operations on a directory from the cache. Open requests on files or subdirectories 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. The afmRevalOpWaitTimeout parameter can be set only for a cluster and not for an individual fileset.

RO, LU, and IW filesets revalidate regularly with home. The SW mode populates metadata only one time 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 is 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.

Revalidation in asynchronous mode

Synchronization with home before revalidation delays response to the applications querying data. To overcome this delay, you can perform cache data refresh operation in asynchronous mode. You must set the afmRefreshAsync parameter to 'yes'.

For information about the afmRefreshAsync parameter, see mmchconfig command and Configuration parameters for AFM