prime the sam ldb schema in the parent samba process
authorAndrew Tridgell <tridge@samba.org>
Fri, 7 Aug 2009 07:19:39 +0000 (17:19 +1000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 7 Aug 2009 07:24:48 +0000 (17:24 +1000)
commitcfc0cabb27c7323930b96dd93befa955bacd6cde
tree6888fc1fe19864d47f4b66d235ec116f9063948f
parent2c12c985e7f2debb25452e484925b7fdf987c659
prime the sam ldb schema in the parent samba process

While testing the use of the standard process model with 'make test' I
found that testing was much slower (by several times) with the
standard model than with the single model. The primary problem was
that each SMB connection would open a new sam ldb context, and all of
those would reload the full AD schema.

The fix is to pre-open the SAM during server startup, before any child
processes are forked. This sets up the global schema context which is
inherited by all connections.

The standard model is still slower at make test than the single model,
but not by nearly as much. I am working on further reducing the gap.
source4/smbd/server.c