2.2.0 development: tdb diskspace leak?

David Lee T.D.Lee at durham.ac.uk
Thu Nov 16 09:56:51 GMT 2000


On Wed, 15 Nov 2000, Jeremy Allison wrote:

> No it's not actually a leak, but a problem we need to address
> soon. The problem is that if a tdb keeps getting full it will
> allocate more space for records, which it will never free. The
> space is not leaked - just allocated as "free" space - like a
> growing malloc pool. The only way to trim it is to copy all the
> entries into another db and then atomically rename. Currently this
> is done with the unexpected db when nmbd is restarted.

Thanks for the reply.  I had guessed that this was a "high water mark" 
(or "maximum over elapsed time") effect, which is reasonable (and clean to
code!), even if not ideal.  But I thought I ought to report it, just in
case there might have additionally been another effect in play (such as
intending to reuse empty (but already allocated) space but perhaps a bug
causing it instead to use new diskspace). 

> The fix is to monitor the tdb size and get nmbd to initiate
> trim operations when it grows too large. I'll look into this
> code.

Thanks.

Is there an smb.conf parameter (or nmbd startup option or similar) to
switch on/off the use of "unexpected.tdb"?  (Off: as 2.0.x, ignoring these
packets;  on: as new 2.2.0, storing packets for a time.)  Might it be
worth having one? 

-- 

:  David Lee                                I.T. Service          :
:  Systems Programmer                       Computer Centre       :
:                                           University of Durham  :
:  http://www.dur.ac.uk/t.d.lee             South Road            :
:                                           Durham                :
:  Phone: +44 191 374 2882                  U.K.                  :





More information about the samba-technical mailing list