Date: Mon, 08 Jan 2024 20:39:06 -0600 From: robert@rrbrussell.com To: freebsd-current@freebsd.org Subject: Re: noatime on ufs2 Message-ID: <2eabfb91-afc3-47f7-98b9-1a1791ae6e7d@app.fastmail.com> In-Reply-To: <CAGMYy3vsSD7HHtGxYXJn%2Busr8GCOd-0Xe1crs-Nx=qw-bYJ6HA@mail.gmail.com> References: <ZZqmmM-6f606bLJx@int21h> <CAGMYy3vsSD7HHtGxYXJn%2Busr8GCOd-0Xe1crs-Nx=qw-bYJ6HA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--54b92331b9ec41dc9f02046dfeeac9b9 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, Jan 8, 2024, at 14:41, Xin LI wrote: >=20 >=20 > On Sun, Jan 7, 2024 at 5:27=E2=80=AFAM void <void@f-m.fm> wrote: >> Hi, >>=20 >> Does /var/mail still need atime? >>=20 >> I've installed a ufs2-based -current main-n267425-aa1223ac3afc on >> rpi4/8BG which installs into one / . If it's mounted with noatime, >> will it have consequences for /var/mail ? >=20 > It doesn't matter if you don't normally receive emails locally (nowada= ys, it's rare). >=20 > If you do receive emails locally, it depends on what application(s) th= at you are using. Most applications nowadays check both mtime and atime= plus sizes of the mailbox file and do not rely on atime (because they s= aved the previous mtime). Without atime updates, some application may c= laim that you have new mail when the mailbox is not empty when they firs= t start. >=20 > That's said, if I were you and I'm using some flash based storage (wit= h rpi it's highly likely) regardless if I'm using mail locally; most of = the time the data is not really useful for anything, and it does increas= e the wear of your storage. >=20 > This reminds me that -- we probably should have implemented the Linux = "relative atime" (update atime iff (atime <=3D mtime || atime <=3D ctime= ) || atime is older than a day) and "no diratime" (don't update director= y atime) for UFS and make the "relatime" option the default; I had an in= complete implementation about a decade ago somewhere but with the recent= VFS changes it's probably easier to start over. IMHO, updating atime e= very time when a file is accessed is not really providing useful data (l= ike who accessed the file, etc.) for audit purposes and does come with p= erformance (more write I/O) and reliability (wear of SSD and other flash= devices) cost, therefore not generally useful in modern days. The Linu= x relative atime is a pretty clever idea that has covered the most usefu= l use case for atime (Did I accessed the file after it was last modified= ) and also provided a coarse-grained update (capped to daily, which is a= reasonable compromise) to the atime. >=20 > Cheers, On the Linux side of things I think almost of the mail handling programs= have migrated to either using MailDir or MH style mailboxes, which don'= t need atime, for anything local. The MDA/MTA configuration examples hav= e all used MailDir for around a decade now. Why not make noatime the default across the whole system? Outside of mbo= x why is recording access time actually useful? --54b92331b9ec41dc9f02046dfeeac9b9 Content-Type: text/html;charset=utf-8 Content-Transfer-Encoding: quoted-printable <!DOCTYPE html><html><head><title></title><style type=3D"text/css">p.Mso= Normal,p.MsoNoSpacing{margin:0}</style></head><body><div>On Mon, Jan 8, = 2024, at 14:41, Xin LI wrote:<br></div><blockquote type=3D"cite" id=3D"q= t" style=3D""><div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"qt-gmail_d= efault" style=3D"font-family:monospace, monospace;"><br></div></div><div= ><br></div><div class=3D"qt-gmail_quote"><div dir=3D"ltr" class=3D"qt-gm= ail_attr">On Sun, Jan 7, 2024 at 5:27=E2=80=AFAM void <<a href=3D"mai= lto:void@f-m.fm" target=3D"_blank">void@f-m.fm</a>> wrote:<br></div><= blockquote class=3D"qt-gmail_quote" style=3D"margin-top:0px;margin-right= :0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-le= ft-style:solid;border-left-color:rgb(204, 204, 204);padding-left:1ex;"><= div>Hi,<br></div><div> <br></div><div> Does /var/mail still need atime?<= br></div><div> <br></div><div> I've installed a ufs2-based -current main= -n267425-aa1223ac3afc on<br></div><div> rpi4/8BG which installs into one= / . If it's mounted with noatime,<br></div><div> will it have consequen= ces for /var/mail ?<br></div></blockquote><div><br></div><div class=3D"q= t-gmail_default" style=3D"font-family:monospace, monospace;">It doesn't = matter if you don't normally receive emails locally (nowadays, it's rare= ).<br></div><div class=3D"qt-gmail_default" style=3D"font-family:monospa= ce, monospace;"><br></div><div class=3D"qt-gmail_default" style=3D"font-= family:monospace, monospace;">If you do receive emails locally, it depen= ds on what application(s) that you are using. Most applications no= wadays check both mtime and atime plus sizes of the mailbox file and do = not rely on atime (because they saved the previous mtime). Without= atime updates, some application may claim that you have new mail when t= he mailbox is not empty when they first start.<br></div><div class=3D"qt= -gmail_default" style=3D"font-family:monospace, monospace;"><br></div><d= iv class=3D"qt-gmail_default" style=3D"font-family:monospace, monospace;= ">That's said, if I were you and I'm using some flash based storage (wit= h rpi it's highly likely) regardless if I'm using mail locally; most of = the time the data is not really useful for anything, and it does increas= e the wear of your storage.<br></div><div class=3D"qt-gmail_default" sty= le=3D"font-family:monospace, monospace;"><br></div><div class=3D"qt-gmai= l_default" style=3D"font-family:monospace, monospace;">This reminds me t= hat -- we probably should have implemented the Linux "relative atime" (u= pdate atime iff (atime <=3D mtime || atime <=3D ctime) || atime is= older than a day) and "no diratime" (don't update directory atime) for = UFS and make the "relatime" option the default; I had an incomplete = ;implementation about a decade ago somewhere but with the recent VFS cha= nges it's probably easier to start over. IMHO, updating atime = ;every time when a file is accessed is not really providing useful data = (like who accessed the file, etc.) for audit purposes and does come with= performance (more write I/O) and reliability (wear of SSD and other fla= sh devices) cost, therefore not generally useful in modern days. T= he Linux relative atime is a pretty clever idea that has covered the mos= t useful use case for atime (Did I accessed the file after it was last m= odified) and also provided a coarse-grained update (capped to daily, whi= ch is a reasonable compromise) to the atime.<br></div><div class=3D"qt-g= mail_default" style=3D"font-family:monospace, monospace;"><br></div><div= class=3D"qt-gmail_default" style=3D"font-family:monospace, monospace;">= Cheers,<br></div></div></div></blockquote><div dir=3D"ltr"><div class=3D= "qt-gmail_quote"><div class=3D"qt-gmail_default" style=3D"font-family:mo= nospace, monospace;"><br></div><div class=3D"qt-gmail_default" style=3D"= font-family:monospace, monospace;">On the Linux side of things I think a= lmost of the mail handling programs have migrated to either using MailDi= r or MH style mailboxes, which don't need atime, for anything local. The= MDA/MTA configuration examples have all used MailDir for around a decad= e now.<br></div></div><div><br></div><div>Why not make noatime the defau= lt across the whole system? Outside of mbox why is recording access time= actually useful?<br></div></div><div><br></div></body></html> --54b92331b9ec41dc9f02046dfeeac9b9--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2eabfb91-afc3-47f7-98b9-1a1791ae6e7d>