Taking a cue from our MySQL friends - MySQL uses T-trees for their in-memory
structures. These are balanced trees, like AVL trees. But instead of just one
data item per tree node, they have N items per node. (Presumably N is a
compile-time constant.) The advantage to using T-trees is that inserts and
deletes have less impact on the overall tree, thus minimizing the need for
rebalancing.
I would expect that they perform about as well as AVL trees for lookups.
Anyone interested in experimenting here and reporting on the relative performance?
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
Simon Riggs wrote:
> Hi Gavin,
>
> PostgreSQL uses B-trees as the main index type, though also supports
> GIST, GIN and Hash index types. We avoid re-balancing the trees at
> delete time, which is a high source of contention.
>
> MySQL, to my knowledge, doesn't support T-Trees?
> http://dev.mysql.com/doc/refman/5.0/en/create-index.html
As I noted to Gavin, that's a different thing entirely. Our on-disk indexing
uses B-trees as well, but our in-memory caches use AVL trees. I would love to
try a B-link tree implementation for our on-disk data, but that's yet another
story...
> T-Trees are a class of index known to be cache conscious, but they also
> perform poorly when I/O is involved. Selecting that would mean you'd
> need to know in advance the memory allocation given to your server,
> which may not be as much as you want and can change over time. You can
> have non-persistent indexes, though rebuilding indexes at startup can be
> annoying also.
I/O is not a consideration for this purpose.
> Does OpenLDAP experience a high insert/delete rate? I would have
> expected most uses to be mostly read-only, percentage-wise, but I guess
> you'll set me straight.
Yes, there is a high rate of insert/deletes into the caches when the cache is
smaller than the working set. Since T-trees allow more data items to be stored
per tree node, that also means we could have less overhead in tree link pointers.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
Two new bug fixes for RE24 committed today. Please retest. Hopefully
this'll be all for 2.4.10.
Thanks!!
--Quanah
--
Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc
--------------------
Zimbra :: the leader in open source messaging and collaboration
hyc(a)OpenLDAP.org wrote:
> Update of /repo/OpenLDAP/pkg/ldap/contrib/slapd-modules/nssov
> Log Message:
> Directory /repo/OpenLDAP/pkg/ldap/contrib/slapd-modules/nssov added to the repository
I've imported a complete copy of Arthur de Jong's nss-ldapd-0.6.2 with this
overlay. The overlay implements a listener inside slapd that speaks the same
protocol as nss-ldapd. As such, it replaces the server side of his package
(nslcd). You still need to build and install his client side though (nss).
It passes the majority of the "make check" tests in the nss-ldapd/tests
directory on my OpenSuSE system. The ones that fail appear to be incorrectly
written tests. Unfortunately those tests are heavily dependent on your
system's nsswitch.conf and the other databases; they ought to be cleaned up to
be completely self-contained.
The point of all this: the nss-ldapd approach avoids the issue of polluting
the user space with libldap's symbols, by sending all requests thru a small
nss stub. This stub sends requests (using a very simple protocol) over a Unix
Domain socket to some other server which actually processes the requests. With
the original nss-ldapd, an nslcd daemon listening on that socket then uses
libldap to contact whatever LDAP server was configured.
With this overlay, slapd itself answers the nss requests. On a host with the
master database, this avoids an unnecessary context switch if nothing else.
Even on hosts without the full database, this approach opens up the
possibility of using pcache to perform intelligent caching of nss data, as
well as using syncrepl to keep information current.
I've also discussed with Arthur some directions for improvement in the base
nss code. I may push some of those into here later.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
3 new fixes in, please test.
Thanks,
Quanah
--
Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc
--------------------
Zimbra :: the leader in open source messaging and collaboration
Please test RE 24 in preparation for 2.4.10. Thanks!
--Quanah
--
Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc
--------------------
Zimbra :: the leader in open source messaging and collaboration
Dear All,
What are the basic requirements we can always count on when building the
OpenLDAP suite?
I'm trying to pick the right language for the menu build system for the
contrib scripts for:
http://www.openldap.org/lists/openldap-devel/200805/msg00087.html
Something like http://wiki.sblug.org/Bash_Menu_Program works with Bash or
/bin/sh then use sed/awk for the suffix subs etc.
I could use Perl and stick to core modules etc. as that comes as standard
normally.
Thoughts?
--
Kind Regards,
Gavin Henry.
T +44 (0) 1224 279484
M +44 (0) 7930 323266
F +44 (0) 1224 824887
E ghenry(a)suretecsystems.com
Open Source. Open Solutions(tm).
http://www.suretecsystems.com/
Suretec Systems is a limited company registered in Scotland. Registered
number: SC258005. Registered office: 13 Whiteley Well Place, Inverurie,
Aberdeenshire, AB51 4FP.
Thought I would just drop in a note on this...
There have been changes with glibc 2.8. Now struct ucred is ifdef'd
under _GNU_SOURCE
Maybe configure should detect if it's needed?
OK on Fedora 9 i386, CentOS 4 and CentOS 5 (vmware)
Ing. Luca Scamoni
Responsabile Ricerca e Sviluppo
SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
-----------------------------------
Office: +39 0382 573859 (137)
Mobile: +39 347 1014425
Email: luca.scamoni(a)sys-net.it
-----------------------------------
Some project ideas that have come out of discussions at this week's Ubuntu
Developer Summit:
* canned slapd.conf / config.ldif with simple tree and Samba3 support
* canned config with Heimdal KDC support
* canned templates to create LDAP users with POSIX, Samba, and KDC
attributes fully populated
* for web2ldap
* plugin for Linux useradd/userdel
I think the canned configs are pretty small projects - just write a config, do
some variable substitution on the database suffix etc., and it should be ready
to use. We can provide these in the contrib tree with appropriate READMEs. Any
volunteers?
On a separate topic, I've been slowly rewriting nss-ldapd as a slapd overlay
(in between technical sessions at the Summit). This will also be showing up in
contrib soon. With this approach, we can eliminate all the
libldap/libldap_r/version dependencies that currently plague the usual
nss-ldap implementation (and nss-ldapd already does that). Plus, we can not
only have direct NSS mapping into local slapd databases, but with back-ldap,
pcache, and/or translucent, we can also provide excellent NSS performance from
a remote LDAP server, as well as locally cached credentials for disconnected
host operation.
Which reminds me, it would still be a good idea to develop a back-tdb using
Samba's tdb library, as a lightweight/small footprint/easy to configure
transactional backend. The last time I checked tdb would only safely support
up to about 500,000 objects, but for a lot of smaller sites that would be more
than enough, and the limitation would be worth the simplification of the
configs/tuning aspects. Again - any volunteers looking for some fun projects?
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/