[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Using Berkeley DB

From: Bryan O'Sullivan <bos_at_serpentine.com>
Date: 2000-09-12 08:53:20 CEST

j> I think Greg Stein mentioned using mySQL instead of Berkeley DB. I
j> don't know a lot about mySQL, but my understanding was that it
j> didn't really care about recoverability much.

MySQL only acquired support for transactions recently, and its
developers are still quite early in the development cycle for that set
of features. In addition, MySQL uses Berkeley DB to handle tables
with transactional properties, so it will continue to be turtles most
of the way down, even if you stack a rhino on top.

j> Here's the manual's bit on Berkeley DB vs. NFS. [...] Note
j> especially the bit at the end about Linux.

My understanding of the potential pitfalls in this area is a bit more
detailed. There are three problems.

1. Linux distributions prior to the 2.2 kernel series didn't use or
    support the NFS lock daemon, which is used to provide Unix-style
    locking semantics over NFS. Recent kernels support lockd, and
    recent distributions ship with the necessary user-space support.

2. The default behaviour for current Linux NFSv2 and NFSv3
    implementations is to use async writes. This violates the NFS
    specs, which require that writes be synchronous (i.e. the server
    doesn't send an RPC return message to the client until the data is
    on disk), moutns can be forced to use synchronous writes if
    necessary. The 2.4 kernel defaults to synchronous writes for
    NFSv3. Async-mounted NFS filesystems will appear to honour
    fsync() calls without actually doing so.

    Since synchronous writes yield truly crappy performance, it's not
    a bad idea to leave async writes turned on if the client and
    server are running stable kernels with reliable electrical power.

3. All stock (i.e. issued by Alan Cox) Linux 2.2 kernels have NFS
    implementations that are deficient in various respects. There's a
    set of patches that bring them up to scratch, but Alan hasn't
    integrated them into the official tree yet. All recent Linux
    distributions include these patches in the kernels they ship.

What the above amounts to is a set of *potential* problems for people
using SVN over NFS with Linux servers or clients, each of which can be
evaluated and avoided if necessary.

        <b
Received on Sat Oct 21 14:36:08 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.