🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #14835

Not setting atime on files (was ... mmap() the active file)

#14835
From: bill davidsen
Date: Fri, 07 Feb 1997 00:00
44 lines
3001 bytes
In article <dswartz-0502972349580001@accord.druber.com>,
Dan Swartzendruber <dswartz@druber.com> wrote:

| Amen!  I've noticed similar results on a machine I've been testing that
| patch on for most of this week.  In a similar vein, I'm also testing a
| patch for Linux 2.0.X for the ext2 filesystem to support the noatime
| mount option.  This seems to have improved performance as well.  I've not
| been in this code a lot, so it's possible my modification to the original
| patch (designed for 1.2.13 kernel) isn't optimal.  If so, feel free to fix
| it the "right way" after I post the patch...

I've expanded the newsgroups and directed followups there, since
I'm about to take a turn from news to general o/s design...

Synopsis: this is from a discussion of avoiding an update of the
accessed time for an inode, to prevent disk activity.

My feeling on this is that the "right" was to do this is to add an
option to the open() call which allows the files to be accessed
without updating the accessed time (atime). This means that programs
wishing to use the fopen() calls would have to switch to a sequence
of open() followed by fdopen(). This doesn't add any measurable
overhead, since the fopen() routine is going to do an open() system
call and put the information in a FILE descriptor anyway.

Programs which would want to do this are apps like news and backups,
for which any reduction in system overhead is a plus.

My feeling is that this is a good general capability, and doesn't
need to be restricted to use by root. However, if someone can
imaging a real security hole from its use, it could be restricted to
files owned by the opening process. Since that process could reset
the times if desired, this adds convenience and efficiency without
opening any holes. At least not any obvious to me on short notice.

Comments and thoughts?
-- 
bill davidsen (davidsen@tmr.com)
  Company policy prevents me from commenting on the performance of
this distributed database. However, the machines on which it runs
are called bottleneck and roadblock.

Technical Details
Message-ID: <5dffd2$1f0q@usenet1y.prodigy.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.unix.misc.mbox.zip!not-for-mail
References: <5d6th6$b8h@flea.best.net> <32f95bab.180976735@news.deltanet.com> <dswartz-0502972349580001@accord.druber.com>

Show Full Headers
Complete Article Headers
Message-ID: <5dffd2$1f0q@usenet1y.prodigy.net>
Subject: Not setting atime on files (was ... mmap() the active file)
Date: Fri, 07 Feb 1997 00:00:00 +0000
From: davidsen@tmr.com (bill davidsen)
References: <5d6th6$b8h@flea.best.net> <32f95bab.180976735@news.deltanet.com> <dswartz-0502972349580001@accord.druber.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.unix.misc.mbox.zip!not-for-mail
X-Deja-AN: 215084250
Followup-to: comp.os.linux.development.system,comp.arch,comp.unix.misc
Organization: TMR Associates, Schenectady NY
Newsgroups: news.software.nntp,comp.os.linux.development.system,comp.arch,comp.unix.misc
Originator: davidsen@darkstar.prodigy.com