tight loop in tdb_find()

Michael Adam obnox at samba.org
Tue May 26 12:52:33 GMT 2009


Volker Lendecke wrote:
> On Tue, May 26, 2009 at 09:37:45AM +1000, tridge at samba.org wrote:
> > Regarding transaction cost, I previously estimated the cost of a
> > transaction as about 200ms. I've now added a transaction speed test to
> > tdbtool and found it quite a bit lower on average, more like 10ms. 
> 
> That is probably true on an idle system. When I read lwn.net
> about reported ext4 data loss, I got the impression that the
> Linux fsync has performance issues on a busy system,
> stalling much more of the system than strictly necessary. I
> have seen old smbd start up take really, really long because
> it did a few dozen transactions preparing registry.tdb.
> That's why the large transaction around the registry code
> was added. Ronnie tells me that nested transactions are a
> completely broken design, but from my point of view they are
> required due to those performance issues.

By the way, if I am not mistaken, samba does not hand nested
transactions down to tdb or ctdb - see here

source3/lib/dbwrap_ctdb.c:db_ctdb_transaction_start():

if (ctx->transaction) {
	ctx->transaction->nesting++;
	return 0;
}

and correspondingly for db_ctdb_transaction_commit() and _cancel().

So Samba, as a user of ctdb transaction, does not really use nested
transactions. Or am I missing something important here?

Cheers - Michael

-- 
Michael Adam <ma at sernet.de>  <obnox at samba.org>
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.SerNet.DE, mailto: Info @ SerNet.DE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 206 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20090526/4e7e4cb8/attachment.bin


More information about the samba-technical mailing list