Re: Softdep and noatime

2019-12-03 Thread Raf Czlonka
On Tue, Dec 03, 2019 at 11:25:23AM GMT, Stuart Henderson wrote:
> On 2019-11-30, Raymond, David  wrote:
> > I am switching to OpenBSD from Linux and I have questions about the
> > use of softdep and noatime in mounting disks.  I have a variety of
> > systems with a mix of SSDs and rotating disks.
> >
> > Softdep seems to have some advantages in speeding file access, but it
> > is not the default.  Are there any downsides in using softdep?
> 
> Yes, that's why it's not on by default. Uses more memory, delays freeing
> space when removing files, tends to cause a kernel panic if the drive
> goes unresponsive (which the drive might have otherwise recovered from
> after a delay). It's not that much of an improvement with SSDs anyway,
> it's most useful with drives that are slow at random writes (higher
> seek times).
> 
> > On SSDs in particular, is it worth setting noatime to reduce the
> > number of disk writes?
> 
> In general, not really unless your drives are slow, or you often do
> reads across a large set of files and don't have anything that cares
> about access times on those files.
> 

I second that - an old Asus Eee PC got quite usable once I've enabled
softdep. I don't enable it on anything else any more, though.

Regards,

Raf



Re: Softdep and noatime

2019-12-03 Thread Stuart Henderson
On 2019-11-30, Raymond, David  wrote:
> I am switching to OpenBSD from Linux and I have questions about the
> use of softdep and noatime in mounting disks.  I have a variety of
> systems with a mix of SSDs and rotating disks.
>
> Softdep seems to have some advantages in speeding file access, but it
> is not the default.  Are there any downsides in using softdep?

Yes, that's why it's not on by default. Uses more memory, delays freeing
space when removing files, tends to cause a kernel panic if the drive
goes unresponsive (which the drive might have otherwise recovered from
after a delay). It's not that much of an improvement with SSDs anyway,
it's most useful with drives that are slow at random writes (higher
seek times).

> On SSDs in particular, is it worth setting noatime to reduce the
> number of disk writes?

In general, not really unless your drives are slow, or you often do
reads across a large set of files and don't have anything that cares
about access times on those files.




Re: Softdep and noatime

2019-12-03 Thread Stuart Henderson
On 2019-12-02, Steve Litt  wrote:
> I mount everything noatime because I don't care at all about access
> time, I care about modification time.

Access time can be useful in forensics and debugging ("when was program
X last used? when was this file last opened?") but often you won't know
until after the event that you might find it useful.

I tend to use noatime on things like /usr/src, /usr/ports, /cvs but
otherwise leave atimes on as done by default.




Re: Softdep and noatime

2019-12-01 Thread Steve Litt
On Sat, 30 Nov 2019 18:10:37 +0100
Tomasz Rola  wrote:

> On Sat, Nov 30, 2019 at 06:12:42AM -0700, Raymond, David wrote:
> [...]
> > On SSDs in particular, is it worth setting noatime to reduce the
> > number of disk writes?  
> [...]
> 
> I wonder what other will say about this, but I mount everything as
> noatime, since more than a decade, spinning or not. I assume this may
> make lifetime a bit longer and decided it is better to be on safe(r)
> side.
> 

I mount everything noatime because I don't care at all about access
time, I care about modification time.

SteveT

Steve Litt
November 2019 featured book: Manager's Guide to Technical
Troubleshooting Second edition
http://www.troubleshooters.com/mgr



Re: Softdep and noatime

2019-12-01 Thread Nick Holland
On 2019-11-30 08:12, Raymond, David wrote:
> I am switching to OpenBSD from Linux and I have questions about the
> use of softdep and noatime in mounting disks.  I have a variety of
> systems with a mix of SSDs and rotating disks.
> 
> Softdep seems to have some advantages in speeding file access, but it
> is not the default.  Are there any downsides in using softdep?

it's more complicated, and thus, will have more bugs.
My personal experience: I'd trust softdep more than any modern Linux
filesystem, BUT its still more complicated, and thus will have more
bugs than the default FFS.

> On SSDs in particular, is it worth setting noatime to reduce the
> number of disk writes?

Nothing to do with SSDs, as your quest to minimize writes on SSDs is
demonstrated stupid and pointless.  SSDs fail much more often for
reasons other than write fatigue, Optimizing for write fatigue is
like protecting your ship against icebergs hitting the propeller.

VERY VERY few applications use atime, and yet, it requires an update
to the directory for EVERY SINGLE ACCESS.  Ouch.  So, it's a
non-trivial performance gain if you turn it off.  That's a great
reason to turn it off.  Not SSDs.

HOWEVER...if you don't need performance and you can't point to a
real benefit, as always, keep it on the default.

Nick.



Re: Softdep and noatime

2019-11-30 Thread Tomasz Rola
On Sat, Nov 30, 2019 at 09:20:37PM +0100, Xianwen Chen (陈贤文) wrote:
> Dear Mr. Rola,
> 
> > I wonder what other will say about this, but I mount everything as
> > noatime, since more than a decade, spinning or not. I assume this may
> 
> Do you mount swap as noatime too, I'm curious?
> 
> Yours sincerely,
> Xianwen

Hello,

Frankly, I have never considered atime or noatime option for swap. I
think there is not much use for atime in swap anyway. Access time for
memory pages, this is another story. I guess some optimisation
algorithms make use of this information.

Ok, so not "everything", I only mount filesystems as noatime. :-)

-- 
Regards,
Tomasz Rola

--
** A C programmer asked whether computer had Buddha's nature.  **
** As the answer, master did "rm -rif" on the programmer's home**
** directory. And then the C programmer became enlightened...  **
** **
** Tomasz Rola  mailto:tomasz_r...@bigfoot.com **



Re: Softdep and noatime

2019-11-30 Thread Bodie




On 30.11.2019 14:12, Raymond, David wrote:

I am switching to OpenBSD from Linux and I have questions about the
use of softdep and noatime in mounting disks.  I have a variety of
systems with a mix of SSDs and rotating disks.

Softdep seems to have some advantages in speeding file access, but it
is not the default.  Are there any downsides in using softdep?


https://www.openbsd.org/faq/faq14.html#SoftUpdates

plus 'man mount' option softdep:

(FFS only) Mount the file system using soft dependencies. Instead of 
metadata being written immediately, it is written in an ordered fashion 
to keep the on-disk state of the file system consistent. This results in 
significant speedups for file create/delete operations. This option is 
ignored when using the -u flag and a file system is already mounted 
read/write.


The options async and softdep are mutually exclusive.



On SSDs in particular, is it worth setting noatime to reduce the
number of disk writes?



Why would you want to do that? Are you using it in other OS?
Then why and where did you get that idea?


Dave Raymond




Re: Softdep and noatime

2019-11-30 Thread 陈贤文
Dear Mr. Rola,

> I wonder what other will say about this, but I mount everything as
> noatime, since more than a decade, spinning or not. I assume this may

Do you mount swap as noatime too, I'm curious?

Yours sincerely,
Xianwen



Re: Softdep and noatime

2019-11-30 Thread Jan Stary
On Nov 30 06:12:42, david.raym...@nmt.edu wrote:
> On SSDs in particular, is it worth setting noatime to reduce the
> number of disk writes?

noatime is worth setting on filesystems where you don't care
about atime (a mail client might care about the atime of your
/var/mail/mbox, for instance).

SSD has nothing to do with it.
Treat it as a disk, which it is.



Re: Softdep and noatime

2019-11-30 Thread Marcus MERIGHI
Hello, 

david.raym...@nmt.edu (Raymond, David), 2019.11.30 (Sat) 14:12 (CET):
> I am switching to OpenBSD from Linux and I have questions about the
> use of softdep and noatime in mounting disks.  I have a variety of
> systems with a mix of SSDs and rotating disks.
> 
> Softdep seems to have some advantages in speeding file access, but it
> is not the default.  Are there any downsides in using softdep?
> 
> On SSDs in particular, is it worth setting noatime to reduce the
> number of disk writes?

The most recent thread on that topic that I could find:

https://marc.info/?t=15181182685

Marcus



Re: Softdep and noatime

2019-11-30 Thread Tomasz Rola
On Sat, Nov 30, 2019 at 06:12:42AM -0700, Raymond, David wrote:
[...]
> On SSDs in particular, is it worth setting noatime to reduce the
> number of disk writes?
[...]

I wonder what other will say about this, but I mount everything as
noatime, since more than a decade, spinning or not. I assume this may
make lifetime a bit longer and decided it is better to be on safe(r)
side.

-- 
Regards,
Tomasz Rola

--
** A C programmer asked whether computer had Buddha's nature.  **
** As the answer, master did "rm -rif" on the programmer's home**
** directory. And then the C programmer became enlightened...  **
** **
** Tomasz Rola  mailto:tomasz_r...@bigfoot.com **