Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

A few more notes, after a msg by Marshall.

noatime completely disables atime updates. This can be useful for files where atime is irrelevant, like everything in /bin, /sbin, /lib, /usr/bin, /usr/sbin, /usr/lib. No one cares when /bin/bash was read last. On a desktop / server, where disks rotate continuously, the atime update does not matter, but on a laptop or on flash media, like CF- (DIY firewall) or SD-cards (Raspi), each atime update means a disk update / a write cycle. So mounting those directories, or perhaps the entire root fs with noatime makes sense there. /home, /tmp and /var (or at least parts of /var) would live on a different filesystem with different mount options. If set up cleverly, the root fs could also be mounted read-only, preventing all updates including atime.

strictatime is the classic unix behaviour. Update atime everytime a file is read.

relatime is a clever hack. The atime is updated, but only if the previous atime was earlier than the current mtime or ctime. This helps programs like mutt to detect that a file has been read since the last modification. Newer Linux versions (>= 2.6.30) also update atime if the difference is larger than one day. Default since 2.6.30.

Then, there is also lazytime. This updates atime, ctime, and mtime only in memory. For userspace, this should look like strictatime, but time changes require no disk access, so disks can be stopped, flash write cycles are prevented. Times are written to disk / flash only if something else changes in the inode, on fsync/syncfs/sync (e.g. from umount), when the (undeleted) inode is removed from memory, or more than 24 hours have been passed since the last write for the inode. Of course, if you need the atime/ctime/mtime in software, you don't want an unexpected power cycle or a crash, because all unwritten updates would be lost.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

In reply to Re^5: Analyzing Files Within a Directory by afoken
in thread Analyzing Files Within a Directory by xc63

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-26 03:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found