access idmap cache directly from smbd

Michael Adam ma at
Mon Aug 18 21:54:55 GMT 2008

Hi folks,

Volker Lendecke wrote:
> Hi, Jerry & Simo!
> Attached find two patches that make smbd directly access the
> idmap cache.

I agree with Simo in that it feels wrong to have smbd
write to the idmap cache. I don't understand why smbd
should. Probably I am just missing somthing here.
But to my understanding, the idmap cache is somthing
that winbind should fill and samba should (possibly)
be able read.

Your patch replaces the smbd's access to its own idmap-memcache 
which of course includes store ops with access to the idmap
cache in gencache.tdb which (i think) smbd should only read.

> It will speed up Samba operation, because it gets rid of a
> considerable amount of roundtrips to winbind, in particular
> together with the third patch that increases the default
> positive cache timeout to a week.

What is the real performance problem?
The roundtrips to winbind or winbind going further to the
The second problem would be solved by simply increasing the
positive cache time since winbind looks into the idmap cache
before asking the backends anyways.
And wouldn't the first be equally well solved by a read-only
access to the cache by smbd?

> If this is not acceptable upstream, we need to discuss a
> separate tdb-based idmap cache for smbd only. I have
> customers where the LDAP server is running at its total
> limit, because they have "hide unreadable" set together with
> many files and Posix ACLs. With every user pressing "f5" in
> a directory, we look up hundreds of gids against LDAP, one
> after the other.  This is a significant performance problem
> in my situation, and I would like to get a relief upstream.

This seems to be due to the short positive cache time, right?

Probably I am missing some vital points,
so please enlighten me. :-)

Cheers - Michael

Michael Adam <ma at>  <obnox at>
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.SerNet.DE, mailto: Info @ SerNet.DE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 206 bytes
Desc: not available
Url :

More information about the samba-technical mailing list