:: [DNG] noatime by default
Forside
Slet denne besked
Besvar denne besked
Skribent: Adam Borowski
Dato:  
Til: dng
Emne: [DNG] noatime by default
Hi!
I'd like to recommend another improvement: let's make the installer default
to noatime for fstab it creates.

In the past, atime updates used to ruin performance. Thanks to work by Ted
Ts'o and others, that penalty has been greatly reduced (but not eliminated)
by two options:
* relatime (on by default): atime is not updated unless atime<=mtime or
atime<NOW-24h
* lazytime (off by default): atime and mtime updates are postponed by up to
30 minutes, unless there's memory pressure or the inode has to be written
for another reason

But alas, there are more considerations than just performance:
* atime is really nasty for any CoW filesystems (btrfs, zfs, lvm snapshots,
qcow2 snapshots, deduped thin storage, etc). For a /usr-y mix of files,
it costs around 5% of disk space per snapshot. relatime offers no help as
its threshold (24h) just happens to match the most popular snapshot and
cronjob frequency (once per day). Even worse, it can make _reading_
things result in ENOSPC!
* atime murders media with sharply limited write endurance, such as SD
cards. For this reason, every SoC pre-made image I've seen ships with
noatime.

And what do we get in return?
* the "vote" field in popcon. This somewhat benefits the distribution (lets
us spot low-use packages installed by default, such as xterm (53.60% inst,
6.67% vote) or tcpd (95.20% inst, 9.85% vote)) but gives no gain to
individual users.
* some rare forensic uses
* new mail notification on login

The last thing has recentlish (POSIX-2008) gained a solution: mail readers
can be patched to manually calls futimens(f, {UTIME_NOW, UTIME_OMIT});
stretch/ascii already sports mutt patched this way -- not sure what other
mail clients are likely to be used by local users thus worthy of patching.
Sample patch:
https://github.com/neomutt/neomutt/commit/816095bfdb72caafd8845e8fb28cbc8c6afc114f
Because of stretch's freeze, I did not manage to write+push upstream patches
for any client other than mutt, I guess it's time to resume.

Obviously, an admin who thinks he actually has an use for atime is free to
edit fstab.

So, what would you folks say about defaulting to noatime?


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀ 
⣾⠁⢰⠒⠀⣿⡁ Vat kind uf sufficiently advanced technology iz dis!?
⢿⡄⠘⠷⠚⠋⠀                                 -- Genghis Ht'rok'din
⠈⠳⣄⠀⠀⠀⠀