Idea for Installer optimization

It would be great if the installer could detect if the target disk is a SSD and add the appropriate mount options (discard,noatime) to optimize the performance and durability of such media.

/etc/fstab:

LABEL=ostree / ext4  errors=remount-ro,discard,noatime 0 0

CC: @wjt @andrunko @jprvita

Thanks for the suggestion. I found a ticket about noatime on our internal backlog so I’ve added this suggestion there.

@jprvita is the expert in these matters, but I’m not sure the /etc/fstab entry is actually used – I believe it’s only there because some userspace software gets confused if it’s not. Our installer is mostly a glorified wrapper around dd and doesn’t modify any files once the disk image is written – we prefer the OS to make decisions like this when it is booted (as it does when deciding whether to create a persistent systemd journal, for example).

Thanks for your suggestion to improve user’s experience on Endless OS!

The fstab is used by systemd generators when creating the mount units, so changes there will influence how the filesystems get mounted.

We have a task on the backlog for looking into enabling atime, but it is low-priority now because while it would reduce the amount of writes in theory, we already have quite a few mechanisms that reduce the amount of writes on EOS so we’ll probably not see much difference in practice. Filesystems are mounted with relatime (default from the Linux kernel), which reduces writing the access time to at most once per day. On top of that, most of the system is mounted read-only, which prevents updating atime even in those situations. We also configure all volatile mount points (/tmp, /run and others) to be backed by memory instead of storage devices and disable persistent logging on fragile storage (SSD and eMMC) by default.

The discard mount option may decrease performance and cause data corruption on some setups, so it is not something we plan to enable any time soon.

As @wjt said, the installer is not the correct place for such decisions, so if we eventually decide to mount filesystems with atime, we will either detect the type of device backing that filesystem or enable it for all storage types.

For discard we have a pending internal task to potentially follow Fedora’s lead on this topic:
https://fedoraproject.org/wiki/Changes/EnableFSTrimTimer

Thanks for the infos!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.