manjaro / release-plan

Roadmap for our Manjaro install media releases
85 stars 7 forks source link

Stop using noatime fstab option by default (use relatime)? #169

Closed ThanosApostolou closed 5 years ago

ThanosApostolou commented 6 years ago

I recently started looking into fstab options and trying to understand what each of them does. I noticed that Manjaro (and Calamares upstream project https://github.com/manjaro/calamares/blob/development/src/modules/fstab/fstab.conf) adds the option noatime by default. Command man mount shows this:

       relatime
              Update  inode  access times relative to modify or change time.  Access time
              is only updated if the previous access time was earlier  than  the  current
              modify  or  change time.  (Similar to noatime, but it doesn't break mutt or
              other applications that need to know if a file has been read since the last
              time it was modified.)

              Since  Linux  2.6.30,  the kernel defaults to the behavior provided by this
              option (unless noatime  was  specified),  and  the  strictatime  option  is
              required to obtain traditional semantics.  In addition, since Linux 2.6.30,
              the file's last access time is always updated if it is more than 1 day old.

So:

  1. Relatime is almost similar to noatime, without the risk of any problems.
  2. No other distribution is using noatime (Ubuntu,Solus,Fedora,Opensuse)
  3. I've read articles which say that noatime improves almost nothing comparing to relatime as far as I/O performance is concerned.

So, maybe noatime should be removed and use relatime instead (just removing noatime and leave defaults in fstab would imply that relatime is used)? I've seen that you work closely with calamares upstream project, so maybe you have any insight of why noatime is used in the fist place and what are its advantages?

philmmanjaro commented 6 years ago

@ThanosApostolou: was this discussed with upstream CAL already?

ThanosApostolou commented 6 years ago

Sorry, I'm no longer looking into this. So feel free to close it.

jonathonf commented 6 years ago

relatime is the kernel default but has caused issues with btrfs in the past. Unless things have changed since e.g. [1] and [2], noatime is actually the "safest" option.

[1] https://lwn.net/Articles/499293/ [2] https://gms.tf/btrfs-requires-noatime.html

NuclearPhoenixx commented 6 years ago

What issues is noatime supposed to produce? I heard that E-Mail clients for example are rather picky about that, but I honestly have never encountered any problem with noatime.

cmurf commented 5 years ago

atime including relatime needs to die, ideally someone would push it upstream so noatime becomes the mainline default but...whatever

The two competing forks of Mutt, which is the only program known to depend on atime, have moved to manual updating of atime. https://github.com/neomutt/neomutt/commit/816095bfdb72caafd8845e8fb28cbc8c6afc114f https://gitlab.com/dops/mutt/commit/489a1c394c29e4b12b705b62da413f322406326f

So I'd say a.) get your distro kernel team to agree to building the kernel with noatime across the board, or fallback on b.) create fstab with noatime mount option.

ThanosApostolou commented 5 years ago

Ok after the replies it seems that noatime is a better default option, so no need for change.

tripLr commented 4 years ago

What about lazytime?