Why use TDB and LMDB?

Andrew Bartlett abartlet at samba.org
Wed May 20 21:50:48 UTC 2020


On Wed, 2020-05-20 at 12:39 -0700, Jeremy Allison via samba-technical
wrote:
> On Wed, May 20, 2020 at 12:32:37PM -0700, Jeremy Allison via samba-
> technical wrote:
> > On Wed, May 20, 2020 at 09:46:02PM +0300, hezekiah maina via samba-
> > technical wrote:
> > > Hi everyone,
> > > 
> > > I'm still learning Samba and one of the question I haven't
> > > figured out yet
> > > is why
> > > Samba uses TDB or LMDB instead of RDBMS like Postgres or MySQL?
> > 
> > RDBMS like Postgres or MySQL are more heavyweight than tdb and
> > lmdb. i.e. we think they'll be slower. A lot slower.
> 
> Just to follow up, tdb was custom-created along with
> Samba to satify *exactly* what we needed, and no more.

Thanks Hezekiah for asking - it is great to ponder some of the
assumptions under Samba, your GSoC project will be easier once you have
that mental model of how Samba works, what the stack is etc.

Yeah, we could say we were NoSQL before NoSQL was cool!  

But more seriously, an RDMS could then be built on top of TDB or LMDB,
a bit like we build an LDAP-like store on top (that being LDB).  

Most things Samba needs (particularly as a file server), as Jeremy
mentions, fit the key-value model best, and the rest (essentially the
AD DC) is why we have LDB.  

You could build LDB or an LDAP server on top of an RDBMS (others have
done that for OpenLDAP, but we have enough complexity in our lives as
it is :-).

I hope this helps!

Andrew Bartlett

-- 
Andrew Bartlett                       https://samba.org/~abartlet/
Authentication Developer, Samba Team  https://samba.org
Samba Developer, Catalyst IT          
https://catalyst.net.nz/services/samba






More information about the samba-technical mailing list