Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jan 2024 18:15:41 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@FreeBSD.org>
To:        Tomek CEDRO <tomek@cedro.info>
Cc:        freebsd-current@freebsd.org,  Warner Losh <imp@bsdimp.com>,  Olivier Certner <olce@freebsd.org>
Subject:   Re: noatime on ufs2
Message-ID:  <86v87y4gn6.fsf@ltc.des.no>
In-Reply-To: <CAFYkXj=xdDW38ehGqu6J=pwfmR0XTr=rOpPChEWNuFbidfDVUg@mail.gmail.com> (Tomek CEDRO's message of "Wed, 10 Jan 2024 21:34:57 %2B0100")
References:  <ZZqmmM-6f606bLJx@int21h> <1749331.ETpRK2a2Mi@ravel> <CANCZdfo8VyhSJEUQpnvXuoPq0dzUHDN1sj-_y=1FTqXR3FrSuA@mail.gmail.com> <2136329.mxFCRLsXLg@ravel> <CAFYkXj=xdDW38ehGqu6J=pwfmR0XTr=rOpPChEWNuFbidfDVUg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Tomek CEDRO <tomek@cedro.info> writes:
> I am reading this interesting discussion and please verify my general
> understanding:
>
> 1. There is a request for change in core OS / FS mechanism of file
> access time (atime) because of problem with mailing application?

The atime mechanism is considered harmful by many because every file
access results in a write which (even if coalesced) not only impacts
performance but also increases wear on SSDs.  Many people turn it off.
Even the FreeBSD installer turns it off when installing to ZFS, except
on `/var/mail` which is a separate filesystem precisely so that it can
have atime enabled independently of the rest of the system.  There is a
proposal to turn it off by default.

> 2. Linux change of approach to atime that keeps its value only around
> last 24h so we should also change it in FreeBSD?
>
> 3. "realtime" is the alternative solution to keep atime intact?

The Linux approach is an alternative mechanism dubbed =E2=80=9Crelatime=E2=
=80=9D
(relative access time) which instead of updating the access time on
every access, does so only if the previous atime is either older than
the current mtime or more than 24 h ago.

> Why change well known standardized and widely used mechanism that is
> here for decades?

Because it's harmful and most people don't use it.

> If there is a problem with an application why change core OS/FS with
> all possible negative consequences and not fix the application?

There is not =E2=80=9Ca problem with an application=E2=80=9D.  No applicati=
on actually
requires atime to function properly because developers knows that atime
is a) not universally supported and b) often disabled even when
supported.  There is however a problem with disk performance and
lifetime being degraded.

> Wouldn't that break POSIX / backward compatiblity?

No.  Many people, and the FreeBSD installer, already turn it off.  The
relatime mechanism would restore atime functionality while causing much
less harm, in theory.  I'm not sure it would make much difference in
practice considering that we have nightly scripts which would trigger
atime updates even with relatime.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86v87y4gn6.fsf>