LWN: Comments on "Once upon atime" https://lwn.net/Articles/244829/ This is a special feed containing comments posted to the individual LWN article titled "Once upon atime". en-us Tue, 16 Sep 2025 10:05:29 +0000 Tue, 16 Sep 2025 10:05:29 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net noatime and mail programs https://lwn.net/Articles/500019/ https://lwn.net/Articles/500019/ mathstuf <div class="FormattedComment"> Experimenting a bit, the unread flag is marked by files being in the new/ directory in maildir. So maildir seems that the common implementation wouldn't care about atime at all.<br> </div> Sun, 03 Jun 2012 18:19:00 +0000 noatime and mail programs https://lwn.net/Articles/499965/ https://lwn.net/Articles/499965/ mirabilos <div class="FormattedComment"> I believe it’s exactly the other way round, split-into-files formats would have issues with this.<br> </div> Sat, 02 Jun 2012 22:52:37 +0000 Popularity contest https://lwn.net/Articles/245913/ https://lwn.net/Articles/245913/ endecotp The only program that I run that benefits from atime is Debian's "popcon", which records which packages are installed and which of those has been used recently. This would work well with the "update atime when &gt; 1 day" approach suggested by Linus.<br> <p> Fri, 17 Aug 2007 15:19:00 +0000 Once upon atime https://lwn.net/Articles/245188/ https://lwn.net/Articles/245188/ xkahn Interestingly, Microsoft seems to have looked at this issue in the past. From MSDN: <br> <p> <a href="http://msdn2.microsoft.com/en-us/library/ms724290.aspx">http://msdn2.microsoft.com/en-us/library/ms724290.aspx</a><br> Not all file systems can record creation and last access time and not<br> all file systems record them in the same manner. For example, on NT<br> FAT, create time has a resolution of 10 milliseconds, write time has a<br> resolution of 2 seconds, and access time has a resolution of 1 day<br> (really, the access date). On NTFS, access time has a resolution of 1<br> hour.<br> Sat, 11 Aug 2007 01:12:02 +0000 Does noatime imply nodiratime? https://lwn.net/Articles/245097/ https://lwn.net/Articles/245097/ jzbiciak Actually, Andrew Morton actually corrected Ingo on this point: <PRE> From: Andrew Morton To: Ingo Molnar Subject: Re: [PATCH 00/23] per device dirty throttling -v8 Date: Sun, 5 Aug 2007 00:29:34 -0700 On Sun, 5 Aug 2007 09:21:41 +0200 Ingo Molnar [email blocked] wrote: > even on a noatime,nodiratime filesystem noatime is a superset of nodiratime, btw. </PRE> I trust Andrew on this point. :-) Fri, 10 Aug 2007 14:26:25 +0000 Once upon atime https://lwn.net/Articles/245085/ https://lwn.net/Articles/245085/ liljencrantz One other possibility is to keep atime updates in memory and only write them out to disk if the page was to be flushed to disk anyway. That would mean storing atimes in memory in a separate structure outside of the regular page.<br> <p> The additional memory requirements should be relatively small, but the extra time needed to perform atime lookup might not be.<br> <p> It would also mean that after a crash atimes will be wrong.<br> Fri, 10 Aug 2007 12:39:23 +0000 Does noatime imply nodiratime? https://lwn.net/Articles/245052/ https://lwn.net/Articles/245052/ tarvin OK. I've been using noatime systematically for years. And then I read about a prominent kernel developer like Molnar using both noatime and nodiratime, making me worried: Have I been missing out on I/O-performance for years?<br> <p> - But your definite statement is comforting, thanks. I'll keep using just "noatime".<br> Fri, 10 Aug 2007 06:41:24 +0000 Does noatime imply nodiratime? https://lwn.net/Articles/245009/ https://lwn.net/Articles/245009/ corbet Yep, I'm sure. When in doubt, use the source. From <tt>touch_atime()</tt> in <tt>fs/inode.c</tt>: <p> <pre> void touch_atime(struct vfsmount *mnt, struct dentry *dentry) { /* ... */ if (inode-&gt;i_flags &amp; S_NOATIME) return; if (IS_NOATIME(inode)) return; if ((inode-&gt;i_sb-&gt;s_flags &amp; MS_NODIRATIME) &amp;&amp; S_ISDIR(inode->i_mode)) return; </pre> <p> So if NOATIME is set, the NODIRATIME flag is never even checked. Thu, 09 Aug 2007 20:39:13 +0000 Does noatime imply nodiratime? https://lwn.net/Articles/245002/ https://lwn.net/Articles/245002/ tarvin <p>Are you sure about noatime implying nodiratime?</p> <p>mount(8) states:<br /><code> &#160;&#160;noatime<br /> &#160;&#160;&#160;&#160;Do not update inode access times on this file system[...]<br /> <br /> &#160;&#160;nodiratime<br /> &#160;&#160;&#160;&#160;Do not update directory inode access times on this filesystem. </code></p> <p>while mount(2) puts it this way:<br /> <code> &#160;&#160;MS_NOATIME<br /> &#160;&#160;&#160;&#160;Do not update access times for (all types of) files on this file system.<br /> <br /> &#160;&#160;MS_NODIRATIME<br /> &#160;&#160;&#160;&#160;Do not update access times for directories on this file system. </code></p> <p>I wonder how to interpret mount(2)'s <em>(all types of) files</em> for noatime: Is a directory considered a file in this context?</p> Thu, 09 Aug 2007 20:17:21 +0000 nodiratime https://lwn.net/Articles/244942/ https://lwn.net/Articles/244942/ corbet noatime implies nodiratime - it's a superset. You can use nodiratime by itself to turn off the updates on directories only. As you note, it does not seem to be widely used. Thu, 09 Aug 2007 16:17:59 +0000 nodiratime https://lwn.net/Articles/244941/ https://lwn.net/Articles/244941/ elanthis Everyone knows about noatime, but it seems almost nobody uses nodiratime.<br> <p> The thread this discussion was in notes that the kernel devs like Linus explicitly not only noatime, but also nodiratime. I ASSume that noatime only affects files and that directories need nodiratime.<br> Thu, 09 Aug 2007 16:12:40 +0000 Once upon atime https://lwn.net/Articles/244915/ https://lwn.net/Articles/244915/ davecb The article notes: <I> It was suggested that, whenever a file's inode is to be written to disk anyway, the kernel might as well update atime as well. Alan Cox objected that this change might make the overall behavior less predictable, which might not be desirable. </I> <P>Solaris has a "defer atime" mount option that does the atime update only when other disk I/O is scheduled, which gives a fairly fine-grained update, and makes the behavior less prefictable, but <I>closer to what happens when atime is turned on</I>. This approach has been in place for a number of years (five or six, at least) and doesn't confuse programs or unsuspecting users. <P>--dave Thu, 09 Aug 2007 14:52:28 +0000 noatime and mail programs https://lwn.net/Articles/244904/ https://lwn.net/Articles/244904/ rfunk I'm pretty sure the noatime incompatibility with mail programs shows up only when using a single-file mailbox format (usually <a href="http://en.wikipedia.org/wiki/Mbox">mbox</a>). Yet another reason to use <a href="http://en.wikipedia.org/wiki/Maildir">maildir</a> instead. Thu, 09 Aug 2007 12:26:22 +0000 Defer updates https://lwn.net/Articles/244879/ https://lwn.net/Articles/244879/ addw Part of the reason that atime causes disk traffic is that if a file is read many times (each read satisfied from cache) an atime update will be generated for each time the file is read. So you get multiple disk writes to same the inodes over and over.<br> <p> Why not defer the inode updates, then you might get one set of disk writes either when the file system is unmounted or when it becomes idle or at scheduled intervals (eg every 1/2 hour). In practice many systems do not open large numbers of files, but repeatedly access a subset time and again. The usual exception to this is the backup program.<br> <p> From my point of view: if the system dies before it writes the atime out then not a lot is lost; maybe a spurious ''you have mail'' when I login again.<br> <p> Memory usage is the primary cost as the in-memory inode needs to be kept longer than it normally would be. This could be ameliorated by having a new strucut (device, inode#, atime) to store this info if we trash the in-memory inode.<br> Thu, 09 Aug 2007 09:09:39 +0000