Re: NtfsDisableLastAccessUpdate

From: Bernd Schulze (b.schulze_at_berlin.de)
Date: 03/16/04


Date: Tue, 16 Mar 2004 11:10:03 +0100

Habe über 47 Ecken doch noch was gefunden ....

Using disablelastaccess {1|0}

The disablelastaccess parameter is designed to reduce the logging impact of
updating the last access timestamp on folders and directories. Disabling the
Last Access Time improves the speed of folder and file access.

Each file and folder on an NTFS volume contains an attribute called Last
Access Time. This attribute defines when the file or folder was last
accessed, such as when a user lists folders, adds files to a folder, reads a
file, or makes changes to a file. The most up-to-date Last Access Time is
stored in memory and is eventually written to the disk in two different
locations. One is within the file's attribute, which is part of its MFT
record. The second is in the index of the directory that contains the file.

The Last Access Time on disk is not always current. This lag occurs because
NTFS delays writing the Last Access Time to disk when users or programs
perform read-only operations on a file or folder, such as listing the
folder's contents or reading (but not changing) a file in the folder. If the
Last Access Time is kept current on disk for read operations, all read
operations become write operations, which impacts NTFS performance.

Note that file-based queries of Last Access Time are accurate even if all
on-disk values are not current. NTFS returns the correct value on queries
because the accurate value is stored in memory.

NTFS typically updates a file's attribute on disk if the current Last Access
Time in memory differs by more than an hour from the Last Access Time stored
on disk, or when all in-memory references to that file are gone, whichever
is more recent. For example, if a file's current Last Access Time is 1:00
P.M., and you read the file at 1:30 P.M., NTFS does not update the Last
Access Time. If you read the file again at 2:00 P.M., NTFS updates the Last
Access Time in the file's attribute to reflect 2:00 P.M. because the file's
attribute shows 1:00 P.M. and the in-memory Last Access Time shows 2:00 P.M.

NTFS updates the index of the directory that contains the file when NTFS
updates the file's Last Access Time and detects that the Last Access Time
for the file differs by more than an hour from the Last Access Time stored
in the directory's index. This update typically occurs after a program
closes the handle used to access a file within the directory. If the user
holds the handle open for an extended time, a lag occurs before the change
appears in the index entry of the directory.

Note that one hour is the maximum time that NTFS defers updating the Last
Access Time on disk. If NTFS updates other file attributes such as Last
Modify Time, and a Last Access Time update is pending, NTFS updates the Last
Access Time along with the other updates without additional performance
impact.

Note that using the disablelastaccess parameter can affect programs such as
backup and Remote Storage that rely on this feature.

This parameter updates the
HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisableLastAccessUpdate
registry key.

"Bernd Schulze" <b.schulze@berlin.de> schrieb im Newsbeitrag
news:%23r9t7LzCEHA.464@TK2MSFTNGP11.phx.gbl...
> Hallo . Mir ist beim recherchieren über diesen Reg-Schlüssel nachfolgendes
> aufgefallen.
>
> Bei NTFS 5 oder besser W2K/W2K3/WXP wird der Wert "letzter Zugriff" (last
> Access) dann wieder aktualisiert wenn nach dem aktualisieren des
> Zeitstempels länger als 1 Stunde vergangen ist.
>
> Dabei spielt es keine Rolle ob der scheinbare Zugriff auf die Dateien über
> ein Explorerfenster, über den Zugriff eines anderen Programms z.B. einen
> Webserver, oder über ein Netzlaufwerk (SMB) erfolgt.
>
> Jedoch aktualisiert sich der Zeitstempel maximal im 1 Stunden Intervall.
>
> Meine Frage nun:
>
> Gibt es diesbezüglich Informationen wie NTFS 5 oder besser Windows XP (
W2K
> / W2K3) dieses händelt.
>
> Mir ist dieses Verhalten bei zwei unterschiedlichen Win-XP-Clients und
W2K3
> Servern aufgefallen. Diese sind unabhängig voneinander je in einer anderen
> W2K3 AD Domäne.
>
> Ist da vielleicht irgendwo ein Cache aktiviert.. und wenn ja wird die
ganze
> Datei gecached oder nur der Zeitstempel ...kann man diesen eventuellen
Cache
> Zeitlich irgendwo beeinflussen?
>
> Ist da vielleicht eine GruppenPolicie verantwortlich . usw .
>
> Ich habe diesbezüglich im Internet leider keine Informationen gefunden ..
> und würde mich wirklich freuen, wenn irgendwer Informationen diesbezüglich
> hat oder diese Fragen vielleicht sogar selbst beantworten kann.
>
> Danke schon mal an alle ..Bernd Schulze
>
>
>
> PS: Es ist mir bekannt das man dieses auch komplett ausschalten kann.
>
> ----SNIP---
>
> NTFS File System Setting
>
> Under HKLM\System\CurrentControlSet\Control\FileSystem\ is
> NtfsDisableLastAccessUpdate (REG_DWORD) 1.
>
> This system-global switch reduces disk I/O load and latencies by disabling
> the updating of the date and time stamp for the last file or directory
> access. This key needs to be added; it does not exist by default.
Disabling
> the updates is effective when used with large data sets (or a large number
> of hosts) containing thousands of directories. It is recommended that you
> use IIS logging instead if you maintain this information for Web
> administration only.
>
> ----SNIP----
>
>



Relevant Pages

  • Re: NTFS not maintaining "last access time" correctly
    ... with their system if it is not behaving the way it is supposed to. ... The reason I found this issue with NTFS ... NTFS maintains "last access time" ... NTFS typically updates a file's attribute on disk if the current Last ...
    (microsoft.public.windowsxp.general)
  • NTFS not maintaining "last access time" correctly
    ... NTFS not maintaining "last access time" correctly ... NTFS typically updates a file's attribute on disk if the current Last Access ... up-to-date LAT at least. ...
    (microsoft.public.windowsxp.general)
  • Re: NTFS not maintaining "last access time" correctly
    ... As useless as LAT is, I'm real curious why it matters? ... NTFS maintains "last access time" ... Each file and folder on an NTFS volume contains an attribute called ... NTFS typically updates a file's attribute on disk if the current Last ...
    (microsoft.public.windowsxp.general)
  • Re: SCSI drive
    ... >> FAT or NTFS, but allowed it to be FAT32. ... the access time looks slower over the netjbex from this ... chamine - I may rethink and put the live news and mail files back on the IDE ...
    (uk.rec.sheds)

Loading