Samba4: LDB size limit and memory leak

Marcel Ritter Marcel.Ritter at
Fri May 29 12:31:25 GMT 2009

tridge at schrieb:
> Hi again,
> The following patch seems to solve the problem, at least for this
> test. It combines the "repack on expand" patch I sent previously with
> a tiny change that over-allocates records by 25% in the main tdb space
> allocation code.  
Great - thank you!
> The reason this works is that it adds more extra space to larger
> records. So when our index records get large, they get 25% extra space
> allocated which leaves them room to grow. So the number of times a
> record is relocated when it grows drops rapidly as the database grows.
> Watching a series of ldbadd calls to add lots of users, I now see the
> freelist length staying roughly static, and the database growing by
> about 7k per user. I'm still doing a larger run with 20k users, so
> perhaps it will degrade eventually, but I doubt it. 
> Can you test on your system and see if its OK for you?
Tests are currently running. Looks good so far - file size is now at a
reasonable level.
> This won't solve the speed problems (user and group adds are still too
> slow), but at least the db stays a reasonable size.
> Cheers, Tridge

More information about the samba-technical mailing list