
{"id":6308,"date":"2011-11-29T16:50:49","date_gmt":"2011-11-29T16:50:49","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=6308"},"modified":"2011-11-29T16:50:49","modified_gmt":"2011-11-29T16:50:49","slug":"the-atime-and-noatime-attribute","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2011\/11\/29\/the-atime-and-noatime-attribute\/","title":{"rendered":"The atime and noatime attribute"},"content":{"rendered":"<pre>\nThe atime and noatime attribute\n\n\nLinux records  information about when  files were created  and last\nmodified as  well as  when it  was last accessed.  There is  a cost\nassociated  with recording  the  last access  time.  The ext2  file\nsystem of Linux has an attribute that allows the super-user to mark\nindividual  files   such  that  their  last  access   time  is  not\nrecorded. This may lead  to significant performance improvements on\noften accessed  frequently changing files  such as the  contents of\nthe \/var\/spool\/news directory.\n\n\nLinux has a  special mount option for file  systems called noatime\nthat can be  added to each line that addresses  one file system in\nthe \/etc\/fstab file.  If a file system has  been mounted with this\noption, reading accesses to the  file system will no longer result\nin an  update to  the atime information  associated with  the file\nlike  we  have explained  above.  The  importance  of the  noatime\nsetting  is that  it eliminates  the need  by the  system  to make\nwrites  to  the file  system  for  files  which are  simply  being\nread. Since writes  can be somewhat expensive, this  can result in\nmeasurable performance gains. Note that the write time information\nto a file will continue to  be updated anytime the file is written\nto. In  our example below, we  will set the noatime  option to our\n\/chroot file system.\n\nsource : http:\/\/tldp.org\/LDP\/solrhe\/Securing-Optimizing-Linux-RH-Edition-v1.3\/chap6sec73.html\n<\/pre>\n<pre>\n$lsattr yt-chanrip\n------------------- yt-chanrip\n$ls -l yt-chanrip\n-rw-r--r-- 1 jeffrin jeffrin 230 Sep  2 18:19 yt-chanrip\n$chattr +A yt-chanrip\n$lsattr yt-chanrip\n-------A----------- yt-chanrip\n$ls -l yt-chanrip\n-rw-r--r-- 1 jeffrin jeffrin 230 Sep  2 18:19 yt-chanrip\n$echo \"   \" &gt;&gt; yt-chanrip\n$lsattr yt-chanrip\n-------A----------- yt-chanrip\n$ls -l yt-chanrip\n-rw-r--r-- 1 jeffrin jeffrin 234 Nov 29 22:30 yt-chanrip\n$time\n\nreal\t0m0.000s\nuser\t0m0.000s\nsys\t0m0.000s\n$chattr -A yt-chanrip\n$echo \"   \" &gt;&gt; yt-chanrip\n$ls -l yt-chanrip\n-rw-r--r-- 1 jeffrin jeffrin 238 Nov 29 22:31 yt-chanrip\n$\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The atime and noatime attribute Linux records information about when files were created and last modified as well as when it was last accessed. There is a cost associated with recording the last access time. The ext2 file system of Linux has an attribute that allows the super-user to mark individual files such that their &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2011\/11\/29\/the-atime-and-noatime-attribute\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;The atime and noatime attribute&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/6308"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=6308"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/6308\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=6308"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=6308"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=6308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}