'use mmap = no' and 'tdb_hashsize:dbname.tdb'

simo idra at samba.org
Mon Jul 4 06:00:43 MDT 2011

On Mon, 2011-07-04 at 13:23 +0200, Volker Lendecke wrote:
> On Mon, Jul 04, 2011 at 09:16:01PM +1000, Andrew Bartlett wrote:
> > There are two parameters, 'use mmap' and the parametric
> > 'tdb_hashsize:dbname' that are invoked in the Samba3 wrapper for tdb
> > opens (lib/util/tdb_wrap.c and source3/lib/util_tdb.c). 
> > 
> > I presume these are still required, as they were added in 2007, but I
> > just wanted to check.  
> > 
> > The smb.conf man page indicates that 'use mmap' is only to work around
> > buggy platforms:  could it be left as just a build-time option?  My
> > understanding is that using pread/pwrite has got us into quite a bit of
> > trouble in the past, particularly if the platform 'emulates it'.  
> > 
> > What situations would require us to avoid mmap at runtime, rather than
> > at build time? (my other mail discusses part of that problem)
> I've seen problems with mmap that vanished without. Rare,
> but when you hit them, they are urgent. Please keep that
> parameter around. Also, pread/write can be helpful in
> debugging, as with mmap you don't see the access to the tdb
> files in strace.


> > As regards the tdb_hashsize, is this still important with the use of the
> > jenkins hash for internal DBs?  Does the move to tdb2 have an impact
> > here?
> Please keep that parameter around as well. It has helped me
> in the past with weird workloads.
> I'm okay with naming them differently, but the functionality
> needs to stay around, at least for the Samba3 file server.


Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Principal Software Engineer at Red Hat, Inc. <simo at redhat.com>

More information about the samba-technical mailing list