TDB hash size

Jeremy Allison jra at samba.org
Fri Sep 3 17:00:40 MDT 2010


On Fri, Sep 03, 2010 at 04:04:27PM -0400, Justin Payne wrote:
> I was instructed by Simo that samba-technical@ may be a better place
> for this discussion.
> 
> Sorry for the widespread distribution, but I cannot find much with
> regard to documentation on this question. Can anyone think of any
> issues that would arise from increasing the samba (3.0.33) printing
> tdb hash size using the following method:
> 
> rm -f /var/cache/samba/printing/*
> rm -f /var/spool/samba/*
> 
> cd /var/cache/samba
> tdbbackup -s .bck -n 100000 nt*.tdb
> mv ntprinters.tdb.bck ntprinters.tdb
> mv ntforms.tdb.bck ntforms.tdb
> mv ntdrivers.tdb.bck ntdrivers.tdb
> 
> More specifically, does anyone know of a method for calculating the
> proper hash size required for a specific environment? The issue
> arose by print queues not being cleared. After the hash sizes of the
> above tdb's were increased, the problem went away.

This is interesting. Do you have any information on why
the print queues were not being cleared when the hash size
was small ? Do you know what the bottleneck was ? Hopefully
you've saved the old nt*.tdb's so you can examine this.

It would be easy to set the default hash size for new
db's to be 100000 (and to write code to migrate old hash
sizes to new on startup), but I'd like to understand it first.

Jeremy.


More information about the samba-technical mailing list