Skip to main content

We've Moved!

Product Documentation has moved to docs.hitachivantara.com
Hitachi Vantara Knowledge

Configuring read caching

Before you begin

A storage server can support read caching under the following conditions:

  • License keys to enable the read caching service and the Network File System (NFS) service must be installed.
  • Sufficient space must be available in a storage pool to create the read cache.

Additionally, to support remote read caching:

  • The storage server must be configured as a part of cluster.
  • The cluster name space (CNS) feature must be properly licensed and configured.
NoteAfter the read cache license key is entered, the server/cluster must be restarted before the read caching service starts.
Before you can configure the read caching service, you must have already fulfilled the prerequisites.

To enable and configure read caching, you must:

Procedure

  1. Enable the read caching service.

    To enable read caching, you must add the license key for read caching. After the key has been added, the service will be enabled upon restart.
  2. Create a read cache on an EVS.

    Because a read cache is a kind of file system, the same procedure that creates file systems also creates read caches. For information about creating a read cache or a file system, refer to the File Services Administration Guide.
  3. Enable file caching.

    The configuration can specify that files from some file systems should be cached, while prohibiting file caching for files from other file systems. To control the caching of files from a file system, select the file caching option when you add the file system link or export.
  4. Set file caching options.

    To control which files are eligible for caching, you must configure the file caching options. After a file system link has been added to the CNS tree, the file system link options can be changed to control whether files from this file system can be cached.

Configuring file caching options

  1. Navigate to Home Storage Management Read Cache Options to display the Read Cache Options page.

    GUID-4396DAE7-BA50-4C44-896C-A25F794DB394-low.png

    Field/Item Description
    Before caching, a file must remain unmodified for Specifies how long a file must be unchanged before it is eligible for caching.

    The default minimum stable time is 10 minutes.

    This does not indicate how long since the file has been accessed, only that the file may not have been changed within this period. You can specify the time in seconds, minutes, hours, or days.

    Do not cache files larger than Limits the maximum size of a file eligible for caching.

    The default maximum size is 512 MiB. You can specify the maximum size of a file in Bytes, KiB, MiB, GiB, TiB, PiB, or EiB.

    Caching large files might limit the number of files that the read cache can contain. If necessary, you can expand the read cache as described in the File Services Administration Guide.

    Files may be removed from cache if not accessed for Which indicates the amount of time that a file will remain in the read cache without being accessed before it is designated as inactive. Inactive files are eligible for removal from the cache, and are deleted on an "as space is needed" basis, with the oldest inactive files being deleted until there is enough space for a new file to be added to the read cache.

    The default duration is 15 minutes. You can specify the amount of time in seconds, minutes, hours, or days.

    Once removed, a file cannot be cached again for at least Specifies the minimum time that must elapse before a file is re-evaluated for read caching after:
    • Having been read cached, and then having been flushed from the read cache for any reason.
    • Being evaluated for read caching, and not being cached for some reason. Reasons for not caching a file may include file size, too recent modification, or insufficient space available in the read cache.

    The default retry time is 30 minutes. You can specify the amount of time that must elapse before a file can be cached again in seconds, minutes, hours, or days.

    apply Click to save the values specified for the options on this page.
    Reset Values to Default Click to reset the values on this page to their defaults.
    NoteThis link does not reset the active file set, which must be done through the CLI (Command Line Interface).
    Read Cache Statistics Click this shortcut to go to the Read Cache Statistics page.
  2. Set the options, and click apply to apply changes, or Reset Values to Default to restore defaults.

    NoteYou can prohibit read caching of files from a particular file system when the link to that file system is added to the CNS tree.

Reviewing read cache statistics

Read cache statistics provide information about a read cache, including:

  • Successfully Cached Files: The number of successfully read cached files.
  • Candidate Files Encountered: For remote read caching, the number of read cacheable files that have been read by a remote node. For local read caching, the number of read cacheable files that have been read by the local node.
  • Files Rejected: Has Named Streams: The number of read cacheable files that were not cached because they have associated named streams.
  • Files Rejected: Not Stable: The number of read-cacheable files were not cached because they were modified within the window of time specified by the "Before caching, a file must remain unmodified for" setting.
  • Files Rejected: Too Large: The number of read-cacheable files that were not cached because they exceed the size specified in the "Do not cache files larger than" setting.
  • Flushes Due To Active Set Limit: The number of times a file was flushed from the read cache because the read cache reached its maximum number of active files. By default, a maximum of 250,000 files may be in the read cache at any one time.
  • Flushes To Reclaim Space: The number of times a file was flushed from the read cache to free space in the read cache file system.
  • Flushes Aborted: The number of times an unaccessed file in the read cache was not flushed because it was still considered active according to the "Files may be removed from cache if not accessed for" setting.
  • File Lock Revoked: The number of times all files in the read cache were invalidated at the same time. This statistic also counts the times a file lock is revoked because the "real" file has been modified, which causes the cached copy to be removed from the read cache.

    Certain situations will cause the simultaneous invalidation of files in the read cache; some are the result of normal operations (like the unmounting of a file system), while others are due to error conditions.

    For local read caching, this situation occurs whenever the local file system is unmounted, or when the EVS hosting the file system is migrated to another cluster node.

    For remote read caching, this situation occurs whenever there is a loss of communication with the remote file system.

    For example, all files from a particular remote file system are invalidated simultaneously when:

    • The remote file system is unmounted
    • The cluster node on which the remote file system is located crashes
    • The cluster interconnect fails
  • Average Cached File Size: The average size of files stored in the read cache.
  • Average Cached File Lifetime: The average time a read cached file stays valid and can therefore service read requests. This statistic provides a very good indicator of the efficiency of the read cache. Average Cached File Lifetime may be short for several reasons:
    • Files are being flushed from the cache too often because too many files are being cached.

      If files are being flushed from the cache too often, consider reducing the number of CNS links marked as read cacheable, or increasing the maximum number of files allowed in the read cache. if you want to increase the maximum number of files allowed in the read cache, contact customer support for assistance.

    • Files are being flushed from the cache because the read cache is running out of space.

      If the read cache is running out of space, you can increase the size of the read cache file system, or you can decrease the number of files that are cached (either by decreasing the maximum number of files allowed in the read cache, or by reducing the number of CNS links marked as read cacheable).

    • Files that are identified as read cacheable are actually being modified too often.

      If files identified as read cacheable are being modified too often, increase the value of the "Before caching, a file must remain unmodified for" option.

Displaying read cache statistics

  1. Navigate to Home Status & Monitoring Read Cache Statistics to display the Read Cache Statistics page.

    GUID-D4289AC7-345B-45C1-A935-1F3EE7654145-low.png
  2. Select a read cache, and click details to display its statistics page.

    GUID-306C5477-283E-45AC-B4E6-431A96E314F7-low.png
    NoteThe table at the top of the Read Cache Statistics page lists the name of each file system that currently has files in the read cache. For each file system that currently has cached files, the table lists the number of files and their total (aggregated) size.
  3. After you have reviewed the available statistics, you can:

    • Click reset to restart the gathering of statistics (you will lose previously gathered statistics for the read cache).
    • Click the back button to return to the Read Cache Statistics page.

Deleting a read cache

For information on how to completely delete a read cache, refer to the File Services Administration Guide.

Read cache considerations

The following recommendations are intended to take full advantage of read caching:

  • Because remote read caching requires CNS, you should review the cluster name space considerations.
  • In a cluster configuration, define one EVS per cluster node, and assign a read cache to each EVS.
  • Balance loads by moving file systems, instead of migrating EVS. If you migrate an EVS containing a read cache, the files in the read cache become invalidated and, assuming they are still cacheable, they would have to be cached again after the next read request.

    If an EVS containing a read cache is migrated to another cluster node that already has a read cache, the files in the migrated read cache are invalidated, and only the read cache that was not migrated will be used. If the EVS is migrated back to its original cluster node, the read cache will be used again, assuming another read cache has not been created on that cluster node in the interim.

  • Do not relocate read caches. If you relocate a read cache, the files in the read cache become invalidated and, assuming they are still cacheable, the previously cached files would have to be cached again after the next read request.

 

  • Was this article helpful?