Tuning Last Access Time
Provides an overview of the Last Access Time feature and its tuning.
What is Last Access Time?
atime
) is file metadata that is updated whenever a
file is read. You can use atime
for file management and governance decisions such as: - Deleting files that have not been accessed for a while
- Tiering files (to warm or cold tier) that have not been accessed for a while
- Migrating files that have not been accessed frequently
- Purging files that have not been accessed for a time
Considerations When Enabling Last Access Time
atime
update can be enabled only on Standard/Erasure Coding/Object Tiering volumes. It cannot be enabled on mirrored volumes. If you convert the mirror volume to a Read/Write volume,atime
is disabled by default. You can enableatime
with the volume modify command.atime
is applicable only for files. Theatime
of directories is NEVER updated.- While the
read
operation is audited, theatime
operation is not audited as it is an internal operation. - The volume offload operation does not update
atime
but a file read from a backend/frontend volume updatesatime
. - The file recall operation also updates
atime
. - The file read operation on the EC/Tiered backend volume updates
atime
on the frontend volume. - At the time of mirroring, the
atime
update frequency (atimeUpdateInterval
) is propagated from the source volume to the mirror volume. However, any subsequent changes made to this frequency on the source volume, are not automatically propagated to the mirror volume.
- The time when you enabled
atime
updates (atimeTrackingStartTime
) is updated to the current time in the following cases:- Just started tracking
atime
, which means that theatime
update frequency was previously zero - If the value of
atime
update frequency is decreased - If the value of
atime
update frequency is increased andatime
has not been tracked for the duration of the new frequency value
- Just started tracking
Exceptions to Last Access Time Updates
atime
is
never updated when: - Only the meta data of the file is being read
- The file is read from the client cache
- The file is read from a snapshot
- The
atimeUpdateInterval
has not been exceeded:For example, assume that for a volume the
For another example, assume that for a volume theatimeUpdateInterval
is set to 1 day. A file is created at 11AM and the file is read at 10:55AM the next day. If the read finishes at 10:58AM,atime
will not be updated as theatimeUpdateInterval
did not cross a day.atimeUpdateInterval
is set to 1day. A file is created at 11AM and the file is read at 10:55AM the next day. If the read completes at 11:10AM, theatime
will still not be updated though the read completed after 24 hours, because read was triggered at 10:55AM.atime
will only be updated when the file is next read.
Upgrade Considerations
When a cluster is upgraded to HPE Ezmeral Data Fabric 6.2,
atime
is not enabled on the old volumes. You need to enable
atime
manually using the volume
modify command.
When a cluster along with a few clients are upgraded to HPE Ezmeral Data Fabric 6.2, while the remaining clients are not upgraded, the
older clients can not update atime
on files. Only the upgraded clients can
trigger an atime
update. However, the older clients can see the updated
atime
value (updated by the upgraded clients).
Enabling the Last Access Time Feature
maprcli cluster feature enable -name mfs.feature.update.atime
Enabling Last Access Time on Volumes
For performance reasons, the atime
feature is disabled on volumes by
default. You can enable atime
updates at the volume level when creating or modifying volumes.
To set the frequency of atime
updates, use the
atimeUpdateInterval
parameter when creating or modifying volumes. The value
is in days. The default value of 0
indicates that
atime
is never updated.
For example, a value of 2 indicates that the atime
is updated
Once every 2 days (48 hours) with the first read on the file.
atime
will not be updated on further reads on the file till the 48 hours
have passed.
Viewing the Last Access Time Value
To view the atime
value of a specific volume, use the volume info command.
Last Access Time Example
atime
to 2
days:maprcli volume create -name stdvol1 -path /stdvol1 -atimeUpdateInterval 2d
maprcli volume info -name stdvol1 -json | grep atime
"atimeUpdateInterval":"2",
"atimeTrackingStartTime":"2021-03-14 22:45:25 GMT-0700",
Here, the frequency is set to 2 days. The time when atime
was enabled on
the volume is also displayed.