Subject: Re: Deleting files
To: Christian von Kleist <cvk@zybx.com>
From: John Franklin <franklin@elfie.org>
List: port-alpha
Date: 03/23/2003 11:01:00
On Tue, Mar 18, 2003 at 03:43:20AM -0500, Christian von Kleist wrote:
>      As you can see, turning on softdep made a huge speed-up in file
> deletion, and I'm very happy about that.  Now, if I can just figure
> out if softdep is stable enough to trust!

I don't have any RAID systems using softdeps, but I have used it on
all my systems including a 55G mini-NAS box.  I've found it to be quite
stable, even with a pathalogical stress test.  

I've only run into two problems with it in that time:

1. Overwriting a file on a near-full disk may fail.
  This, in particular, happens on my / partition when I'm trying to copy
over new kernel to it.  At issue is that softdeps keeps both files data
on disk until the new metadata is flushed.  The solution here is to not
give / softdeps.  If you set up separate /var and /tmp partitions, /
doesn't get many writes anyway.

2. If your kernel doesn't support softdeps, but the option is enabled
in your fstab, then those mounts will fail.  This can lead to an
unbootable system situation if you use the GENERIC kernel as a failsafe,
which doesn't support softdeps.  I've just filed a pr about this one.

Incidentally, the stress test:
The miniNAS is a P100 with far too little memory (a scant 96M.)  It has,
among other things, pkgsrc checked out onto it.  After having built many
packages with it there are many of work directories on it.  From a
remote machine I execute this:

cd /usr/src/pkgsrc
foreach i (*/*/work)
rm -rf $i &
end

This spawns off an rm for each work directory which beats the poor P100
stupid.  I do get some "not responding/is alive" NFS messages on the
client as the P100 desparately tries to keep up, but softdep never
fails.

I've done similar (though not quite as mean) create tests (multiple cvs
checkouts/updates, untars, builds) and have never had a problem with the
stability of softdep.

I'm not kind to my machines.

jf
-- 
John Franklin
franklin@elfie.org
ICBM: 35°43'56"N 78°53'27"W