process shared robust mutexes for tdb
idra at samba.org
Mon Dec 24 07:06:40 MST 2012
On Mon, 2012-12-24 at 11:39 +0100, Volker Lendecke wrote:
> find my current work in progress to augment the fcntl locks
> in tdb with mutexes for the freelist and hash chain locks.
> The reason for this is that fcntl under load pretty much
> collapses. I don't have exact results yet, but the initial
> tests for tdbtorture are spectacular. One test went down
> from 8m47.470s to 0m13.376s. The tdb_open_ex patches are far
> from done. I am still thinking how to protect tdb with
> mutexes from other use. The idea is that this scheme is only
> used for highly contended tdb like locking.tdb where we
> don't do transactions for example.
Looks nice, the only comment I really have is that mutexes over mmap
memory are not very portable, but if mutexes can be used only on
platfroms that cna properly handle them on mmap it is a very neat
optimization for those platforms if it gives the numbers you show.
Certainly beats having to make syscalls into the kernel constantly so
I'd like to see this work hitting master once it's ready.
I would love to see numbers for LDB too, we've seen quite a hit with
fcntls in the past, although I guess fsyncs will dwarf any fcntl given
we use transactions a lot.
Samba Team GPL Compliance Officer <simo at samba.org>
Principal Software Engineer at Red Hat, Inc. <simo at redhat.com>
More information about the samba-technical