Skip to main content

Enable file access time updates

Contributors netapp-lenida netapp-ahibbard

Beginning with ONTAP 9.11.1, you can enable the -atime-update field on the FlexCache volume to permit file access time updates. You can also set an access time update period with the -atime-update-period attribute. The -atime-update-period attribute controls how often access time updates can take place and when they can propagate to the origin volume.

Overview

ONTAP provides a volume-level field called -atime-update, to manage access time updates on files and directories that are read using READ, READLINK, and READDIR. Atime is used for data lifecycle decisions for files and directories that are infrequently accessed. The infrequently accessed files are eventually migrated to archive storage and are often later moved to tape.

The atime-update field is disabled by default on existing and newly created FlexCache volumes. If you are using FlexCache volumes with ONTAP releases earlier than 9.11.1, you should leave the atime-update field disabled so caches aren’t unnecessarily evicted when a read operation is performed on the origin volume. With large FlexCache caches, however, administrators use special tools to manage data and help to ensure that hot data remains in the cache and cold data is purged. This is not possible when atime-update is disabled. However, beginning with ONTAP 9.11.1, you can enable -atime-update and -atime-update-period, and use the tools required to manage the cached data.

Before you begin

All FlexCache volumes must be running ONTAP 9.11.1 or later.

About this task

Setting -atime-update-period to 86400 seconds allows no more than one access time update per 24-hour period, regardless of the number of read-like operations performed on a file.

Setting the -atime-update-period to 0 sends messages to the origin for each read access. The origin then informs each FlexCache volume that the atime is outdated, which impacts performance.

Steps
  1. Enable file access time updates and set the update frequency:

    volume modify -volume vol_name -vserver SVM_name -atime-update true -atime-update-period seconds

    The following example enables -atime-update and sets -atime-update-period to 86400 seconds, or 24 hours:

    c1: volume modify -volume origin1 vs1_c1 -atime-update true -atime-update-period 86400
  2. Verify that -atime-update is enabled:

    volume show -volume vol_name -fields atime-update,atime-update-period

    c1::*> volume show -volume cache1_origin1 -fields atime-update,atime-update-period
    vserver volume         atime-update atime-update-period
    ------- -------------- ------------ -------------------
    vs2_c1  cache1_origin1 true         86400