Tune gencache a bit

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Nov 27 07:16:47 MST 2012

On Tue, Nov 27, 2012 at 09:04:09AM -0500, Ira Cooper wrote:
> You noted losing gencache_nosync.tdb on boot, is it worth repopulating, in
> your use case?  (I'm not sure if we'd corrupt it or not.)

Two sets of data are worth carrying across boots for my
customer: The server affinity cache and the idmap cache. The
server affinity cache speeds up winbind reconnecting to the
right DC, and the idmap cache significantly reduces load on
winbind for all the clients that re-authenticate
simultaneously when a server comes back. I have played
around with a LOT of thoughts how to make the cache
blindingly fast and persistent at the same time, but all I
could come up with is a compromise. This patchset is just
tuning a possibly bad compromise and patching symptoms where
a better cure should be tried.

Also, if fcntl locks are significantly slower than a
round-trip into winbind over the unix domain socket, the
picture completely changes: We should not use the idmap
cache at all. On Linux in my experience fcntl is faster than
a process round-trip, so this might be a false optimization
and a Linux-Only-ism, sorry for that.

As argued on irc, it is a valid point that you should expect
uptimes of a year or more from a reasonable server setup. So
most of the caches could easily be discarded upon one of
those rare reboots. So maybe we should add a "stable
gencache" option, set to no for all normal setups and set to
yes for setups where reboots are a more frequent activity.


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:kontakt at sernet.de

More information about the samba-technical mailing list