D-Bus core due for a release?
newsuser at famdijkstra.org
Thu May 17 04:51:49 PDT 2007
On Wed, 16 May 2007 18:46:33 -0400
Havoc Pennington <hp at redhat.com> wrote:
> Tim Dijkstra wrote:
> > On Wed, 16 May 2007 14:41:29 -0400
> > Havoc Pennington <hp at redhat.com> wrote:
> >>> * possibly the user database (it's unclear whether this made it into 1.0.2)
> >> Not sure I remember the current state here, but I thought there was a
> >> patch that needed some performance testing before we put it in.
> > Part of it is cleanup; there used to be two copies of the cache, also
> > they didn't got expired on dbus reload. The second part is a configure
> > switch to disable it altogether, which is the correct thing to do IMHO.
> > It will indeed hit performance if you use for example an LDAP server
> > _without_ nscd. If you install nscd I couldn't measure a difference. I
> > think we shouldn't redesign caching if there is already a caching
> > daemom.
> Thanks, according to the changelog this patch is in HEAD already (did
> not check 1.0.x). So the issue is just the default for the configure
> switch (or I guess if we change to default to no cache, arguably we
> should just nuke all this code).
> I don't think it's only LDAP - it's far too slow with /etc/passwd also I
> think, without nscd.
IIRC in the tests I did with just plain /etc/passwd, I couldn't find
any significant slowdown. Note that this test was not very
sophisticated, something like `make test' or so... Anyway it would be
good if somebody else then me did some tests with it.
> How does the nscd caching work I wonder - remember on *every* message we
> can do things like get the groups a user is in. So we need that info
> in-process. Does libc keep a client-side/in-process cache also when
> using nscd?
There is an option called `shared' (configurable in nscd.conf) which is
standard on. Found some info  which I didn't verify myself:
If sharing is disabled for a name service, nscd clients use their
connection to /var/run/nscd/socket for all access to the name service cache.
If sharing is enabled for a name service, an nscd client will retrieve a
file descriptor for nscd's corresponding mmap'd cache file over the
/var/run/nscd/socket, and will then mmap that file itself. After that,
any lookups for entries which are present in the cache and have a good
time-to-live can be satisfied by the client without (talking to/waiting
for) nscd. Lookups on entries which are either not present in the cache
or have an expired TTL still require interactions with nscd.
> Is there some way to ask libc "is nscd being used"?
I don't know. Will have to look that one up...
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20070517/157464b0/attachment.pgp
More information about the dbus