Samba4: LDB size limit and memory leak

Andrew Bartlett abartlet at
Wed May 27 13:36:04 GMT 2009

On Wed, 2009-05-27 at 14:00 +0200, Marcel Ritter wrote:
> Andrew Bartlett schrieb:

> > I think what's happening here is actually that you didn't add all the
> > users in a single transaction, and as such are hitting up against the
> > pathological database growth issues we first saw late last year.
> >   
> Ok - size shrinks drastically to about 5% of the original size
> (using /tmp/tdbbackup  users.ldb) ->
> -rw-r--r-- 1 root root 4421734400 26. Mai 21:14 users.ldb
> -rw-r--r-- 1 root root  218132480 27. Mai 12:32 users.ldb.bak
> > I think we need some internal trigger to say 'repack the database' (ie
> > call tdb_repack())
> >
> > As a test, can you keep adding records if you call tdbbackup on the
> > users.ldb (and then replace users.ldb with the backup)?
> >   
> Adding users with setup/newuser works nicely again after running tdbbackup.

So, what we need here is for the tdb transaction code to notice if the
tdb is fragmented.  This would be the case if the size on disk was more
than twice the data (ignoring the large freelist possibly at the end of
the file).  If fragmented, we could then re-pack.

Andrew Bartlett

Andrew Bartlett                      
Authentication Developer, Samba Team 
Samba Developer, Red Hat Inc.        

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url :

More information about the samba-technical mailing list