As usual, Theodore Ts'o the linux filesystem guru makes interesting
reading...

Whilst wading through his blog [1] I came across his suggestion of "chattr +A".

This got me intrigued and I did a bit of reading and my conclusions
are this..

 * Every time you access a file for whatever reason, POSIX writes an
   "atime" timestamp. 99.9999% of the time you don't care. (It's the
   "last modified" "mtime" timestamp you do care about!)

 * Mounting a filesystem with "noatime" is a big win over mounting
   with "relatime" or worse with "atime".

 * You can use
     chattr +A /some/path/
   to mark a subdirectory as NoAtime, and all files and subdirectories
   of /some/path inherit that attribute.

 * You should mark things like /home with
     chattr +T /home

       A directory with the 'T' attribute will be deemed  to  be  the  top  of
       directory  hierarchies  for  the purposes of the Orlov block allocator.
       This is a hint to the block allocator used by ext3 and  ext4  that  the
       subdirectories under this directory are not related, and thus should be
       spread apart for allocation purposes.   For example it is a  very  good
       idea  to  set  the  'T'  attribute  on  the  /home  directory,  so that
       /home/john and /home/mary are placed into separate block  groups.   For
       directories  where this attribute is not set, the Orlov block allocator
       will try to group subdirectories closer together where possible.

   This attribute is not inherited by subdirs.

I install our cross compiler tool chain in /opt and I have taken to
marking it as...

  chattr +AT /opt

I have also added a "chattr +A" to the script that checks out our
code.

Comments / suggestions welcome.


John Carter                             Phone : (64)(3) 358 6639
Tait Electronics                        Fax   : (64)(3) 359 4632
PO Box 1645 Christchurch                Email : [email protected]
New Zealand

[1]  http://thunk.org/tytso/blog/2009/03/01/ssds-journaling-and-noatimerelatime/

Reply via email to