4 ms·
atime doesn't quite work because it makes a read operation into a write. Mostly that's ok, because you're just overwriting the same timestamp field over and ove
by mprovost 6y ago
atime doesn't quite work because it makes a read operation into a write. Mostly that's ok, because you're just overwriting the same timestamp field over and over again. But it gets strange with filesystem snapshots or anything else that might be copy on write. Now your reads end up using disk space as it has to make a copy of each directory to update the atime - if it is in fact doing that. Traditionally, reading a snapshot just didn't update the atime (but then does the snapshot keep the atime as it was at the time of the snapshot, and reading files in the live filesystem means making a copy?). This means, as was pointed out, snapshots aren't POSIX compliant.
- formerly_proven 6y agoatime isn't updated on every access. That "relatime" mount option that's almost universally used? It updates atime when the file is written (so mtime and ctime are updated anyway, no extra cost to bumping atime), or after a day if no writes happen but reads.
- jsrcout 6y ago> atime doesn't quite work because it makes a read operation into a write. I remember discovering this little fact a lot of years ago. It really shook my confidence in the existence of a rational world. Then I learned about noatime and never looked back.