mickey wrote:
> On Tue, May 08, 2007 at 07:06:06AM -0400, Nick Holland wrote:
>> George C wrote:
...
>> > Is it always best to mount /, /tmp, /usr, /var, /home with softdep?
>> > Under what curcumstances would it not be appropriate?
>> 
>> If your app makes assumptions about write ordering, softdeps can negate
>> the care the app author took.  For example, some mail programs don't ack
>> the receipt of a message until it has been safely written to disk, the
>> idea being that if the power goes out or the machine crashes, if the
>> message has been acknowledged, IT HAS BEEN RECEIVED and will be there
>> when the machine comes back up.  Softdeps promises that what is on your
>> disk is coherent, but "coherent" usually means the last few files written
>> to disk may be just removed when the system comes back up.  Not desired
>> in this case.
> 
> this is not true. fsync() works as specified.

Apparently, not all apps use fsync, or don't use it properly.
At least qmail advises against the use of softdeps:
  http://cr.yp.to/qmail/faq/reliability.html#filesystems
I also found a reference to another mail program which had people
making similar advisories, but not sure if they are still applicable.

>> Softdeps don't do anything for you if you are mostly reading from disk,
>> or if the partition is mounted read-only.  It's about writing.
> 
> of course they do. there are still atime updates
> for example that will be handled if not mount read-only.

yeah, no idea why I phrased it in such absolute terms.  duh.

>> Softdeps is much more complex than conventional disk access.  While I
>> have not personally seen a softdep-related bug in some time, and that
>> one was quickly fixed, you HAVE to assume it is more likely to have
>> bugs than the non-softdep systems.
> 
> this is also not exactly true -- there are softdep bugs fixed
> at the rate of ten per year if not more. most of them are
> bugs that been there forever.

I (apparently) phrased this poorly, having seen at least two unintended
interpretations...

I have only *experienced* one softdep bug in many years of using it on
virtually all partitions of virtually all systems I have installed.
After providing the PS and TRACE, I think Pedro had me a patch within
an hour. :)

Yes, certainly, bugs have been spotted, and there are most likely
other bugs that remain.  Some people have apps which expose bugs
better than mine...


If it was not obvious from my comments, I love softdeps.  I have a
siteXX.tgz file which does a few simple things, one of which is to
change all mount points to use softdeps.  One really does have to
hunt a bit for relevant reasons not to use it.  About the only
place I can think of where I deliberately don't use it is on an
e-mail archive system on the filled partitions which are mounted
read-only.

I can't tell you how many times I have forgot to install my siteXX
file, started loading up /usr/src, and realized, "Dang, obviously
no softdeps".  At which point, I stop the checkout, fix the
problem, reboot, and try again.  Yes, the performance difference
is that obvious, and it is faster to reboot than it is to wait it
out.

Nick.

Reply via email to